Template:Section: Difference between revisions
From Elwiki
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
| key | | key | ||
| value | | value | ||
| {{#ifexpr:{{#if:{{#var:value|}}|1|0}} and {{Isnumeric|{{#var:key|}}}}|<th style="width:{{{Width{{#var:key|}}|{{{Width|}}}}}}; {{#ifeq:{{#var:key|}}|0||border-left: 1px #000 solid;}}border-bottom: 1px #000 solid; background-color:{{{Color{{#var:key|}}|{{{Color|}}}}}}; background-image: linear-gradient(to bottom, #eee, {{{Color{{#var:key|}}|{{{Color|}}}}}});{{{TitleSty|}}};{{{TitleSty{{#var:key|}}|}}}" {{{Attr{{#var:key|}}|}}} | | {{#ifexpr:{{#if:{{#var:value|}}|1|0}} and {{Isnumeric|{{#var:key|}}}}|<th style="width:{{{Width{{#var:key|}}|{{{Width|}}}}}}; {{#ifeq:{{#var:key|}}|0||border-left: 1px #000 solid;}}border-bottom: 1px #000 solid; background-color:{{{Color{{#var:key|}}|{{{Color|}}}}}}; background-image: linear-gradient(to bottom, #eee, {{{Color{{#var:key|}}|{{{Color|}}}}}});{{{TitleSty|}}};{{{TitleSty{{#var:key|}}|}}}" {{{Attr{{#var:key|}}|}}}>{{#var:value|}}</th>}}}}</tr> | ||
<tr style="width: 100%; vertical-align: top;{{{Styles|}}}">{{#forargs:Title | <tr style="width: 100%; vertical-align: top;{{{Styles|}}}">{{#forargs:Title | ||
| key | | key | ||
| value | | value | ||
| {{#ifexpr:{{#if:{{#var:value|}}|1|0}} and {{Isnumeric|{{#var:key|}}}}|<td id="{{#var:key}}" style="padding: 0.5em;{{{Style|}}};{{{Style{{#var:key|}}|}}}">{{{Content{{#var:key|}}|}}}</td>}}}}</tr> | | {{#ifexpr:{{#if:{{#var:value|}}|1|0}} and {{Isnumeric|{{#var:key|}}}}|<td id="{{#var:key}}" style="padding: 0.5em;{{{Style|}}};{{{Style{{#var:key|}}|}}}">{{{Content{{#var:key|}}|}}}</td>}}}}</tr> | ||
</table></includeonly><noinclude>{{DISPLAYTITLE: | </table></includeonly><noinclude>{{DISPLAYTITLE:Section}} | ||
{{Section | {{Section | ||
| Color0=lightgreen | | Color0=lightgreen | ||
| Title0= | | Title0=Section Template | ||
| Content0= | | Content0=Section is an UI template developed by '''[[User:boxsnake|boxsnake]]''', in order to enhance the UI design. Also, this is an example of Section | ||
}} | }} | ||
{{Section | {{Section | ||
| Color0=purple | | Color0=purple | ||
| Title0= | | Title0=Parameters | ||
| Content0=<span> | | Content0=<span> | ||
# | # ''Section'' only have one row, but can have as many columns as you want. More columns takes more time. | ||
# | #* If you want more than one rows, more than one ''Section'' will help. | ||
# | # If parameter(s) starting with '''Title''' and following by numbers (e.g. '''Title0''') is/are specified, the corresponding column(s) will be added. | ||
#* Note every column except '''Title0''' has left border, in order to be extended from the left column. | |||
# Parameters for '''<u>Table</u>''' (Whole ''Section''): | |||
## '''SectionSty''' - CSS syntax style for ''Section''. | |||
## '''Attr''' - HTML syntax for ''Section''. | |||
## '''Widths''' - CSS syntax width for ''Section''. Default: '''100%'''. | |||
# Parameters for '''<u>Headlines</u>''' (where '''Title''' goes): | |||
## '''TitleStys''' - CSS syntax style for whole headline. | |||
## '''TitleSty''' - CSS syntax style for every header cell. | |||
## '''TitleSty###''' - CSS syntax style for header of '''Title###'''. | |||
## '''Color''' - CSS syntax color for all headers. | |||
## '''Color###''' - CSS syntax color for header of '''Title###'''. | |||
## '''Attr###''' - HTML syntax for header of '''Title###'''. | |||
## '''Title###''' - Content in header of '''Title###'''. | |||
# Parameters for '''<u>Contents</u>''': | |||
## '''Styles''' - CSS syntax style for whole content. | |||
## '''Style''' - CSS syntax style for every cell of content. | |||
## '''Style###''' - CSS syntax style for content corresponding to '''Title###'''. | |||
## '''Content###''' - Content in cell of '''Title###'''. | |||
# Parameters for '''<u>Columns</u>''': | |||
## '''Width''' - CSS syntax width of every column. | |||
## '''Width###''' - CSS syntax width of column of '''Title###'''. | |||
# Generally, styles will override ancestor styles. For example, '''''TitleStys''''' overrides '''''SectionSty''''', and '''''TitleSty''''' overrides both '''''TitleStys''''' and '''''SectionSty''''', and '''''TitleSty###''''' overrides all the three. | |||
# If you want table and (un)ordered lists in contents, use '''<span<nowiki/>>''' tag or '''<nowiki><span style="display:none">{{</span>...<span style="display:none">}}</span></nowiki>''' to escape (wrap) the code. | |||
# To be extended from other ''Section'' templates upwards, this template has no bottom border originally, use ''SectionSty'' to specify it if needed. | |||
# The lines under each header are stated in '''''TitleSty''''' or '''''TitleSty###''''' rather than '''''TitleStys'''''. | |||
# Default padding in headlines and contents is 0.5em. | |||
</span> | </span> | ||
}} | }} | ||
Line 92: | Line 52: | ||
| SectionSty=border-bottom: 1px #000 solid; | | SectionSty=border-bottom: 1px #000 solid; | ||
| Color0=green | | Color0=green | ||
| Title0= | | Title0=Other Samples | ||
| Content0= | | Content0= | ||
{{Section | {{Section | ||
| SectionSty=border: 2px #ccc solid; border-radius: 5px; | | SectionSty=border: 2px #ccc solid; border-radius: 5px; | ||
| Color0=lightblue | | Color0=lightblue | ||
| Title0= | | Title0=Sample 1 | ||
| Content0= | | Content0=Sample 1 | ||
}}<pre> | }}<pre> | ||
{{Section | {{Section | ||
| SectionSty=border: 2px #ccc solid; border-radius: 5px; | | SectionSty=border: 2px #ccc solid; border-radius: 5px; | ||
| Color0=lightblue | | Color0=lightblue | ||
| Title0= | | Title0=Sample 1 | ||
| Content0= | | Content0=Sample 1 | ||
}}</pre> | }}</pre> | ||
}}</noinclude> | }}</noinclude> |
Revision as of 04:09, 24 September 2014
Section Template |
---|
Section is an UI template developed by boxsnake, in order to enhance the UI design. Also, this is an example of Section |
Parameters |
---|
|
Other Samples | ||
---|---|---|
{{Section | SectionSty=border: 2px #ccc solid; border-radius: 5px; | Color0=lightblue | Title0=Sample 1 | Content0=Sample 1 }} |