Template:ShroomTocIcon: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
('Shroom release) |
m (Prep for Issue 200) |
||
Line 1: | Line 1: | ||
<includeonly><div class="shroom-toc-icon icon {{{class|}}}">[[File:{{{image}}}|x128px|link={{{link|#{{{title}}}}}}|{{{title}}}]] | <includeonly><div class="shroom-toc-icon {{#if:{{{image|}}}|icon|button}} {{{class|}}}">{{#if:{{{image|}}} | ||
|[[File:{{{image}}}|x128px|link={{{link|#{{{title}}}}}}|{{{title}}}]] | |||
|[[{{{link|#{{{title}}}}}}|{{{title}}}]] | |||
<div class="button" aria-hidden="true">{{#if:{{{bg-image|}}}|[[File:{{{bg-image}}}|{{{bg-width|224}}}px|link=|class=bg {{#switch:{{{bg-align|cr}}}|tl|tc|tr=a-top|bl|bc|bl=a-bottom|#default=}} {{#switch:{{{bg-align|cr}}}|tl|cl|bl=a-left|tr|cr|br=a-right|#default=}}|alt=|]]|<div class="shroombg v2 {{{class|}}}"></div>}} | |||
<div class="fg" style="top: {{{fg-top|-2px}}}; right: {{{fg-right|-30px}}}">[[File:{{{fg-image|}}}|{{{fg-width|150}}}px|link=|alt=|]]</div> | |||
<div class=title data-label="{{{title}}}" {{#if:{{{title-size|}}}|style="font-size: {{{title-size}}}"|}}></div></div>}} | |||
{{#if:{{{description|}}}|<div class="icon-description">{{{description}}}</div>|}}</div></includeonly><noinclude> | |||
This is the template for individual icon items in tables of contents for The 'Shroom. Should be used within {{tem|ShroomToc}}. | This is the template for individual icon items in tables of contents for The 'Shroom. Should be used within {{tem|ShroomToc}}. | ||
{| class=wikitable | {| class=wikitable | ||
|+ Any icon type | |||
! Parameter | ! Parameter | ||
! Description | ! Description | ||
|- | |- | ||
| <code>title</code>* | | <code>title</code>* | ||
Line 20: | Line 23: | ||
|- | |- | ||
| <code>class</code> | | <code>class</code> | ||
| Optional parameter to give a CSS class to this item. Primarily for setting team styles on pages other than that team, | | Optional parameter to give a CSS class to this item. Primarily for setting team styles on pages other than that team. | ||
|} | |||
<nowiki>*</nowiki> Required | |||
{| class=wikitable | |||
|+ Static image icons | |||
! Parameter | |||
! Description | |||
|- | |||
| <code>image</code>* | |||
| The image to be used as icon. Enter only the filename, without the ''File:'' prefix. | |||
|} | |||
<nowiki>*</nowiki> Required | |||
{| class=wikitable | |||
|+ Dynamic image icons | |||
! Parameter | |||
! Description | |||
|- | |||
| style="text-wrap:nowrap" | <code>title-size</code> | |||
| The CSS font size for the title, if it otherwise doesn't fit on one line. Defaults to somewhere around 15px. | |||
|- | |||
| <code>fg-image</code>* | |||
| The image to be used as foreground subject. Enter only the filename, without the ''File:'' prefix. | |||
|- | |||
| <code>fg-top</code> | |||
| The CSS distance from the top of the frame for foreground image. Defaults to -2px. | |||
|- | |||
| <code>fg-right</code> | |||
| The CSS distance from the right of the frame for foreground image. Defaults to -30px. | |||
|- | |||
| <code>fg-width</code> | |||
| The width of the foreground image. Defaults to 150. | |||
|- | |||
| <code>bg-image</code> | |||
| The image to be used as icon background. Enter only the filename, without the ''File:'' prefix. If not set, will default to using a <code>shroombg</code> background (this will require <code>class</code> to be set with a 'Shroom colour/theme class). | |||
|- | |||
| <code>bg-width</code> | |||
| The width of the background image. Defaults to 224. Used only with <code>bg-image</code>. | |||
|- | |||
| <code>bg-align</code> | |||
| The side to align the background image to. Format as YX, where Y is t (top), c (centre), or b (bottom), and X is one of l (left), c (centre), or r (centre). Defaults to cr (centre right). Used only with <code>bg-image</code>. | |||
|} | |} | ||
<nowiki>*</nowiki> Required | <nowiki>*</nowiki> Required | ||
[[Category:The 'Shroom templates]]</noinclude> | [[Category:The 'Shroom templates]]</noinclude> |
Latest revision as of 22:06, December 22, 2023
This is the template for individual icon items in tables of contents for The 'Shroom. Should be used within {{ShroomToc}}.
Parameter | Description |
---|---|
title *
|
The title of the section. Used as alt-text on the image. |
link
|
The section link. Optional: when not set, links to a header with the same name as the title on the current page. |
description
|
A blurb describing the listed section. |
class
|
Optional parameter to give a CSS class to this item. Primarily for setting team styles on pages other than that team. |
* Required
Parameter | Description |
---|---|
image *
|
The image to be used as icon. Enter only the filename, without the File: prefix. |
* Required
Parameter | Description |
---|---|
title-size
|
The CSS font size for the title, if it otherwise doesn't fit on one line. Defaults to somewhere around 15px. |
fg-image *
|
The image to be used as foreground subject. Enter only the filename, without the File: prefix. |
fg-top
|
The CSS distance from the top of the frame for foreground image. Defaults to -2px. |
fg-right
|
The CSS distance from the right of the frame for foreground image. Defaults to -30px. |
fg-width
|
The width of the foreground image. Defaults to 150. |
bg-image
|
The image to be used as icon background. Enter only the filename, without the File: prefix. If not set, will default to using a shroombg background (this will require class to be set with a 'Shroom colour/theme class).
|
bg-width
|
The width of the background image. Defaults to 224. Used only with bg-image .
|
bg-align
|
The side to align the background image to. Format as YX, where Y is t (top), c (centre), or b (bottom), and X is one of l (left), c (centre), or r (centre). Defaults to cr (centre right). Used only with bg-image .
|
* Required