Difference between revisions of "Grid"
From Gulf of Fallen Stars
Line 13: | Line 13: | ||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
-->{{#vardefine:cols|{{{cols|3}}}}}<!-- | -->{{#vardefine:cols|{{{cols|3}}}}}<!-- | ||
− | -->{{#ifeq: {{#var:cols}}|1|{{#vardefine:width| | + | -->{{#ifeq: {{#var:cols}}|1|{{#vardefine:width|100%}}{{#vardefine:minwidth|99%}}}}<!-- |
− | -->{{#ifeq: {{#var:cols}}|2|{{#vardefine:width| | + | -->{{#ifeq: {{#var:cols}}|2|{{#vardefine:width|50%}}{{#vardefine:minwidth|350px}}}}<!-- |
− | -->{{#ifeq: {{#var:cols}}|3|{{#vardefine:width| | + | -->{{#ifeq: {{#var:cols}}|3|{{#vardefine:width|33%}}{{#vardefine:minwidth|350px}}}}<!-- |
− | -->{{#ifeq: {{#var:cols}}|4|{{#vardefine:width| | + | -->{{#ifeq: {{#var:cols}}|4|{{#vardefine:width|25%}}{{#vardefine:minwidth|262px}}}}<!-- |
-->{{#if:{{{border|}}}<!-- | -->{{#if:{{{border|}}}<!-- | ||
Line 27: | Line 27: | ||
-->{{#if:{{{center|}}}|{{#vardefine:textstyle|text-align:center;padding:20px;}}|{{#vardefine:textstyle|padding:10px;}}}}<!-- | -->{{#if:{{{center|}}}|{{#vardefine:textstyle|text-align:center;padding:20px;}}|{{#vardefine:textstyle|padding:10px;}}}}<!-- | ||
− | -->{{#ifeq:{{{type}}}|begin|<div style="display:inline-table;width:{{#var:width}};min-width:{{#var:minwidth}};{{#var:boxstyle}}background-color:{{#var:background}};{{#var:textstyle}}">|}}<!-- | + | -->{{#ifeq:{{{type}}}|begin|<div style="display:inline-table;width:{{#var:width}};min-width:{{#var:minwidth}};"><div style="{{#var:boxstyle}}background-color:{{#var:background}};{{#var:textstyle}}">|}}<!-- |
− | -->{{#ifeq:{{{type}}}|div|</div><div style="display:inline-table;width:{{#var:width}};min-width:{{#var:minwidth}};{{#var:boxstyle}}background-color:{{#var:background}};{{#var:textstyle}}">|}}<!-- | + | -->{{#ifeq:{{{type}}}|div|</div></div><div style="display:inline-table;width:{{#var:width}};min-width:{{#var:minwidth}};"><div style="{{#var:boxstyle}}background-color:{{#var:background}};{{#var:textstyle}}">|}}<!-- |
− | -->{{#ifeq:{{{type}}}|end|</div>|}} | + | -->{{#ifeq:{{{type}}}|end|</div></div>|}} |
Revision as of 09:43, 20 January 2020
Parameters
type(required): begin / div / end
cols(default 3): number of columns on widest screen
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