User:DoubleYou/Sandbox/Alert small: Difference between revisions
(Created page with "<includeonly>{| class="alertSmall" style="width:{{#if:{{{size|}}}|{{#switch:{{lc:{{{size|}}}}} |max=70 |mid=50 |min=30 |#default={{{size}}}}}|70}}%;border-color:#{{#switch:{{l...") |
mNo edit summary |
||
Line 36: | Line 36: | ||
|warning=Warning | |warning=Warning | ||
|#default=Notice}}: || {{{text}}} | |#default=Notice}}: || {{{text}}} | ||
|}</includeonly><noinclude>__NOTOC__ | |}</includeonly><noinclude>__NOTOC__ | ||
{{#css: | {{#css: |
Latest revision as of 00:50, February 20, 2021
{{#css:
.alertSmall{
border-style: solid;
border-width: 1px 0;
display: inline-block;
margin: 0.5rem 1rem 0.5rem 2rem;
vertical-align: middle;
}
.alertSmall td{ padding-right: 1rem; }
.alertTypeSmall{ font-size: large; font-weight: bold; white-space: nowrap; } }}
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: max/70%
- 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%
Examples
Default Call
The simplest call returns defaults for the template (size=70%, solid border).
- Code:
{{User:DoubleYou/Sandbox/Alert small|text=Your text here.}}
- Result:
Notice: | Your text here. |
Spanning multiple lines will retain middle vertical alignment.
Types
The simplest call returns defaults for the template (size=70%, solid border).
- Code:
{{User:DoubleYou/Sandbox/Alert small|type=bug|text=Your text here.}}
- Result:
Bug: | Your text here. |
Sizes
Explicitly define a size (%) using either a keyword or an integer between 0 - 100.
- Code:
{{User:DoubleYou/Sandbox/Alert small|type=notice|size=mid|text=Your text here.}}
- Code:
{{User:DoubleYou/Sandbox/Alert small|type=notice|size=23|text=Your text here.}}
- Results:
Notice: | Your text here. |
Notice: | Your text here. |
Listings
Using it within a list!
- TextHere
Notice: | Your text here. |
- One more item here.
- ...it just keeps going!
All Examples
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
- 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).