Template:Alert: Difference between revisions
From Step Mods | Change The Game
mNo edit summary |
TechAngel85 (talk | contribs) (Separated the values more distinctly. Added ''Starfield'' as the first game parameter. Added small images to the ''Icon Optional'' list. Fixed the broken ''Including Lists'' example.) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:color|{{#switch:{{lc:{{{type|}}}}} | <includeonly>{{#vardefine:color|{{#switch:{{lc:{{{type|}}}}} | ||
|bug= | |bug=mutegreen | ||
|construction= | |wip | ||
|mcm= | |construction=muteorange | ||
|mo= | |loot=muteyellow | ||
|notice= | |mcm=mutesalmon | ||
|warning= | |mo2 | ||
|#default= | |mo=mutepurple | ||
|note | |||
|notice=muteblue | |||
|starfield=muteblue | |||
|warn | |||
|warning=mutered | |||
|#default=muteblue}}}}<div class="{{{bgcolor|{{#var:color}}}}}bg d-flex mx-5 my-3 stepalert neutbd hltx">[[File:{{#switch:{{{icon|{{lc:{{{type}}}}}}}} | |||
|bug=Bug-Logo.png | |bug=Bug-Logo.png | ||
|wip | |||
|construction=Weapon.png | |construction=Weapon.png | ||
|loot=loot.png | |||
|mcm=Mcmicon1.png | |mcm=Mcmicon1.png | ||
|mo2 | |||
|mo=Moicon.png | |mo=Moicon.png | ||
|note | |||
|notice=Info-Logo.png | |notice=Info-Logo.png | ||
|starfield=StarfieldIcon.png | |||
|warn | |||
|warning=Warning-Logo.png | |warning=Warning-Logo.png | ||
|#default={{{icon|Info-Logo.png}}}}}| | |#default={{{icon|Info-Logo.png}}}}}|35px]]<div class="ml-2"><p class="h4">'''{{#switch:{{{type|}}} | ||
|bug= | |bug=BUG | ||
|construction= | |wip | ||
|mcm= | |construction=WIP | ||
|mo= | |loot=LOOT | ||
|notice= | |mcm=MCM | ||
|warning= | |mo2 | ||
|#default= | |mo=MO2 | ||
|note | |||
|notice=NOTE | |||
|starfield=Starfield | |||
</includeonly><noinclude>__NOTOC__[[Category:Notification Templates]] | |warn | ||
|warning=WARNING | |||
|#default=NOTE}}'''</p> | |||
{{{text}}}</div></div></includeonly><noinclude>__NOTOC__[[Category:Notification Templates]][https://stepmodifications.org/forum/topic/15292-alert/ '''Forum Topic'''] | |||
== Purpose & Usage == | == Purpose & Usage == | ||
This template displays a | This template displays a standard and prominent alert message. This alert should be used sparingly and is NOT intended for use within lists. For brief and prominent alerts suitable for use within lists, use [[:Template:AlertSmall]] instead. | ||
=== Required Parameters === | === Required Parameters === | ||
<span class="salmontx">'''type'''</span> - Sets the type of alert, which dictates icon and color | |||
: '''General Values''' | |||
:: Default: <code>type=notice</code> | |||
: | :* ''bug'' | ||
::* ''' | :* ''note'' or ''notice'' | ||
:* ''warn'' or ''warning'' | |||
:* ''wip'' or ''construction'' - work in progress | |||
: | : '''Tool Values''' | ||
::* ''' | :* loot - LOOT | ||
:* mcm - Mod Confuguration Manager | |||
:* mo - Mod Organizer | |||
: '''Game Values''' | |||
:* starfield - Starfield | |||
<span class="salmontx">'''text'''</span> - The alert message | |||
: | : '''Values''' | ||
:: Default: <span class="orangetx">''none''</span> | |||
:: <code>text=''ContentHere''</code> | |||
=== Optional Parameters === | === Optional Parameters === | ||
<span class="salmontx">'''icon'''</span> - Determines the icon used. | |||
:: ''There is no reason to include this unless a custom alert is being created, in which case it would be best to expand the template to include the custom alert; to be determined on a case by case basis.'' | |||
: | |||
: '''General Values''' | |||
: | :: Default: <code>icon=notice</code> | ||
: | :* ''bug'' = [[File:Bug-Logo.png|20px|]] | ||
: | :* ''note'' or ''notice'' = [[File:Info-Logo.png|20px|]] | ||
:* ''warn or ''warning = [[File:Warning-Logo.png|20px|]] | |||
:* ''wip'' or ''construction'' = [[File:Weapon.png|20px|]] | |||
: '''Tool Values''' | |||
:* ''loot'' = [[File:loot.png|20px|]] | |||
:* ''mcm'' = [[File:Mcmicon1.png|20px|]] | |||
:* ''mo'' = [[File:Moicon.png|20px|]] | |||
: '''Game Values''' | |||
:* starfield = [[File:StarfieldIcon.png|20px|]] | |||
== Examples == | ==Examples== | ||
=== | ===Default Call=== | ||
The simplest call returns defaults for the template. | |||
: '''Code:''' | : '''Code:''' <code><nowiki>{{Alert|text=Your text here.}}</nowiki></code> | ||
: '''Result:''' | : '''Result:''' | ||
{{Alert | {{Alert|text=Your text here.}} | ||
{{Alert|text=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.}} | |||
... | |||
=== | === Including Lists === | ||
: '''Code:''' | : '''Code:''' | ||
<pre>{{Alert|text=Using wiki markup like lists with this alert is appropriate. | |||
# For numbered | |||
#* Bulleted | |||
#: or mixed lists | |||
Behavior should mimic body text.}}</pre> | |||
: '''Result:''' | : '''Result:''' | ||
{{Alert | {{Alert|text=Using wiki markup like lists with this alert is appropriate. | ||
# For numbered | |||
#* Bulleted | |||
#: or mixed lists | |||
Behavior should mimic body text.}} | |||
=== | === Types === | ||
: '''Code:''' | The simplest call returns defaults for the template. | ||
: '''Code:''' <code><nowiki>{{Alert|type=bug|text=Your text here.}}</nowiki></code> | |||
: '''Result:''' | : '''Result:''' | ||
{{Alert|type=construction|text= | {{Alert|type=bug|text=Bug message}} | ||
{{Alert|type=warn|text=Warning message}} | |||
{{Alert|type=wip|text=Under construction (WIP) message}} | |||
{{Alert|type=loot|text=Loot-specific message}} | |||
{{Alert|type=mcm|text=MCM-specific message}} | |||
{{Alert|type=mo|text=MO-specific message}} | |||
{{Alert|type=starfield|text=Starfield-specific message}} | |||
=== | == Related Templates == | ||
*[[:Template:AlertSmall]] - A more subtle version suitable for brief messages or messages within lists. | |||
: | |||
</noinclude> | |||
Latest revision as of 03:38, November 9, 2023
Purpose & Usage[edit source]
This template displays a standard and prominent alert message. This alert should be used sparingly and is NOT intended for use within lists. For brief and prominent alerts suitable for use within lists, use Template:AlertSmall instead.
Required Parameters[edit source]
type - Sets the type of alert, which dictates icon and color
- General Values
- Default:
type=notice
- bug
- note or notice
- warn or warning
- wip or construction - work in progress
- Default:
- Tool Values
- loot - LOOT
- mcm - Mod Confuguration Manager
- mo - Mod Organizer
- Game Values
- starfield - Starfield
text - The alert message
- Values
- Default: none
text=ContentHere
Optional Parameters[edit source]
icon - Determines the icon used.
- There is no reason to include this unless a custom alert is being created, in which case it would be best to expand the template to include the custom alert; to be determined on a case by case basis.
- General Values
- Default:
icon=notice
- Default:
- Tool Values
- Game Values
Examples[edit source]
Default Call[edit source]
The simplest call returns defaults for the template.
- Code:
{{Alert|text=Your text here.}}
- Result:
NOTE
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.Including Lists[edit source]
- Code:
{{Alert|text=Using wiki markup like lists with this alert is appropriate. # For numbered #* Bulleted #: or mixed lists Behavior should mimic body text.}}
- Result:
NOTE
Using wiki markup like lists with this alert is appropriate.
- For numbered
- Bulleted
- or mixed lists
Types[edit source]
The simplest call returns defaults for the template.
- Code:
{{Alert|type=bug|text=Your text here.}}
- Result:
Related Templates[edit source]
- Template:AlertSmall - A more subtle version suitable for brief messages or messages within lists.