Template:INITOC: Difference between revisions

From Step Mods | Change The Game
No edit summary
Line 1: Line 1:
<includeonly>{{#if:{{{title|}}}|<h3>{{{title}}}</h3>}}<div style="padding:12px 12px; border:{{{borderSize|1px}}} solid {{{borderColor|#555}}}; width:{{{width|65%}}}; -webkit-column-count:{{{columns|3}}}; -moz-column-count:{{{columns|3}}}; column-count:{{{columns|3}}}; -webkit-column-gap:{{{gapSize|25px}}}; -moz-column-gap:{{{gapSize|25px}}}; column-gap:{{{gapSize|25px}}}; -webkit-column-rule:{{{borderSize|0}}} solid {{{borderColor|#555}}}; -moz-column-rule:{{{borderSize|0}}} solid {{{borderColor|#555}}}; column-rule:{{{borderSize|0}}} solid {{{borderColor|#555}}};">{{{text|}}}</div></includeonly><noinclude>__NOTOC__
<includeonly><h3>INI Parameters by Section</h3><div style="padding:12px 12px; border:{{{borderSize|1px}}} solid {{{borderColor|#555}}}; width:{{{width|65%}}}; -webkit-column-count:{{{columns|3}}}; -moz-column-count:{{{columns|3}}}; column-count:{{{columns|3}}}; -webkit-column-gap:{{{gapSize|25px}}}; -moz-column-gap:{{{gapSize|25px}}}; column-gap:{{{gapSize|25px}}}; -webkit-column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}}; -moz-column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}}; column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}};">{{{text|}}}</div></includeonly><noinclude>__NOTOC__
== Purpose & Usage ==
== Purpose & Usage ==
This template allows text to be displayed and automatically arranged over multiple columns. It is used on the some INI Guides to help create a custom TOC.
This template should be used in conjunction with the helper template, {{tl|INISectionLabel}}. This template provides a method for laying out a custom table of contents listing subpage links to respective INI parameters. These subpage links are, in turn, handled using {{tl|INISectionLabel}}.


===Parameters===
===Parameters===
Line 8: Line 8:


====Optional====
====Optional====
*''title'': Adds a level-3 heading right before the column.
*''borderColor'': Sets the color of the borders. Enter the hex code (excluding # prefix) Default is #555.
*''borderColor'': Sets the color of the borders. Default is #555.
*''width'': Sets the width of the entire block of columned content. Enter an integer in pixels. Default is 65%.
*''width'': Sets the width of the entire block of columned content. Default is 65%.
*''columns'': Sets the number of columns to use. Enter an integer. Default is 3.
*''columns'': Sets the number of columns to use. Default is 3.
*''gapSize'': Sets the whitespace width between columns (analogous to padding). Enter an integer in pixels. Default is 25px.
*''gapSize'': Sets the whitespace width between columns (analogous to padding). Default is 25px.
*''borderSize'': Sets the border width between columns (placed in center of the gap). Enter an integer in pixels. Default is 1px.
*''borderSize'': Sets the border width between columns (placed in center of the gap). Default is #555.


== Examples ==
== Examples ==
{{Fc|important|'''''NOTE:''' Do NOT add line breaks within the code. Instead use HTML <code><nowiki><br /></nowiki></code> or <code><nowiki><br></nowiki></code> tags between each parameter.''}}<br />
{{Fc|important|'''''NOTE:''' Do NOT add line breaks within the code. Instead use HTML <code><nowiki><br /></nowiki></code> or <code><nowiki><br></nowiki></code> tags between each parameter.''}}<br />


'''Code:'''
'''Code:''' (normal use with the helper template)
<pre>{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3}}</pre>
<pre>{{Columns|text={{INISectionLabel|ParamHead1}}<br />{{INISectionLabel|ParamHead2}}<br />{{INISectionLabel|ParamHead3}}<br />{{INISectionLabel|ParamHead4}}<br />{{INISectionLabel|ParamHead5}}<br />{{INISectionLabel|ParamHead6}}<br />{{INISectionLabel|ParamHead7}}<br />{{INISectionLabel|ParamHead8}}<br />{{INISectionLabel|ParamHead9}}<br />{{INISectionLabel|ParamHead10}}<br />{{INISectionLabel|ParamHead11}}<br />{{INISectionLabel|ParamHead12}}</pre>
'''Result:'''
{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3}}
 
'''Code:'''
<pre>{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9<br />ParamHead10<br />ParamHead11<br />ParamHead12}}</pre>
'''Result:'''
'''Result:'''
{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9<br />ParamHead10<br />ParamHead11<br />ParamHead12}}
{{Columns|text={{INISectionLabel|ParamHead1}}<br />{{INISectionLabel|ParamHead2}}<br />{{INISectionLabel|ParamHead3}}<br />{{INISectionLabel|ParamHead4}}<br />{{INISectionLabel|ParamHead5}}<br />{{INISectionLabel|ParamHead6}}<br />{{INISectionLabel|ParamHead7}}<br />{{INISectionLabel|ParamHead8}}<br />{{INISectionLabel|ParamHead9}}<br />{{INISectionLabel|ParamHead10}}<br />{{INISectionLabel|ParamHead11}}<br />{{INISectionLabel|ParamHead12}}}}


'''Code:'''
'''Code:''' (
<pre>{{Columns
<pre>{{Columns
|title=Love
|borderColor=#55aa55
|borderSize=0
|borderSize=1px
|columns=4
|columns=4
|width=100%
|width=100%
|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9<br />ParamHead10<br />ParamHead11<br />ParamHead12<br />ParamHead13<br />ParamHead14<br />ParamHead15<br /ParamHead16<br />ParamHead17<br />ParamHead18<br />ParamHead19<br />ParamHead20
|gapSize=10px
|text={{INISectionLabel|ParamHead1}}<br />{{INISectionLabel|ParamHead2}}<br />{{INISectionLabel|ParamHead3}}<br />{{INISectionLabel|ParamHead4}}<br />{{INISectionLabel|ParamHead5}}<br />{{INISectionLabel|ParamHead6}}<br />{{INISectionLabel|ParamHead7}}<br />{{INISectionLabel|ParamHead8}}<br />{{INISectionLabel|ParamHead9}}<br />{{INISectionLabel|ParamHead10}}<br />{{INISectionLabel|ParamHead11}}<br />{{INISectionLabel|ParamHead12}}<br />{{INISectionLabel|ParamHead13}}<br />{{INISectionLabel|ParamHead14}}<br />{{INISectionLabel|ParamHead15<br /{{INISectionLabel|ParamHead16}}<br />{{INISectionLabel|ParamHead17}}<br />{{INISectionLabel|ParamHead18}}<br />{{INISectionLabel|ParamHead19}}<br />{{INISectionLabel|ParamHead20
}}</pre>
}}</pre>
'''Result:'''
'''Result:'''
{{Columns
{{Columns
|title=Love
|borderColor=#55aa55
|borderSize=0
|borderSize=1px
|columns=4
|columns=4
|width=100%
|width=100%
|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9<br />ParamHead10<br />ParamHead11<br />ParamHead12<br />ParamHead13<br />ParamHead14<br />ParamHead15<br />ParamHead16<br />ParamHead17<br />ParamHead18<br />ParamHead19<br />ParamHead20
|gapSize=10px
|text={{INISectionLabel|ParamHead1}}<br />{{INISectionLabel|ParamHead2}}<br />{{INISectionLabel|ParamHead3}}<br />{{INISectionLabel|ParamHead4}}<br />{{INISectionLabel|ParamHead5}}<br />{{INISectionLabel|ParamHead6}}<br />{{INISectionLabel|ParamHead7}}<br />{{INISectionLabel|ParamHead8}}<br />{{INISectionLabel|ParamHead9}}<br />{{INISectionLabel|ParamHead10}}<br />{{INISectionLabel|ParamHead11}}<br />{{INISectionLabel|ParamHead12}}<br />{{INISectionLabel|ParamHead13}}<br />{{INISectionLabel|ParamHead14}}<br />{{INISectionLabel|ParamHead15<br /{{INISectionLabel|ParamHead16}}<br />{{INISectionLabel|ParamHead17}}<br />{{INISectionLabel|ParamHead18}}<br />{{INISectionLabel|ParamHead19}}<br />{{INISectionLabel|ParamHead20}}
}}
}}
'''Code:''' (can be used without helper template)
<pre>{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3}}</pre>
'''Result:'''
{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3}}


== See Also ==
== See Also ==
*[[Template:INI Guide/Custom TOC]]
*[[Template:INI Guide/Custom TOC]]
</noinclude>
</noinclude>

Revision as of 18:15, July 1, 2015

Purpose & Usage

This template should be used in conjunction with the helper template, Template:Tl. This template provides a method for laying out a custom table of contents listing subpage links to respective INI parameters. These subpage links are, in turn, handled using Template:Tl.

Parameters

Required

  • text: Parameter-heading labels separated by <br /> or <br> HTML tags.

Optional

  • borderColor: Sets the color of the borders. Enter the hex code (excluding # prefix) Default is #555.
  • width: Sets the width of the entire block of columned content. Enter an integer in pixels. Default is 65%.
  • columns: Sets the number of columns to use. Enter an integer. Default is 3.
  • gapSize: Sets the whitespace width between columns (analogous to padding). Enter an integer in pixels. Default is 25px.
  • borderSize: Sets the border width between columns (placed in center of the gap). Enter an integer in pixels. Default is 1px.

Examples

NOTE: Do NOT add line breaks within the code. Instead use HTML <br /> or <br> tags between each parameter.

Code: (normal use with the helper template)

{{Columns|text={{INISectionLabel|ParamHead1}}<br />{{INISectionLabel|ParamHead2}}<br />{{INISectionLabel|ParamHead3}}<br />{{INISectionLabel|ParamHead4}}<br />{{INISectionLabel|ParamHead5}}<br />{{INISectionLabel|ParamHead6}}<br />{{INISectionLabel|ParamHead7}}<br />{{INISectionLabel|ParamHead8}}<br />{{INISectionLabel|ParamHead9}}<br />{{INISectionLabel|ParamHead10}}<br />{{INISectionLabel|ParamHead11}}<br />{{INISectionLabel|ParamHead12}}

Result: Template:Columns

Code: (

{{Columns
|borderColor=#55aa55
|borderSize=1px
|columns=4
|width=100%
|gapSize=10px
|text={{INISectionLabel|ParamHead1}}<br />{{INISectionLabel|ParamHead2}}<br />{{INISectionLabel|ParamHead3}}<br />{{INISectionLabel|ParamHead4}}<br />{{INISectionLabel|ParamHead5}}<br />{{INISectionLabel|ParamHead6}}<br />{{INISectionLabel|ParamHead7}}<br />{{INISectionLabel|ParamHead8}}<br />{{INISectionLabel|ParamHead9}}<br />{{INISectionLabel|ParamHead10}}<br />{{INISectionLabel|ParamHead11}}<br />{{INISectionLabel|ParamHead12}}<br />{{INISectionLabel|ParamHead13}}<br />{{INISectionLabel|ParamHead14}}<br />{{INISectionLabel|ParamHead15<br /{{INISectionLabel|ParamHead16}}<br />{{INISectionLabel|ParamHead17}}<br />{{INISectionLabel|ParamHead18}}<br />{{INISectionLabel|ParamHead19}}<br />{{INISectionLabel|ParamHead20
}}

Result: {{Columns |borderColor=#55aa55 |borderSize=1px |columns=4 |width=100% |gapSize=10px |text=Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel
Template:INISectionLabel

Code: (can be used without helper template)

{{Columns|text=ParamHead1<br />ParamHead2<br />ParamHead3}}

Result: Template:Columns

See Also