Template:AlertSmall: Difference between revisions

From Step Mods | Change The Game
m (Text replacement - "chartreuse" to "chartr")
mNo edit summary
Line 1: Line 1:
<includeonly>{{#vardefine:color|{{#switch:{{{type}}}
<includeonly>{{#vardefine:color|{{#switch:{{{type}}}
|bug=green
|bug=green
|construction=purple
|wip
|fo3=chartr
|construction=orange
|fnv=orange
|loot=yellow
|loot=yellow
|mcm=salmon
|mcm=salmon
|mo=blue
|mo2
|mo=purple
|note
|notice=blue
|notice=blue
|warn
|warning=red
|warning=red
|#default=blue}}}}<div class="stepalertsm {{{borderColor|{{#var:color}}}}}bd" style="width:{{#if:{{{size|}}}|{{#switch:{{lc:{{{size|}}}}}
|#default=blue}}}}<div class="d-table-cell"><div class="d-flex m-0 mt-1 px-1 stepalertsm {{{borderColor|{{#var:color}}}}}bd""><div class="alertIcon">[[File:{{#switch:{{lc:{{{icon|{{{type}}}}}}}}
|max=70
|mid=50
|min=30
|#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
|wip
|construction=Weapon.png
|construction=Weapon.png
|fo3=Fallout3.png
|fnv=newvegas.png
|loot=loot.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
|warn
|warning=Warning-Logo.png
|warning=Warning-Logo.png
|#default=Info-Logo.png}}|20px]]</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'''{{#switch:{{lc:{{{alertHeader|{{{type}}}}}}}}
|#default=Info-Logo.png}}|20px]]</div><div class="ml-2 alertText hltx">'''{{#switch:{{{type|}}}
|bug=Bug
|bug=BUG
|construction=Under Construction
|wip
|fo3=Fallout 3 Specific
|construction=WIP
|fnv=Fallout NV Specific
|loot=LOOT
|loot=LOOT
|mcm=MCM
|mcm=MCM
|mo= MO Users
|mo2
|notice=Notice
|mo=MO2
|warning=Warning
|note
|#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]]
|notice=NOTE
|warn
|warning=WARNING
|#default=NOTE}}:'''</div><div class="ml-2 alertText"> {{{text}}}</div></div></div><p class="my-0"></p></includeonly><noinclude>__NOTOC____NOTITLE__[[Category:Notification Templates]]


== Purpose & Usage ==
== 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.
This template displays a small alert on the page that can also be used within lists. For this reason, this alert has all but top outer margins set to zero, so use blank lines or breaks to separate from body text where appropriate. This template is intended for use with brief alerts or alerts used within lists. For more lengthy and prominent alerts, use [[:Template:Alert]] instead.


=== Required Parameters ===
=== Required Parameters ===
; type
<span class="salmontx">'''type'''</span> - Sets the type of alert, which dictates icon and color
: Defined: <code>type=''keyword''</code>
: '''Values'''
: Defines the type of alert to display. Keywords available are:
:: Default: <code>type=notice</code>
::* bug
:* bug
::* construction
:* wip or construction
::* fo3
:* loot - LOOT specific
::* fnv
:* mcm - Mod Confuguration Manager specific
::* loot
:* mo or mo2 - Mod Organizer specific
::* mcm
:* ''note'' or ''notice''
::* mo
:* warn or warning
::* notice
::* warning


; text
<span class="salmontx">'''text'''</span> - The alert message
: Defined: <code>text=''ContentHere''</code>
: '''Values'''
: Defines the content of the alert.
:: Default: n/a, <code>text=''ContentHere''</code>


=== Optional Parameters ===
=== Optional Parameters ===
; size
<span class="salmontx">'''icon'''</span> - Determines the icon used
: Defined: <code>size=''value''</code>
: '''Values'''
: Default: auto
:: Default: <code>icon=notice</code>
: Determines the width by percentage. Accepts any integer from 0 - 100, but standard sizes are preferred using the appropriate keyword:
:* bug
:* min - 35%
:* wip or construction
:* mid - 55%
:* loot
:* max - 70%
:* mcm
 
:* mo or mo2
;icon
:* ''note'' or ''notice''
: Defined: <code>icon=''image.png''</code>
:* warn or warning
: 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: <code>borderColor=''keyword''</code>
: 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:
::* {{Fc|magenta|magent}}
::* {{Fc|purple|purple}}
::* {{Fc|blue|blue}}
::* {{Fc|green|green}}
::* {{Fc|chartr|chartr}}
::* {{Fc|yellow|yellow}}
::* {{Fc|orange|orange}}
::* {{Fc|salmon|salmon}}
::* {{Fc|red|red}}


== Examples ==
== Examples ==
=== Default Call ===
=== Default Call ===
The simplest call returns defaults for the template (size=70%, solid border).
The simplest call returns defaults for the template.
: '''Code:''' <code><nowiki>{{AlertSmall|text=Your text here.}}</nowiki></code>
: '''Code:''' <code><nowiki>{{AlertSmall|text=Your text here.}}</nowiki></code>
: '''Result:'''
: '''Result:'''
:: {{AlertSmall|text=Your text here.}}
:: {{AlertSmall|text=Your text here.}}
Spanning multiple lines will retain middle vertical alignment.
Width is automatic, and text wraps, but this template is intended for use with brief alerts or alerts used in lists. For more lengthy alerts, use [[:Template:Alert]] instead.
:: {{AlertSmall|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. 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.}}
:: {{AlertSmall|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.}}
 
=== Within Lists ===
Use in lists is appropriate.
: '''Code:'''
<pre>
* List item 1
*: {{AlertSmall|text='Silent' indented bullet list item}}
* List item 2
</pre>
: '''Result:'''
* List item 1
*: {{AlertSmall|text='Silent' indented bullet list item}}
* List item 2
 
: '''Code:'''
<pre>
# List item 1
# List item 2<br>{{AlertSmall|text={{lorem}} }}
# List item 3
</pre>
: '''Result:'''
# List item 1
# List item 2<br>{{AlertSmall|text={{lorem}} }}
# List item 3


=== Types ===
=== Types ===
The simplest call returns defaults for the template (size=70%, solid border).
The simplest call returns defaults for the template.
: '''Code:''' <code><nowiki>{{AlertSmall|type=bug|text=Your text here.}}</nowiki></code>
: '''Code:''' <code><nowiki>{{AlertSmall|type=bug|text=Your text here.}}</nowiki></code>
: '''Result:'''
: '''Result:'''
:: {{AlertSmall|type=bug|text=Your text here.}}
:: {{AlertSmall|type=bug|text=Bug message}}
 
:: {{AlertSmall|type=wip|text=Under construction (WIP) message}}
=== Sizes ===
:: {{AlertSmall|type=loot|text=Loot-specific message}}
Explicitly define a size (%) using either a keyword or an integer between 0 - 100.
:: {{AlertSmall|type=mcm|text=MCM-specific message}}
: '''Code:''' <code><nowiki>{{AlertSmall|type=notice|size=mid|text=Your text here.}}</nowiki></code>
:: {{AlertSmall|type=mo|text=MO2-specific message}}
: '''Code:''' <code><nowiki>{{AlertSmall|type=notice|size=23|text=Your text here.}}</nowiki></code>
:: {{AlertSmall|type=warn|text=Warning message}}
: '''Results:'''
:: {{AlertSmall|type=notice|size=mid|text=Your text here.}}
:: {{AlertSmall|type=notice|size=23|text=Your text here.}}
 
=== Listings ===
Using it within a list!
* TextHere
* {{AlertSmall|type=notice|size=min|text=Your text here.}}
* One more item here.
* ...it just keeps going!
 
=== All Examples ===
{{AlertSmall|type=bug|size=25|text=Your text here.}}
{{AlertSmall|type=construction|size=25|text=Your text here.}}
{{AlertSmall|type=fo3|size=25|text=Your text here.}}
{{AlertSmall|type=fnv|size=25|text=Your text here.}}
{{AlertSmall|type=loot|size=25|text=Your text here.}}
{{AlertSmall|type=mcm|size=25|text=Your text here.}}
{{AlertSmall|type=mo|size=25|text=Your text here.}}
{{AlertSmall|type=notice|size=25|text=Your text here.}}
{{AlertSmall|type=warning|size=25|text=Your text here.}}


== Related Templates ==
== 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).
*[[:Template:Alert]] - A more prominent alert that will NOT work in lists as this version does.


</noinclude>
</noinclude>

Revision as of 20:09, July 25, 2021


Purpose & Usage

This template displays a small alert on the page that can also be used within lists. For this reason, this alert has all but top outer margins set to zero, so use blank lines or breaks to separate from body text where appropriate. This template is intended for use with brief alerts or alerts used within lists. For more lengthy and prominent alerts, use Template:Alert instead.

Required Parameters

type - Sets the type of alert, which dictates icon and color

Values
Default: type=notice
  • bug
  • wip or construction
  • loot - LOOT specific
  • mcm - Mod Confuguration Manager specific
  • mo or mo2 - Mod Organizer specific
  • note or notice
  • warn or warning

text - The alert message

Values
Default: n/a, text=ContentHere

Optional Parameters

icon - Determines the icon used

Values
Default: icon=notice
  • bug
  • wip or construction
  • loot
  • mcm
  • mo or mo2
  • note or notice
  • warn or warning

Examples

Default Call

The simplest call returns defaults for the template.

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

Width is automatic, and text wraps, but this template is intended for use with brief alerts or alerts used in lists. For more lengthy alerts, use Template:Alert instead.

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.

Within Lists

Use in lists is appropriate.

Code:
* List item 1
*: {{AlertSmall|text='Silent' indented bullet list item}}
* List item 2
Result:
  • List item 1
    Info-Logo.png
    NOTE:
    'Silent' indented bullet list item

  • List item 2
Code:
# List item 1
# List item 2<br>{{AlertSmall|text={{lorem}} }}
# List item 3
Result:
  1. List item 1
  2. List item 2
    Info-Logo.png
    NOTE:
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

  3. List item 3

Types

The simplest call returns defaults for the template.

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

Weapon.png
WIP:
Under construction (WIP) message

Loot.png
LOOT:
Loot-specific message

Mcmicon1.png
MCM:
MCM-specific message

Moicon.png
MO2:
MO2-specific message

Warning-Logo.png
WARNING:
Warning message

Related Templates

  • Template:Alert - A more prominent alert that will NOT work in lists as this version does.