Template:Info: Difference between revisions

From NeuroWiki
Jump to navigation Jump to search
m 1 revision imported
Translated
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="infoBox {{{class|}}}" style="{{#ifeq:{{{type|}}}|middle|display:flow-root;}}{{#switch:{{{type|none}}}|middle|none={{#if:{{{width|}}}|width:{{{width}}};}}}}max-width:100%;border-left: 10px solid {{{color|#1e90ff}}};"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
<includeonly><div class="infoBox {{{class|}}}" style="{{#ifeq:{{{type|}}}|middle|display:flow-root;}}{{#switch:{{{type|none}}}|middle|none={{#if:{{{width|}}}|width:{{{width}}};}}}}max-width:100%;border-left: 10px solid {{{color|#1e90ff}}};"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{{icon-style|}}}">{{{leftimage|[[image:Icon-info.png|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|'''警告!你还没有添加任何内容'''}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{{icon-style|}}}">{{{leftimage|[[image:Icon-info.png|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|'''Warning! You haven't added any content yet'''}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div>{{TemplateCate|{{#switch:{{{type|}}}
</div></div>{{TemplateCate|{{#switch:{{{type|}}}
|top=页顶提示模板
|top=Top Notice Templates
|middle=页中提示模板
|middle=Middle Notice Templates
|none=
|none=
|#default=页顶提示模板}}}}</includeonly><noinclude>{{Documentation}}[[分类:元模板]]</noinclude>
|#default=Top Notice Templates}}}}</includeonly><noinclude>{{Documentation}}[[Category:Meta Templates]][[zh:Template:Info]]</noinclude>

Latest revision as of 21:40, 9 November 2024

[ View | Edit | History | Purge ]Documentation page

Preview

When no parameters are filled, the effect is as follows:

Warning! You haven't added any content yet

Brief Description

  • The parameter text is required, all other parameters are optional.
    • You can also use parameter 1 directly. For example, {{Info|Content}} and {{Info|text=Content}} are equivalent.
  • You can use the parameter title to add a title, or use the parameter below to add a footer note.
  • When using this template to create other templates, you can use the parameter type to fill in the category. Top (default) is [Top Notice Template], middle is [Middle Notice Template], none means no category.

Full Parameters

{{info
|width=
|color=
|backgroundColor=
|leftimage=
|icon-style=
|smallimage=
|title=
|title-style=
|text=
|text-style=
|below=
|below-style=
|class=
|type=
}}

Parameter Explanation

{{info
|width           = <!-- Template width, default is 80% -->

|color           = <!-- Left stripe color, default is #1e90ff -->
|backgroundColor = <!-- Background color, default is #fbfbfb -->

|leftimage       = <!-- Left icon, default is [[image:Icon-info.png|50px|link=]], will override parameter {{{smallimage}}} -->
|icon-style      = <!-- Icon style -->
|smallimage      = <!-- Icon size. If the parameter value is not empty, the icon size is 25px, otherwise it is 50px -->

|title           = <!-- Title content -->
|title-style     = <!-- Title style, formatted as inline style, such as color: red; font-style: italic; -->

|text            = <!-- Text content, equivalent to {{{content}}} and {{{1}}} -->
|text-style      = <!-- Text style, equivalent to {{{content-style}}} -->

|below           = <!-- Bottom content -->
|below-style     = <!-- Bottom style -->

|class           = <!-- Additional template class -->
|type            = <!-- Template type, for template page use only: top is [Top Notice Template], middle is [Middle Notice Template], none means no category; default is Top Notice Template on template pages, no category on non-template pages -->
}}

en:Template:Info

[ View | Edit | History | Purge ]The above documentation is transcluded from Template:Info/doc.