Difference between revisions of "Template:TableTop"

From Nookipedia, the Animal Crossing wiki
m (Restylized table. Header color parameter removed as headers are no longer colored.)
(Adding color control via CSS classes)
Line 1: Line 1:
<div class="{{#if: {{{collapsible|}}} | mw-collapsible | }} {{#if: {{{collapsed|}}} | mw-collapsed | }}" style="margin:auto; width:100%; background:{{{bg-color|#FFDD66}}}; padding: 7px; text-align:center; border-radius: 16px;">
+
<div class="table-{{{color|furniture}}} {{#if: {{{collapsible|}}} | mw-collapsible | }} {{#if: {{{collapsed|}}} | mw-collapsed | }}" style="margin:auto; width:100%; background:{{{bg-color|#FFDD66}}}; padding: 7px; text-align:center; border-radius: 16px;">
 
<span style="text-align: center; font-weight: 600; padding:8px 0 10px 10px; font-size:1.05em;">{{{title|Please enter a table title}}}</span>
 
<span style="text-align: center; font-weight: 600; padding:8px 0 10px 10px; font-size:1.05em;">{{{title|Please enter a table title}}}</span>
 
{{#if: {{{collapsible|}}} | <div class{{=}}"mw-collapsible-content"> | }}
 
{{#if: {{{collapsible|}}} | <div class{{=}}"mw-collapsible-content"> | }}
Line 9: Line 9:
 
! {{Colorshow|515151|{{{column{{#var: key }}|}}}}}
 
! {{Colorshow|515151|{{{column{{#var: key }}|}}}}}
 
}}
 
}}
{{!}}-<noinclude>
+
{{!}}- class="table-{{{color|furniture}}}-row" |<noinclude>
 
|}
 
|}
 
</div>
 
</div>
Line 16: Line 16:
 
<pre>
 
<pre>
 
{{TableTop
 
{{TableTop
|bg-color       = (default is #FFDD66)
+
|color         = furniture, bug, or fish (default is furniture)
 
|title          =  
 
|title          =  
 
|collapsible    = (default is not collapsible)
 
|collapsible    = (default is not collapsible)

Revision as of 04:29, June 21, 2020

Please enter a table title

Usage

{{TableTop
|color          = furniture, bug, or fish (default is furniture)
|title          = 
|collapsible    = (default is not collapsible)
|collapsed      = (default is not collapsed)
|sortable       = (default is not sortable)
|column1        =
|column2        =
...
|columnX        =
}}