Template:AlertSmall: Difference between revisions
From Step Mods | Change The Game
TechAngel85 (talk | contribs) No edit summary |
mNo edit summary |
||
Line 9: | Line 9: | ||
|notice=blue | |notice=blue | ||
|warning=red | |warning=red | ||
|#default=blue}}}} | |#default=blue}}}}<div 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}}}}}%|auto}};" | |#default={{{size}}}}}%|auto}};"><div style="display:table-cell;vertical-align:middle;"><span style="color:#ddd;font-size:1.12em;"><div style="position:absolute;">[[File:{{#switch:{{lc:{{{icon|{{{type}}}}}}}} | ||
|bug=Bug-Logo.png | |bug=Bug-Logo.png | ||
|construction=Weapon.png | |construction=Weapon.png | ||
Line 24: | Line 23: | ||
|notice=Info-Logo.png | |notice=Info-Logo.png | ||
|warning=Warning-Logo.png | |warning=Warning-Logo.png | ||
|#default= | |#default=Info-Logo.png}}|20px]]</div> '''{{#switch:{{lc:{{{alertHeader|{{{type}}}}}}}} | ||
|bug=Bug | |bug=Bug | ||
|construction=Under Construction | |construction=Under Construction | ||
Line 34: | Line 33: | ||
|notice=Notice | |notice=Notice | ||
|warning=Warning | |warning=Warning | ||
|#default=Notice}}: | |#default=Notice}}:'''</span></div><div style="display:table-cell;padding: 0 0.5em;vertical-align:middle;"><span style="color:#cacaca;">{{{text|}}}</span></div></div></includeonly><noinclude>__NOTOC____NOTITLE__[[Category:Notification Templates]] | ||
== Purpose & Usage == | == Purpose & Usage == |
Revision as of 03:10, March 23, 2021
Purpose & Usage
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
- 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
- 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
Default Call
The simplest call returns defaults for the template (size=70%, solid border).
- Code:
{{AlertSmall|text=Your text here.}}
- Result:
Spanning multiple lines will retain middle vertical alignment.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum pretium tellus nec scelerisque. Nam nisi magna, venenatis at nibh quis, consequat pretium velit. Mauris fringilla mollis molestie. Fusce tellus justo, tempor id efficitur non, dapibus eu nunc. Integer nec hendrerit diam. Quisque aliquet nunc id vestibulum tincidunt. Vivamus dictum rutrum dolor auctor commodo. Donec consequat sed quam sed malesuada. Nunc tristique a tellus quis egestas. Sed iaculis risus odio, sit amet gravida orci facilisis sed. Donec sem leo, viverra ac elit eget, posuere bibendum velit. Nunc diam est, pellentesque vitae finibus et, iaculis non lorem. Quisque ullamcorper augue non tellus vehicula dictum.
Types
The simplest call returns defaults for the template (size=70%, solid border).
- Code:
{{AlertSmall|type=bug|text=Your text here.}}
- Result:
Sizes
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:
Listings
Using it within a list!
- TextHere
- One more item here.
- ...it just keeps going!
All Examples
Related Templates
- 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).