Template:INITOC: Difference between revisions

From Step Mods | Change The Game
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#if:{{{title|}}}|<h3>{{{title}}}</h3>
<includeonly>{{#if:{{{title|}}}|<h3>{{{heading}}}</h3>
}}<div style="padding:0 7px; border:{{{borderSize|1px}}} solid {{{borderColor|#666}}}; width:{{{width|80%}}}; -webkit-column-count:{{{columns|5}}}; -moz-column-count:{{{columns|5}}}; column-count:{{{columns|5}}}; -webkit-column-rule:{{{borderSize|1px}}} solid {{{borderColor|#666}}}; -moz-column-rule:{{{borderSize|1px}}} solid {{{borderColor|#666}}}; column-rule:{{{borderSize|1px}}} solid {{{borderColor|#666}}};">{{{text|}}}</div></includeonly><noinclude>__NOTOC__
}}<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__


== Purpose & Usage ==
== Purpose & Usage ==
This template allows text to be displayed and automatically arranged through several columns. It is used on the some INI Guides to help create a custom TOC.
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.


===Parameters===
===Parameters===
*''text'' (required) is the content within the columns
====Required====
*''title'' (optional) adds a title right before the column that is an level 3 header. Required for some INI Guides
*''text'': Column content.
*''borderSize'' (optional) adjusts the size of the border around the columns. Setting it to 0 disables the border. Default is 1px.
 
*''borderColor'' (optional) sets the color of the borders. Default is #666.
====Optional====
*''width'' (optional) sets the width of the entire block of columned content. Default is 80%.
*''title'': Adds a level-3 heading right before the column.
*''columns'' (optional) sets the number of columns to use. Default is 5.
*''borderColor'': Sets the color of the borders. Default is #555.
*''width'': Sets the width of the entire block of columned content. Default is 65%.
*''columns'': Sets the number of columns to use. Default is 3.
*''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). Default is #555.


== Examples ==
== Examples ==
'''''NOTE:''' Do NOT add line breaks within the code. Instead use HTML <br /> elements.''
'''Code:'''
'''Code:'''
<pre>{{Columns
<pre>{{Columns|text=Love<br />is<br />columns!}}</pre>
|text=Love<br />is<br />columns!
}}</pre>
'''Result:'''
'''Result:'''
{{Columns
{{Columns|text=Love<br />is<br />columns!}}
|text=Love<br />is<br />columns!
}}


'''Code:'''
'''Code:'''
<pre>{{Columns
<pre>{{Columns|text=Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />}}</pre>
|text=Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />
}}</pre>
'''Result:'''
'''Result:'''
{{Columns
{{Columns|text=Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />}}
|text=Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />
}}


'''Code:'''
'''Code:'''

Revision as of 18:14, June 30, 2015


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.

Parameters

Required

  • text: Column content.

Optional

  • title: Adds a level-3 heading right before the column.
  • borderColor: Sets the color of the borders. Default is #555.
  • width: Sets the width of the entire block of columned content. Default is 65%.
  • columns: Sets the number of columns to use. Default is 3.
  • 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). Default is #555.

Examples

NOTE: Do NOT add line breaks within the code. Instead use HTML
elements.
Code:

{{Columns|text=Love<br />is<br />columns!}}

Result: Template:Columns

Code:

{{Columns|text=Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />}}

Result: Template:Columns

Code:

{{Columns
|title=Love
|borderSize=0
|columns=3
|width=100%
|text=Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />Love<br />is<br />columns!<br />
}}

Result: Template:Columns

See Also