Template:Div col
From Iwe
(Difference between revisions)
Line 1: | Line 1: | ||
- | <includeonly><div class="div-col columns <!-- | + | <noinclude> |
+ | This template together with [[Template:Div col end]] is used to display lists in multiple columns. | ||
+ | |||
+ | === Usage === | ||
+ | |||
+ | You can either specify the number of columns (default: 2): | ||
+ | |||
+ | <pre>{{Div col|3}} | ||
+ | * a | ||
+ | * b | ||
+ | * c | ||
+ | {{Div col end}} </pre> | ||
+ | |||
+ | Or you can specify minimum column width and the number of columns changes dynamically depending on screen width: | ||
+ | |||
+ | <pre>{{Div col||10em}} | ||
+ | * a | ||
+ | * b | ||
+ | * c | ||
+ | {{Div col end}}</pre> | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <pre>{{Div col|4|rules=yes}} | ||
+ | *Combustion - Fire | ||
+ | .. | ||
+ | {{Div col end}}</pre> | ||
+ | |||
+ | {{Div col|4|rules=yes}} | ||
+ | *Combustion - Fire | ||
+ | *Corrosion - Acid | ||
+ | *Devotion - Positive (Healing) | ||
+ | *Glaciation - Cold | ||
+ | *Impulse - Force, Untyped, Slashing, Piercing, Bludgeoning | ||
+ | *Magnetism - Electricity | ||
+ | *Nullification - Negative | ||
+ | *Potency - Universal | ||
+ | *Radiance - Light, Alignment | ||
+ | *Reconstruction - Repair, Rust | ||
+ | *Resonance - Sonic | ||
+ | {{Div col end}} | ||
+ | |||
+ | |||
+ | ===Code=== | ||
+ | </noinclude><includeonly><div class="div-col columns <!-- | ||
-->{{#if: {{{colwidth|{{{2|}}}}}} | -->{{#if: {{{colwidth|{{{2|}}}}}} | ||
| column-width | | column-width | ||
- | | column-count column-count-{{{cols | + | | column-count column-count-{{{cols|{{{1|2}}}}}} }}" style="<!-- |
-->{{#if: {{{colwidth|{{{2|}}}}}} | -->{{#if: {{{colwidth|{{{2|}}}}}} | ||
- | | {{column-width|{{{colwidth | + | | {{column-width|{{{colwidth|{{{2}}}}}}}} |
- | | {{column-count|{{{cols | + | | {{column-count|{{{cols|{{{1|2}}}}}}}} }} <!-- |
- | -->{{#if: {{{ | + | -->{{#if: {{{rules|}}} |
- | | | + | | {{#ifeq:{{{rules}}}|yes |
- | + | | {{column-rule}} | |
- | + | | {{column-rule|{{{rules}}}}} }} }} <!-- | |
- | + | ||
- | + | ||
-->{{#ifeq: {{{small|}}}|yes | -->{{#ifeq: {{{small|}}}|yes | ||
| font-size:90%; }} <!-- | | font-size:90%; }} <!-- | ||
Line 17: | Line 59: | ||
| {{{style}}} }}"><!-- | | {{{style}}} }}"><!-- | ||
-->{{#if: {{{content|}}} | -->{{#if: {{{content|}}} | ||
- | |{{{content}}}</div> | + | |{{{content}}}</div>}}</includeonly> |
- | + | ||
- | + | ||
- | + | ||
- | + |
Revision as of 22:00, 1 November 2015
This template together with Template:Div col end is used to display lists in multiple columns.
Usage
You can either specify the number of columns (default: 2):
{{Div col|3}} * a * b * c {{Div col end}}
Or you can specify minimum column width and the number of columns changes dynamically depending on screen width:
{{Div col||10em}} * a * b * c {{Div col end}}
Example
{{Div col|4|rules=yes}} *Combustion - Fire .. {{Div col end}}
- Combustion - Fire
- Corrosion - Acid
- Devotion - Positive (Healing)
- Glaciation - Cold
- Impulse - Force, Untyped, Slashing, Piercing, Bludgeoning
- Magnetism - Electricity
- Nullification - Negative
- Potency - Universal
- Radiance - Light, Alignment
- Reconstruction - Repair, Rust
- Resonance - Sonic