Template:Section: Difference between revisions

From Elwiki
mNo edit summary
m (Add heading param description.)
Line 50: Line 50:
# Default padding in headlines and contents is 0.5em.
# Default padding in headlines and contents is 0.5em.
# Link anchor can link to ''Section'' headers. (e.g. <nowiki>[[7-4#Mobs:|'''Mobs''']]</nowiki> can link to 7-4's Mobs section.)
# Link anchor can link to ''Section'' headers. (e.g. <nowiki>[[7-4#Mobs:|'''Mobs''']]</nowiki> can link to 7-4's Mobs section.)
# Add heading=true if you want the ''Section'' headers to be h2 tags. Otherwise, the headers will be spans.
# You need __<nowiki/>TOC__ to show TOC of the Sections.
# You need __<nowiki/>TOC__ to show TOC of the Sections.
</span>
</span>

Revision as of 21:49, 6 October 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

  1. 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.
  2. 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.
  3. Parameters for Table (Whole Section):
    1. SectionSty - CSS syntax style for Section.
    2. Attr - HTML syntax for Section.
    3. Widths - CSS syntax width for Section. Default: 100%.
  4. Parameters for Headlines (where Title goes):
    1. TitleStys - CSS syntax style for whole headline.
    2. TitleSty - CSS syntax style for every header cell.
    3. TitleSty### - CSS syntax style for header of Title###.
    4. Color - CSS syntax color for all headers.
    5. Color### - CSS syntax color for header of Title###.
    6. Attr### - HTML syntax for header of Title###.
    7. Title### - Content in header of Title###.
  5. Parameters for Contents:
    1. Styles - CSS syntax style for whole content.
    2. Style - CSS syntax style for every cell of content.
    3. Style### - CSS syntax style for content corresponding to Title###.
    4. Content### - Content in cell of Title###.
  6. Parameters for Columns:
    1. Width - CSS syntax width of every column.
    2. Width### - CSS syntax width of column of Title###.
  7. Generally, styles will override ancestor styles. For example, TitleStys overrides SectionSty, and TitleSty overrides both TitleStys and SectionSty, and TitleSty### overrides all the three.
  8. If you want table and (un)ordered lists in contents, use <span> tag or <span style="display:none">{{</span>...<span style="display:none">}}</span> to escape (wrap) the code.
  9. To be extended from other Section templates upwards, this template has no bottom border originally, use SectionSty to specify it if needed.
  10. The lines under each header are stated in TitleSty or TitleSty### rather than TitleStys.
  11. Default padding in headlines and contents is 0.5em.
  12. Link anchor can link to Section headers. (e.g. [[7-4#Mobs:|'''Mobs''']] can link to 7-4's Mobs section.)
  13. Add heading=true if you want the Section headers to be h2 tags. Otherwise, the headers will be spans.
  14. You need __TOC__ to show TOC of the Sections.

Other Samples

Sample 1
Sample 1
{{Section
| SectionSty=border: 2px #ccc solid; border-radius: 5px;
| Color0=lightblue
| Title0=Sample 1
| Content0=Sample 1
}}