Difference between revisions of "Template:MessageBox"

From Clogopedia, the Natural Selection 2 Wiki
Jump to: navigation, search
m (Test)
m (Test)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
== Example ==
+
== Examples ==
<nowiki>{{MessageBox|
+
{| class="ns2table" style="width:50%"
style=question|
+
! Code
title='''This is the title'''
+
! Result
 +
|-
 +
|
 +
<pre><nowiki>
 +
{{MessageBox
 +
|style=question
 +
|title=''Question:''
 
|align=left
 
|align=left
 
|color=orange
 
|color=orange
 
|This is the message
 
|This is the message
}}</nowiki>  
+
}}
Produces:
+
</nowiki></pre>  
{{MessageBox|style=question|title='''This is the title'''|align=left|color=orange|This is the message}}
+
|{{MessageBox|style=question|title=''Question:''|align=left|color=orange|This is a question}}
 
+
|-
<nowiki>{{MessageBox|
+
|
style=check|
+
<pre><nowiki>
title=''This is the title''|
+
{{MessageBox
align=center|
+
|style=check
color=green|
+
|title='''Tip:'''
This is some information}}</nowiki>
+
|align=left
Produces:
+
|color=green
{{MessageBox|style=check|title=''This is the title''|align=center|color=green|This is some information}}
+
|This is a useful tip.
 
+
}}
<nowiki>{{MessageBox|
+
</nowiki></pre>  
 +
|{{MessageBox|style=check|title='''Tip:'''|align=left|color=green|This is a useful tip.}}
 +
|-
 +
|<pre><nowiki>{{MessageBox|
 
style=ban|
 
style=ban|
title=''This is the title''|
+
title='''Stop!'''|
 
align=right|
 
align=right|
 
color=red|
 
color=red|
This is some information}}</nowiki>
+
This is a warning or advisory.}}</nowiki></pre>
Produces:
+
|{{MessageBox|style=ban|title='''Stop!'''|align=center|color=red|This is some information}}
{{MessageBox|style=ban|title=''This is the title''|align=center|color=red|This is some information}}
+
|}
 +
 
 +
 
  
 
<nowiki>{{MessageBox|
 
<nowiki>{{MessageBox|
Line 46: Line 57:
 
{| 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 20:59, 16 May 2019

Examples

Code Result
{{MessageBox
|style=question
|title=''Question:''
|align=left
|color=orange
|This is the message
}}
Question: This is a question
{{MessageBox
|style=check
|title='''Tip:'''
|align=left
|color=green
|This is a useful tip.
}}
Tip: This is a useful tip.
{{MessageBox|
style=ban|
title='''Stop!'''|
align=right|
color=red|
This is a warning or advisory.}}
Stop! This is some information


{{MessageBox| style=stats| title=This is the title| align=center| color=blue| This is some information}} Produces:

This is the title This is some information
{{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