Difference between revisions of "Template:FlipBox"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+cat; +documentation;)
m (*renamed Parameter Table to Parameter table;)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
{{#if: {{{style-header|}}}|<div style="{{{style-header}}}">}}{{#if: {{{image|}}}|<span style="position: static; overflow: hidden; white-space: nowrap; padding-bottom: 10px;">[[File:{{{image}}}|{{{imagewidth|20}}}px|link=]]</span>}}<span vertical-align="text-bottom" style="margin-left:{{{titleposition|0}}}%;">{{{title}}}</span>{{#if: {{{style-header|}}}|</div>}}<div class="mw-collapsible-content" style="{{{style-content|padding: 5px; padding-top: 10px;}}}">{{#ifeq:{{uc:{{{1|}}}}}|START||{{{content}}}</div></div>}}}}<noinclude>Creates a box which could be expanded or retracted.
 
{{#if: {{{style-header|}}}|<div style="{{{style-header}}}">}}{{#if: {{{image|}}}|<span style="position: static; overflow: hidden; white-space: nowrap; padding-bottom: 10px;">[[File:{{{image}}}|{{{imagewidth|20}}}px|link=]]</span>}}<span vertical-align="text-bottom" style="margin-left:{{{titleposition|0}}}%;">{{{title}}}</span>{{#if: {{{style-header|}}}|</div>}}<div class="mw-collapsible-content" style="{{{style-content|padding: 5px; padding-top: 10px;}}}">{{#ifeq:{{uc:{{{1|}}}}}|START||{{{content}}}</div></div>}}}}<noinclude>Creates a box which could be expanded or retracted.
  
{{Parameter Table|name=both|parameters=
+
{{Parameter table|name=both|parameters=
{{ParameterRow|title|Title}}
+
{{Parameter row|title|Title}}
{{ParameterRow|content|Content of the box. Isn't visible if {{{1}}} is set to start.}}
+
{{Parameter row|content|Content of the box. Isn't visible if {{{1}}} is set to start.}}
{{ParameterRow|1|Closes the box if <tt>end</tt> and only opens it with <tt>start</tt>. If not set it is closed.|Not set/Closed}}
+
{{Parameter row|1|Closes the box if <tt>end</tt> and only opens it with <tt>start</tt>. If not set it is closed.|Not set/Closed}}
{{ParameterRow|status|Is collapsed by default when <tt>hidden</tt>.|<tt>Hidden</tt>}}
+
{{Parameter row|status|Is collapsed by default when <tt>hidden</tt>.|<tt>Hidden</tt>}}
{{ParameterRow|style|Style of surrounding box.|3=<tt style="white-space:nowrap;">clear:both; padding: 5px; padding-bottom: 3px; border:1px solid #A7D7F9; background-color:#fbfbfb; width:{{{width}}}%;</tt>}}
+
{{Parameter row|style|Style of surrounding box.|3=<tt style="white-space:nowrap;">clear:both; padding: 5px; padding-bottom: 3px; border:1px solid #A7D7F9; background-color:#fbfbfb; width:{{{width}}}%;</tt>}}
{{ParameterRow|width|Width in percent.|100}}
+
{{Parameter row|width|Width in percent.|100}}
{{ParameterRow|style-header|Separate style of header.|Not set}}
+
{{Parameter row|style-header|Separate style of header.|Not set}}
{{ParameterRow|image|Image left to the title.|Not set}}
+
{{Parameter row|image|Image left to the title.|Not set}}
{{ParameterRow|titleposition|Margin from the left of the title position in percent.|0}}
+
{{Parameter row|titleposition|Margin from the left of the title position in percent.|0}}
{{ParameterRow|style-content|Separate style of the content box.|3=<tt style="white-space:nowrap;">padding: 5px; padding-top: 10px;</tt>}}
+
{{Parameter row|style-content|Separate style of the content box.|3=<tt style="white-space:nowrap;">padding: 5px; padding-top: 10px;</tt>}}
 
}}
 
}}
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 12:02, 19 December 2014

{{{title}}}
{{{content}}}
Creates a box which could be expanded or retracted.
#/Name Optional Description Default
title No Title
content No Content of the box. Isn't visible if {{{1}}} is set to start.
1 Yes Closes the box if end and only opens it with start. If not set it is closed. Not set/Closed
status Yes Is collapsed by default when hidden. Hidden
style Yes Style of surrounding box. clear:both; padding: 5px; padding-bottom: 3px; border:1px solid #A7D7F9; background-color:#fbfbfb; width:{{{width}}}%;
width Yes Width in percent. 100
style-header Yes Separate style of header. Not set
image Yes Image left to the title. Not set
titleposition Yes Margin from the left of the title position in percent. 0
style-content Yes Separate style of the content box. padding: 5px; padding-top: 10px;