Difference between revisions of "Template:Info"

From Moegirlpedia
Jump to: navigation, search
(// Edit via Wikiplus)
m (// Edit via Wikiplus)
Line 1: Line 1:
 
<includeonly><templatestyles src="模板:info/style.css" /><div class="infoBox {{{class|}}}" style="{{#ifeq:{{{type|}}}|middle|display:flow-root; {{#if:{{{width|}}}|width:{{{width}}};}}}}max-width:100%;border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
 
<includeonly><templatestyles src="模板:info/style.css" /><div class="infoBox {{{class|}}}" style="{{#ifeq:{{{type|}}}|middle|display:flow-root; {{#if:{{{width|}}}|width:{{{width}}};}}}}max-width:100%;border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><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="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Icon-info.png|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|''''''Nothing here (⊙_⊙)'''<br />Did you forget <code>text=</code> or <code>1=</code>?'''}}}}}}}}}</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="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Icon-info.png|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|''''''Nothing here (⊙_⊙)'''<br />Did you forget <code>text=</code> or <code>1=</code>?'''}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div><noinclude>{{doc}}
+
</div></div></includeonly><noinclude>{{doc}}
 
</noinclude>
 
</noinclude>

Revision as of 08:35, 25 August 2021

Template-info.svg Template Documentation  [View] [Edit] [History] [Refresh]

Preview

When no parameters are filled in, the result is this:

Icon-info.png
Nothing here (⊙_⊙)
Did you forget text= or 1=?

Brief description

  • The parameter text is required, all other parameters are optional.
    • You can also directly use the parameter 1, for example, {{Info|content}} and {{Info|text=content}} are equivalent.
  • You can use the parameter "title" to add a title, it is also possible to add a footnote with the parameter "below".
  • When using this template to make other templates, the template type can be determined using the parameter type. top (default) is [Page-top prompt templates], middle is [Page-middle prompt templates], and none means no category.

Syntax

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

Parameters

{{Info
|width= <!-- total width, default is 80% -->
|color= <!-- Color of the left border, default is #1e90ff-->
|backgroundColor= <!--Background color, default is #fbfbfb -->
|leftimage= <!--Left side image, default is [[Image:Icon-info.png|50px|link=]], will override the {{{smallimage}}} parameter -->
|icon-style= <!-- Style of the image -->
|smallimage= <!-- Image size. When the parameter value is not empty, the default is 25px, otherwise 50px -->
|title= <!-- The title content -->
|title-style= <!-- style of the title, formatted as inline style, such as color: red; font-style: italic; -->
|text= <!-- Text content, equivalent to {{{content}}} or {{{1}}} -->
|text-style= <!--The text style, equivalent to {{{content-style}}} -->
|below= <!-- Footnote content -->
|below-style= <!-- Footnote style -->
|class= <!--Template extra class -->
|type= <!--The template's category, for template pages only: top is [Page-top prompt templates], middle is [Page-middle prompt templates], and none is no category; defaults to [Page-top prompt templates] in template pages, defaults to no category in non-template pages -->
}}