Difference between revisions of "Template:MessageBox"
From Clogopedia, the Natural Selection 2 Wiki
m (Test) |
m (Test) |
||
Line 29: | Line 29: | ||
|{{MessageBox|style=check|title='''Tip:'''|align=left|color=green|This is a useful tip.}} | |{{MessageBox|style=check|title='''Tip:'''|align=left|color=green|This is a useful tip.}} | ||
|- | |- | ||
− | |<pre><nowiki>{{MessageBox | + | |<pre><nowiki>{{MessageBox |
− | style=ban | + | |style=ban |
− | title='''Stop!''' | + | |title='''Stop!''' |
− | align=right | + | |align=right |
− | color=red | + | |color=red |
− | This is a warning or advisory.}}</nowiki></pre> | + | |This is a warning or advisory.}}</nowiki></pre> |
|{{MessageBox|style=ban|title='''Stop!'''|align=center|color=red|This is a warning or advisory.}} | |{{MessageBox|style=ban|title='''Stop!'''|align=center|color=red|This is a warning or advisory.}} | ||
|- | |- | ||
− | |<pre><nowiki>{{MessageBox | + | |<pre><nowiki>{{MessageBox |
− | style=info | + | |style=info |
− | title=Information: | + | |title=Information: |
− | align=center | + | |align=center |
− | color=blue | + | |color=blue |
− | This is some general information. This template is flexible and can support a paragraph of information if required.}}</nowiki></pre> | + | |This is some general information. This template is flexible and can support a paragraph of information if required.}}</nowiki></pre> |
|{{MessageBox|style=info|title=Information:|align=center|color=blue|This is some general information. This template is flexible and can support a paragraph of information if required.}} | |{{MessageBox|style=info|title=Information:|align=center|color=blue|This is some general information. This template is flexible and can support a paragraph of information if required.}} | ||
+ | |- | ||
+ | |<pre><nowiki>{{MessageBox | ||
+ | |style=time | ||
+ | |title=Information: | ||
+ | |align=right | ||
+ | |color=yellow | ||
+ | |This is some general information. This template is flexible and can support a paragraph of information if required.}}</nowiki></pre> | ||
+ | |{{MessageBox|style=time|title=Information:|align=right|color=yellow|This is some general information. This template is flexible and can support a paragraph of information if required.}} | ||
|} | |} | ||
Line 55: | Line 63: | ||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly> | ||
− | {{#vardefine:style|{{#switch: {{{style|}}} | info = fas fa-info-circle |question = fa fa-question-circle | warning = fas fa-exclamation-circle | check = fas fa-check-circle | ban = fas fa-ban | user = fas fa-user-circle | time = fas fa-clock | crosshair = fas fa-crosshairs | steam = fab fa-steam | #default = fas fa-circle }} }}{{#vardefine:color|{{#switch: {{{color|}}} | red = #ad0f0f | yellow = # | + | {{#vardefine:style|{{#switch: {{{style|}}} | info = fas fa-info-circle |question = fa fa-question-circle | warning = fas fa-exclamation-circle | check = fas fa-check-circle | ban = fas fa-ban | user = fas fa-user-circle | time = fas fa-clock | crosshair = fas fa-crosshairs | steam = fab fa-steam | #default = fas fa-circle }} }}{{#vardefine:color|{{#switch: {{{color|}}} | red = #ad0f0f | yellow = #eed202 | orange = #ff9B00 | green = #0fad0f | blue = #0f4ead | #default = #fff }} }} |
{| class="ns2table" style="text-align:{{#if:{{{align|}}}|{{{align}}}|left}}; height:70px; border-spacing: 2px; border: 1px solid darkgray;" | {| class="ns2table" style="text-align:{{#if:{{{align|}}}|{{{align}}}|left}}; height:70px; border-spacing: 2px; border: 1px solid darkgray;" | ||
| <span class="fa-3x fa-layers fa-fw"><span style="color:{{#var:color}}"><i class="fas fa-circle" style="color:#fff"></i><i class="{{#var:style}}" aria-hidden="true"></i></span></span> | | <span class="fa-3x fa-layers fa-fw"><span style="color:{{#var:color}}"><i class="fas fa-circle" style="color:#fff"></i><i class="{{#var:style}}" aria-hidden="true"></i></span></span> | ||
| {{#if:{{{title|}}}|{{{title}}}|'''Message'''}} {{{1|}}} | | {{#if:{{{title|}}}|{{{title}}}|'''Message'''}} {{{1|}}} | ||
|}</includeonly> | |}</includeonly> |
Revision as of 21:07, 16 May 2019
Examples
Code | Result | ||
---|---|---|---|
{{MessageBox |style=question |title=''Question:'' |align=left |color=orange |This is the message }} |
| ||
{{MessageBox |style=check |title='''Tip:''' |align=left |color=green |This is a useful tip. }} |
| ||
{{MessageBox |style=ban |title='''Stop!''' |align=right |color=red |This is a warning or advisory.}} |
| ||
{{MessageBox |style=info |title=Information: |align=center |color=blue |This is some general information. This template is flexible and can support a paragraph of information if required.}} |
| ||
{{MessageBox |style=time |title=Information: |align=right |color=yellow |This is some general information. This template is flexible and can support a paragraph of information if required.}} |
|
{{MessageBox|style=time|title=This is the title|align=center|color=blue|This is some information}}Produces:
This is the title This is some information |
{{MessageBox|style=steam|title=This is the title|align=center|color=blue|This is some information}}Produces:
This is the title This is some information |