Difference between revisions of "Template:MessageBox"

From Clogopedia, the Natural Selection 2 Wiki
Jump to: navigation, search
m (Test)
m (Test)
Line 6: Line 6:
 
{{MessageBox|style=check|title=ABCD|align=center|color=green|This is some information}}
 
{{MessageBox|style=check|title=ABCD|align=center|color=green|This is some information}}
 
</noinclude>
 
</noinclude>
<includeonly>
+
<includeonly>{{#vardefine:style|{{#switch: {{{style|}}} | question = fa fa-question-circle | warning = fas fa-exclamation-circle | check = fas fa-check-circle | ban = fas fa-ban | user = fas fa-user-circle | #default = fas fa-circle }} }}{{#vardefine:color|{{#switch: {{{color|}}} | red = #ff0000 | yellow = #ffff00 | orange = #ff9B00 | green = #0fad0f | blue = #0000ff | #default = #fff }} }}{| class="ns2table" style="text-align:{{#if:{{{align|}}}|{{{align}}}|left}}; height:70px; border-spacing: 2px; border: 1px solid darkgray;"
<!--{{#vardefine:style|{{#switch: {{{style|}}} | question = fa fa-question-circle | warning = fas fa-exclamation-circle | check = fas fa-check-circle | ban = fas fa-ban | user = fas fa-user-circle | #default = fas fa-circle }} }}
+
{{#vardefine:color|{{#switch: {{{color|}}} | red = #ff0000 | yellow = #ffff00 | orange = #ff9B00 | green = #0fad0f | blue = #0000ff | #default = #fff }} }}-->
+
{| 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 18:58, 16 May 2019

Example

{{MessageBox|style=question|title=ABCD|align=left|color=red|This is some information}}
Produces:
ABCD This is some information
{{MessageBox|style=check|title=ABCD|align=left|color=green|This is some information}}
Produces:
ABCD This is some information