Template:Alert: Difference between revisions

From Step Mods | Change The Game
No edit summary
No edit summary
Line 30: Line 30:
|}
|}
</includeonly><noinclude>
</includeonly><noinclude>
{{#css:
.alertLarge{
box-shadow: 0 0 15px -2px #00000078;
border: 2px solid;
border-collapse: inherit;
border-radius: 5px !important;
margin: 1rem auto;
}
.alertLarge td, th{
padding: 0.5rem;
vertical-align: top;
}
.alertLarge th{
font-weight: bolder;
font-size: larger;
padding-bottom: 0 !important;
}
.alertLarge th:first-child{
width: 35px;
}
}}


== Purpose & Usage ==
== Purpose & Usage ==

Revision as of 03:39, January 15, 2021


Purpose & Usage[edit source]

This template displays a blocked out "alert" on the page.

Required Parameters[edit source]

type
Defined: type=keyword
Determines the style of alert to display. The options are:
  • bug : a general bug notice.
  • construction : an "under construction" alert.
  • mcm : a MCM notice.
  • mo : a Mod Organizer user notice.
  • notice : a general notice.
  • warning : a warning.
text
Defined: text=textHere
Defines the content for the notification. Most formatting is accepted.

Optional Parameters[edit source]

size
Defined: size=value
Default: max
Determines the width by percentage. Accepts any integer from 0 - 100, but standard sizes are preferred using the appropriate keyword:
  • min = 30%
  • 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.
bgcolor
Defined: bgcolor=color
Default: blue
Sets the background color. 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[edit source]

General Notice[edit source]

This is the template's default thus leaving the type parameter out will result in a general notification. Thus the following two codings will have the same results:

Code: {{Alert|text=Your text here.}}
Code:
{{Alert|type=notice|text=Your text here, and it's a lot of text with a list even:
* list item 1
* list item 2
... and that's it.}}


Result:
Info-Logo.png Notice:
Your text here, and it's a lot of text with a list even:
  • list item 1
  • list item 2

... and that's it.


Bug[edit source]

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


Construction[edit source]

Code: {{Alert|type=construction|text=Your text here.}}
Result:
Weapon.png Under Construction:
Your text here.


MCM[edit source]

Code: {{Alert|type=mcm|text=Your text here.}}
Result:
Mcmicon1.png Mod Configuration Menu:
Your text here.


Mod Organizer[edit source]

Code: {{Alert|type=mo|text=Your text here.}}
Result:
Moicon.png MO Users:
Your text here.


Warning[edit source]

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


Adjusting the Size[edit source]

Altering the size (%) using a defined keyword.

Code: {{Alert|type=warning|size=mid|text=Your text here.}}
Result:
Warning-Logo.png Warning:
Your text here.


Explicitly define a size (%) using an integer between 0 - 100.

Code: {{Alert|type=warning|size=25|text=Your text here.}}
Result:
Warning-Logo.png Warning:
Your text here.


Related Templates[edit source]