Template:Alert: Difference between revisions

From Step Mods | Change The Game
mNo edit summary
(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.)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:color|{{#switch:{{lc:{{{type|}}}}}
<includeonly>{{#vardefine:color|{{#switch:{{lc:{{{type|}}}}}
|bug=mgreen
|bug=mutegreen
|wip
|wip
|construction=morange
|construction=muteorange
|loot=myellow
|loot=muteyellow
|mcm=msalmon
|mcm=mutesalmon
|mo2
|mo2
|mo=mpurple
|mo=mutepurple
|note
|note
|notice=mblue
|notice=muteblue
|starfield=muteblue
|warn
|warn
|warning=mred
|warning=mutered
|#default=mblue}}}}<div class="{{{bgcolor|{{#var:color}}}}}bg d-flex mx-5 my-3 stepalert neutbd hltx">[[File:{{#switch:{{{icon|{{lc:{{{type}}}}}}}}
|#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
|wip
Line 21: Line 22:
|note
|note
|notice=Info-Logo.png
|notice=Info-Logo.png
|starfield=StarfieldIcon.png
|warn
|warn
|warning=Warning-Logo.png
|warning=Warning-Logo.png
Line 33: Line 35:
|note
|note
|notice=NOTE
|notice=NOTE
|starfield=Starfield
|warn
|warn
|warning=WARNING
|warning=WARNING
|#default=NOTE}}'''</p>
|#default=NOTE}}'''</p>
{{{text}}}</div></div></includeonly><noinclude>
{{{text}}}</div></div></includeonly><noinclude>__NOTOC__[[Category:Notification Templates]][https://stepmodifications.org/forum/topic/15292-alert/ '''Forum Topic''']


== Purpose & Usage ==
== Purpose & Usage ==
Line 43: Line 46:
=== Required Parameters ===
=== Required Parameters ===
<span class="salmontx">'''type'''</span> - Sets the type of alert, which dictates icon and color
<span class="salmontx">'''type'''</span> - Sets the type of alert, which dictates icon and color
: '''Values'''
: '''General Values'''
:: Default: <code>type=notice</code>
:: Default: <code>type=notice</code>
:* bug  
:* ''bug''
:* wip or construction - work in progress
:* loot - LOOT specific
:* mcm - Mod Confuguration Manager specific
:* mo or mo2 - Mod Organizer 2 specific
:* ''note'' or ''notice''
:* ''note'' or ''notice''
:* warn or warning
:* ''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
<span class="salmontx">'''text'''</span> - The alert message
: '''Values'''
: '''Values'''
:: Default: n/a, <code>text=''ContentHere''</code>
:: Default: <span class="orangetx">''none''</span>
:: <code>text=''ContentHere''</code>


=== Optional Parameters ===
=== Optional Parameters ===
<span class="salmontx">'''icon'''</span> - Determines the icon used
<span class="salmontx">'''icon'''</span> - Determines the icon used.
: '''Values'''
:: ''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>
:: Default: <code>icon=notice</code>
:* bug  
:* ''bug'' = [[File:Bug-Logo.png|20px|]]
:* wip or construction
:* ''note'' or ''notice'' = [[File:Info-Logo.png|20px|]]
:* loot
:* ''warn or ''warning = [[File:Warning-Logo.png|20px|]]
:* mcm
:* ''wip'' or ''construction'' = [[File:Weapon.png|20px|]]
:* mo or mo2
: '''Tool Values'''
:* ''note'' or ''notice''
:* ''loot'' = [[File:loot.png|20px|]]
:* warn or warning
:* ''mcm'' = [[File:Mcmicon1.png|20px|]]
:* ''mo'' = [[File:Moicon.png|20px|]]
: '''Game Values'''
:* starfield = [[File:StarfieldIcon.png|20px|]]
 


==Examples==
==Examples==
Line 74: Line 87:
: '''Code:''' <code><nowiki>{{Alert|text=Your text here.}}</nowiki></code>
: '''Code:''' <code><nowiki>{{Alert|text=Your text here.}}</nowiki></code>
: '''Result:'''
: '''Result:'''
:: {{Alert|text=Your text here.}}
{{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.}}
{{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 ===
=== Including Lists ===
Line 83: Line 96:
#* Bulleted
#* Bulleted
#: or mixed lists
#: or mixed lists
Behavior should mimic body text.
Behavior should mimic body text.}}</pre>
}}</pre>
: '''Result:'''
: '''Result:'''
:: {{Alert|text=Using wiki markup like lists with this alert is appropriate.
{{Alert|text=Using wiki markup like lists with this alert is appropriate.
# For numbered
# For numbered
#* Bulleted
#* Bulleted
#: or mixed lists
#: or mixed lists
Behavior should mimic body text.
Behavior should mimic body text.}}
}}


=== Types ===
=== Types ===
Line 97: Line 108:
: '''Code:''' <code><nowiki>{{Alert|type=bug|text=Your text here.}}</nowiki></code>
: '''Code:''' <code><nowiki>{{Alert|type=bug|text=Your text here.}}</nowiki></code>
: '''Result:'''
: '''Result:'''
:: {{Alert|type=bug|text=Bug message}}
{{Alert|type=bug|text=Bug message}}
:: {{Alert|type=wip|text=Under construction (WIP) message}}
{{Alert|type=warn|text=Warning message}}
:: {{Alert|type=loot|text=Loot-specific message}}
{{Alert|type=wip|text=Under construction (WIP) message}}
:: {{Alert|type=mcm|text=MCM-specific message}}
{{Alert|type=loot|text=Loot-specific message}}
:: {{Alert|type=mo|text=MO2-specific message}}
{{Alert|type=mcm|text=MCM-specific message}}
:: {{Alert|type=warn|text=Warning message}}
{{Alert|type=mo|text=MO-specific message}}
{{Alert|type=starfield|text=Starfield-specific message}}


== Related Templates ==
== Related Templates ==

Latest revision as of 03:38, November 9, 2023

Forum Topic

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
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
  • bug = Bug-Logo.png
  • note or notice = Info-Logo.png
  • warn or warning = Warning-Logo.png
  • wip or construction = Weapon.png
Tool Values
  • loot = Loot.png
  • mcm = Mcmicon1.png
  • mo = Moicon.png
Game Values
  • starfield = StarfieldIcon.png


Examples[edit source]

Default Call[edit source]

The simplest call returns defaults for the template.

Code: {{Alert|text=Your text here.}}
Result:
Info-Logo.png

NOTE

Your text here.
Info-Logo.png

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:
Info-Logo.png

NOTE

Using wiki markup like lists with this alert is appropriate.

  1. For numbered
    • Bulleted
    or mixed lists
Behavior should mimic body text.

Types[edit source]

The simplest call returns defaults for the template.

Code: {{Alert|type=bug|text=Your text here.}}
Result:
Bug-Logo.png

BUG

Bug message
Warning-Logo.png

WARNING

Warning message
Weapon.png

WIP

Under construction (WIP) message
Loot.png

LOOT

Loot-specific message
Mcmicon1.png

MCM

MCM-specific message
Moicon.png

MO2

MO-specific message
StarfieldIcon.png

Starfield

Starfield-specific message

Related Templates[edit source]

  • Template:AlertSmall - A more subtle version suitable for brief messages or messages within lists.