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|{{#if:1|{{{1|2}}}}}}}} }}" style="<!--
+
     | column-count column-count-{{{cols|{{{1|2}}}}}} }}" style="<!--
  -->{{#if: {{{colwidth|{{{2|}}}}}}
  -->{{#if: {{{colwidth|{{{2|}}}}}}
-
     | {{column-width|{{{colwidth|{{#if:1|{{{2}}}}}}}}}}
+
     | {{column-width|{{{colwidth|{{{2}}}}}}}}
-
     | {{column-count|{{{cols|{{#if:1|{{{1|2}}}}}}}}}} }} <!--
+
     | {{column-count|{{{cols|{{{1|2}}}}}}}} }} <!--
-
  -->{{#if: {{{gap|}}}
+
  -->{{#if: {{{rules|}}}
-
     | {{column-gap|{{{gap}}}}} }}<!--
+
     | {{#ifeq:{{{rules}}}|yes
-
-->{{#switch: {{{rules|}}}
+
      | {{column-rule}}
-
    | = <!--empty-->
+
      | {{column-rule|{{{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>}}<!-- Inventory how many pages use small=yes
+
     |{{{content}}}</div>}}</includeonly>
-
-->{{#ifeq: {{{small|}}}|yes
+
-
    |[[Category:Pages using div col with small parameter]]}}</includeonly><noinclude>
+
-
{{Documentation}}
+
-
</noinclude>
+

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


Code

Personal tools