Template:Caption: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
Overriding the bootstrap breakage...
(Reverted edits by Locke; Restore to version 13350 by Lanzz)
(Overriding the bootstrap breakage...)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><table style="border: 0px; width: 30em"><tr><td>{{{1}}}</td><td>''{{{2}}}''</td></tr></table></includeonly><noinclude>
<onlyinclude>{{#vardefine:CaptionID|{{#if:{{#varexists:CaptionID}}|{{#expr:{{#var:CaptionID}}+1}}|1}}}}
{| border=1 style="border-collapse: separate; width: initial; {{Round|10}} border: 1px solid {{{bordercolor|#000000}}}; background: {{{borderbackground|#5a7eb5}}}; {{#switch: {{lc:{{{float|}}}}}|left=float: left; margin-right: 1em;|right=float: right; margin-left: 1em;|center=margin: auto;}}"
! class="cap{{#var:CaptionID}}col0 _toggler-cap{{#var:CaptionID}}col0 _toggler-cap{{#var:CaptionID}}col1 _toggler-cap{{#var:CaptionID}}col2" title="{{{titleshow|{{{title|}}}}}}" style="{{Round|10}} cursor: pointer; background: {{{buttonbackgroundshow|{{{buttonbackground|#f2f2f2}}}}}}; {{#ifeq: {{lc:{{{init|show}}}}}|hide||display: none;}}; padding:5px" |{{#if: {{{iconshow|{{{icon|}}}}}}
  | [[File:{{{iconshow|{{{icon}}}}}}|{{{sizeshow|{{{size|40px}}}}}}|link=]]
  | {{#tag:poem|{{{textshow|{{{text}}}}}}}}
  }}
! class="cap{{#var:CaptionID}}col1 _toggler-cap{{#var:CaptionID}}col0 _toggler-cap{{#var:CaptionID}}col1 _toggler-cap{{#var:CaptionID}}col2" title="{{{titlehide|{{{title|}}}}}}" style="{{Round|left|10}}; cursor: pointer; background: {{{buttonbackgroundhide|{{{buttonbackground|#f2f2f2}}}}}}; {{#ifeq: {{lc:{{{init|show}}}}}|hide|display: none;|}}; padding:5px" |{{#if: {{{iconhide|{{{icon|}}}}}}
  | [[File:{{{iconhide|{{{icon}}}}}}|{{{sizehide|{{{size|40px}}}}}}|link=]]
  | {{#tag:poem|{{{texthide|{{{text}}}}}}}}
  }}
| class="cap{{#var:CaptionID}}col2" style="{{Round|right|10}} background: {{{contentbackground|#ffffff}}}; {{#ifeq: {{lc:{{{init|show}}}}}|hide|display: none;|}}; padding:5px" | {{#tag:poem|{{{1}}}}}
|}</onlyinclude>


==Purpose==
==Purpose==
This meta-template is used for the Fi, Navi, etc. quote templates.
This template is the base for creating captions that, for example, can be used to contain certain character quotes about a page's subject.


==Usage==
==Usage==
'''<nowiki>{{Caption|image|text}}</nowiki>'''
To use this template, start with this code:
{{Usage/Block|anon=content|icon|text|title|size|buttonbackground|contentbackground|bordercolor|borderbackground}}
{{Usage/Param|content|The caption itself, which can be hidden by clicking the button.}}
{{Usage/Param|icon|The name of an image to display as the 'toggle visibility' button. Use this OR "text".}}
{{Usage/Param|text|The text to display as the 'toggle visibility' button. Use this OR "icon".}}
{{Usage/Param|title|Text to appear as a tooltip when hovering over the button.|optional}}
{{Usage/Param|size|If the button is an image, this will define the width of the image.|optional|40px}}
{{Usage/Param|buttonbackground|Background color for the button.|optional|#f2f2f2}}
{{Usage/Param|contentbackground|Background color for the content.|optional|#ffffff}}
{{Usage/Param|bordercolor|Color of the edges of the border.|optional|#000000}}
{{Usage/Param|borderbackground|Center color of the border.|optional|#5a7eb5}}
{{Clear}}


==Icon==
The 'show' button can be defined independently of the 'hide' button by using "iconhide" and "iconshow" instead of "icon", as with "text", "title", "size", and "buttonbackground":
Old Man [[File:OldManIcon.png]] - File:OldManIcon.png
{{Usage/Block|anon=content|iconhide|iconshow|texthide|textshow|titlehide|titleshow|sizehide|sizeshow|buttonbackgroundhide|buttonbackgroundshow|contentbackground|bordercolor|borderbackground}}
{{Usage/Param|iconhide|Filename for the 'hide' button.}}
{{Usage/Param|iconshow|Filename for the 'show' button.}}
{{Usage/Param|texthide|Text for the 'hide' button.}}
{{Usage/Param|textshow|Text for the 'show' button.}}
{{Usage/Param|titlehide|Tooltip for the 'hide' button.|optional}}
{{Usage/Param|titleshow|Tooltip for the 'show' button.|optional}}
{{Usage/Param|sizehide|Size of the 'hide' button's image.|optional|40px}}
{{Usage/Param|sizeshow|Size of the 'show' button's image.|optional|40px}}
{{Usage/Param|buttonbackgroundhide|Background color for the 'hide' button.|optional|#f2f2f2}}
{{Usage/Param|buttonbackgroundshow|Background color for the 'show' button.|optional|#f2f2f2}}
{{Clear}}


Navi [[File:NaviIcon.png]] - File:NaviIcon.png
The caption can be hidden by default using <code>init=hide</code>, and it can be floated left, center, or right using <code>float=left</code>, etc.


Tatl [[File:TatlIcon.png]] - File:TatlIcon.png
==Icons==
{| class="wikitable"
| [[Old Man]] ([[Template:Old Man|template]]) || [[File:OldManIcon.png|center]] || OldManIcon.png
|-
| [[Navi]] ([[Template:Navi|template]]) || [[File:NaviIcon.png|center]] || NaviIcon.png
|-
| [[Tatl]] ([[Template:Tatl|template]]) || [[File:TatlIcon.png|center]] || TatlIcon.png
|-
| [[Fi]] ([[Template:Fi|template]]) || [[File:FiIcon.png|center]] || FiIcon.png
|}


Fi [[File:FiIcon.png]] - File:FiIcon.png


{{Cat|Formatting Templates}}
{{Cat|Formatting Templates}}
{{Cat|Caption Templates}}
{{Cat|Caption Templates}}
</noinclude>

Navigation menu