Difference between revisions of "Template:Columns/doc"

From WikiCorporates
Jump to navigation Jump to search
m (→‎Eg. #2: Timeline)
m
Line 2: Line 2:
 
<small>[[Template:Columns|<< Template:Columns]]</small>
 
<small>[[Template:Columns|<< Template:Columns]]</small>
 
=== Usage ===
 
=== Usage ===
−
Use this template to create a flexible, multi-column list, with [[Template:Cols link]].<br/>
+
Use this template to create a flexible, multi-column list, optionally with [[Template:Cols link]].<br/>
−
If used without parameters, it will produce a flexible, multi-column, 20em column-width list, with a list-style-type of disc, and a font-size of 100%. (Nb: see more List-style-type options at [https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type Moz. Dev. Network].)
+
If used without parameters, it will produce a flexible, multi-column, 20em column-width list, with an unordered list-style-type of disc, and a font-size of 100%.
 +
 
 +
Mozilla Dev. Networks has 3 useful pages on this:
 +
* [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul ul options]
 +
* [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol ol options]
 +
* [https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type css options]  
  
 
The parameters are:
 
The parameters are:
 
<pre>
 
<pre>
−
{{{width}}}   - default  = 20em
+
width  - default  = 20em
−
{{{fsize}}}   - default  = 100%
+
fsize  - default  = 100%
−
{{{lst}}}     - default  = disc (options: [none|disc|circle|square|decimal])
+
type    - default  = ul;  options: [ol | ul]
−
{{{class}}}   - vspace  = adds 6px padding to the bottom of each <li>
+
lst    - default  = disc; options: [none|disc|circle|square|decimal]
−
              - timeline = removes the bullet, left-aligns the content.
+
                  Fixme: no default set for ol lists. "1" must be specified.
−
{{{content}}} - whatever content you want to put in here.
+
class  - vspace  = adds 6px padding to the bottom of each <li>
 +
        - timeline = removes the bullet, left-aligns the content.
 +
content - whatever content you want to put in here.
 
</pre>
 
</pre>
  

Revision as of 01:55, 24 February 2019

<< Template:Columns

Usage

Use this template to create a flexible, multi-column list, optionally with Template:Cols link.
If used without parameters, it will produce a flexible, multi-column, 20em column-width list, with an unordered list-style-type of disc, and a font-size of 100%.

Mozilla Dev. Networks has 3 useful pages on this:

The parameters are:

width   - default  = 20em
fsize   - default  = 100%
type    - default  = ul;   options: [ol | ul]
lst     - default  = disc; options: [none|disc|circle|square|decimal]
                   Fixme: no default set for ol lists. "1" must be specified.
class   - vspace   = adds 6px padding to the bottom of each <li>
        - timeline = removes the bullet, left-aligns the content.
content - whatever content you want to put in here.

Examples

Note the use of the {{Cols hdr|Board Members}} template to create a heading: Template:Cols hdr

Eg. #1: Plain Vanilla

Examples:

{{Columns|width=15em|lst=square|content=
{{Cols hdr|Board Members}}
{{Cols link|Nigel Lawson|txt=, President}}
{{Cols link|David Campbell Bannerman}}
{{Cols link|Steve Baker|txt=, Co-Chair}}
{{Cols link|Gerald Howarth|Sir Gerald Howarth}}
{{Cols link|Michelin|img=Michelin-Group-logo-vert-opt.svg|sz=45x20px}}
... ...
}}

Eg. #2: Timeline

Example: Patrick Minford

{{Columns|width=30em|lst=none|class=timeline|content=
{{Cols tline|Apr.2016|Co-founded {{em|Economists for Brexit}}, now morphed into [[Economists for Free Trade]].|png=Economists-for-Free-Trade.png|w=81|h=25}}
{{Cols tline| |Council, [[Centre for Policy Studies]].|png=Centre-for-Policy-Studies-opt.svg|w=25|h=25}}
{{Cols tline|2011-|Advisory Council, [[Reform]]|png=Reform-opt.svg|w=31|h=25}}
... ...
}}