Template:AlertSmall: Difference between revisions
From Step Mods | Change The Game
No edit summary |
mNo edit summary |
||
Line 9: | Line 9: | ||
|notice=blue | |notice=blue | ||
|warning=red | |warning=red | ||
|#default=blue}}}}{| class=" | |#default=blue}}}}{| class="stepalertsm {{{borderColor|{{#var:color}}}}}bd" style="width:{{#if:{{{size|}}}|{{#switch:{{lc:{{{size|}}}}} | ||
|max=70 | |max=70 | ||
|mid=50 | |mid=50 | ||
|min=30 | |min=30 | ||
|#default={{{size}}}}}| | |#default={{{size}}}}}%|auto}};" | ||
! [[File:{{#switch:{{lc:{{{icon|{{{type}}}}}}}} | ! [[File:{{#switch:{{lc:{{{icon|{{{type}}}}}}}} | ||
|bug=Bug-Logo.png | |bug=Bug-Logo.png | ||
Line 62: | Line 62: | ||
; size | ; size | ||
: Defined: <code>size=''value''</code> | : Defined: <code>size=''value''</code> | ||
: Default: | : Default: auto | ||
: Determines the width by percentage. Accepts any integer from 0 - 100, but standard sizes are preferred using the appropriate keyword: | : Determines the width by percentage. Accepts any integer from 0 - 100, but standard sizes are preferred using the appropriate keyword: | ||
:* min - 35% | :* min - 35% |
Revision as of 03:03, January 16, 2021
Purpose & Usage[edit source]
This template displays a small alert on the page that can be used inline within lists and lines of text, however, it will still block itself out from the text to a degree.
Required Parameters[edit source]
- type
- Defined:
type=keyword
- Defines the type of alert to display. Keywords available are:
- bug
- construction
- fo3
- fnv
- loot
- mcm
- mo
- notice
- warning
- text
- Defined:
text=ContentHere
- Defines the content of the alert.
Optional Parameters[edit source]
- size
- Defined:
size=value
- Default: auto
- Determines the width by percentage. Accepts any integer from 0 - 100, but standard sizes are preferred using the appropriate keyword:
- min - 35%
- mid - 55%
- max - 70%
- icon
- Defined:
icon=image.png
- Default: Info-Logo.png
- Sets the icon image. This is set automatically if using one of the predefined types, but can be overridden here.
- borderColor
- Defined:
borderColor=keyword
- Defines the color of the border. This is set automatically if using one of the predefined types, but can be overridden here. Keywords available are:
- magent
- purple
- blue
- green
- chartr
- yellow
- orange
- salmon
- red
Examples[edit source]
Default Call[edit source]
The simplest call returns defaults for the template (size=70%, solid border).
- Code:
{{AlertSmall|text=Your text here.}}
- Result:
Notice: | Your text here. |
---|
Spanning multiple lines will retain middle vertical alignment.
Types[edit source]
The simplest call returns defaults for the template (size=70%, solid border).
- Code:
{{AlertSmall|type=bug|text=Your text here.}}
- Result:
Bug: | Your text here. |
---|
Sizes[edit source]
Explicitly define a size (%) using either a keyword or an integer between 0 - 100.
- Code:
{{AlertSmall|type=notice|size=mid|text=Your text here.}}
- Code:
{{AlertSmall|type=notice|size=23|text=Your text here.}}
- Results:
Notice: | Your text here. |
---|
Notice: | Your text here. |
---|
Listings[edit source]
Using it within a list!
- TextHere
Notice: | Your text here. |
---|
- One more item here.
- ...it just keeps going!
All Examples[edit source]
Bug: | Your text here. |
---|
Under Construction: | Your text here. |
---|
Fallout 3 Specific: | Your text here. |
---|
Fallout NV Specific: | Your text here. |
---|
LOOT: | Your text here. |
---|
MCM: | Your text here. |
---|
MO Users: | Your text here. |
---|
Notice: | Your text here. |
---|
Warning: | Your text here. |
---|
Related Templates[edit source]
- Template:Alert - A larger version of this Template to be used for a more obvious visual reference (will NOT work in lists as this version does).