Actions

Template

Difference between revisions of "Grid"

From Gulf of Fallen Stars

 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
'''type(required):''' begin / div / end ("nl" can be used instead of div, if you want a newline in the grid)
 
'''type(required):''' begin / div / end ("nl" can be used instead of div, if you want a newline in the grid)
  
'''cols(default 3):''' number of columns on widest screen
+
'''cols(default 3):''' number of columns on widest screen. If set to 0, width/number columns is not defined.
  
 
'''ignoreminwidth(default false):''' columns will have no minimum width
 
'''ignoreminwidth(default false):''' columns will have no minimum width
Line 17: Line 17:
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
-->{{#vardefine:cols|{{{cols|3}}}}}<!--
 
-->{{#vardefine:cols|{{{cols|3}}}}}<!--
 +
-->{{#ifeq: {{#var:cols}}|0|{{#vardefine:width|auto}}{{#vardefine:minwidth|0}}}}<!--
 
-->{{#ifeq: {{#var:cols}}|1|{{#vardefine:width|100%}}{{#vardefine:minwidth|100%}}}}<!--
 
-->{{#ifeq: {{#var:cols}}|1|{{#vardefine:width|100%}}{{#vardefine:minwidth|100%}}}}<!--
 
-->{{#ifeq: {{#var:cols}}|2|{{#vardefine:width|49%}}{{#vardefine:minwidth|500px}}}}<!--
 
-->{{#ifeq: {{#var:cols}}|2|{{#vardefine:width|49%}}{{#vardefine:minwidth|500px}}}}<!--
Line 42: Line 43:
 
-->{{#ifeq:{{{type}}}|begin|{{#var:startdivs}}}}<!--
 
-->{{#ifeq:{{{type}}}|begin|{{#var:startdivs}}}}<!--
 
-->{{#ifeq:{{{type}}}|div|{{#var:enddivs}}{{#var:startdivs}}|}}<!--
 
-->{{#ifeq:{{{type}}}|div|{{#var:enddivs}}{{#var:startdivs}}|}}<!--
-->{{#ifeq:{{{type}}}|nl|{{#var:enddivs}}<wbr>{{#var:startdivs}}|}}<!--
+
-->{{#ifeq:{{{type}}}|nl|{{#var:enddivs}}
 +
<wbr>
 +
{{#var:startdivs}}|}}<!--
 
-->{{#ifeq:{{{type}}}|end|{{#var:enddivs}}}}
 
-->{{#ifeq:{{{type}}}|end|{{#var:enddivs}}}}

Latest revision as of 21:56, 10 March 2020

Parameters

type(required): begin / div / end ("nl" can be used instead of div, if you want a newline in the grid)

cols(default 3): number of columns on widest screen. If set to 0, width/number columns is not defined.

ignoreminwidth(default false): columns will have no minimum width

border(default false): whether the box should have a border

background(default transparent): the background of the grid cell. Defaults to white if border is true.

center(default false): center the text in the div

nomargin(default false): Overrides all margins and padding to 0