Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Msgbox: Difference between revisions

Template page
fandomwiki>Wynthyst
No edit summary
m 7 revisions imported: Try to import fandom pages (manual dump, 9)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{| class="msgbox" style="background-color: {{{bgcol|#800080}}}; border: 2px solid {{{linecol|#616161}}}; {{#if: {{{width|}}} | max-width: {{{width}}}; }}<!--
<includeonly>
-->{{#if: {{{mini|}}} | padding: 0px 6px 0px 1px; margin: 0 0 1em; | padding: 3px 12px 3px 7px; margin: 0 auto 1em; text-align:center; }} {{{css|}}}"
{| style="background-color: black; border: 1px solid #800080; {{#if: {{{width|}}} | max-width: {{{width}}}; border-radius: 0.3em;}}
|-
| style="vertical-align: middle; border: none" | {{#if: {{{icon|}}} | <div style="margin: 0 {{#if: {{{mini|}}} | 2 | 4 }}px 0 3px"> }}{{#if: {{{image|}}} | <div style="margin: 0 {{#if: {{{mini|}}} | 2 | 4 }}px 0 3px"> }}<!--
-->{{#if: {{{icon|}}} | {{CommentSprite | {{{icon|}}} }} </div> }}{{#if: {{{image|}}} | [[File:{{{image}}}|{{#if: {{{imagesize|}}} | {{{imagesize}}} | {{#if: {{{mini|}}} | 16px | 32px }} }}|text-top]] </div> }}
| style="border: none" | {{#if: {{{title|}}} | '''{{{title}}}''' {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }} }}<!--
-->{{#if: {{{text|}}} | {{#if: {{{title|}}} | <div>{{{text}}}</div> | {{{text}}} }} }}
|}{{#ifeq: {{NAMESPACE}} | Template | [[Category:Notice templates|{{BASEPAGENAME}}]] }}</includeonly><noinclude>
|}{{#ifeq: {{NAMESPACE}} | Template | [[Category:Notice templates|{{BASEPAGENAME}}]] }}</includeonly><noinclude>
{{doc/start}}
 
=== Basic usage ===
=== Usage ===
<pre style="width: 280px;">
<pre style="width: 90%;">
{{msgbox
{{msgbox
| title = This is a normal message box
| title = This is a normal message box
Line 19: Line 14:
{{msgbox| title = This is a normal message box | text = With helpful and descriptive subtext}}
{{msgbox| title = This is a normal message box | text = With helpful and descriptive subtext}}


=== Mini usage ===
</noinclude>
<pre style="width: 560px;">
{{msgbox
| mini = 1
| icon = 8
| text = This is a mini message box with an information icon using [[Template:CommentSprite]]
}}
</pre>
 
Will result in:
{{msgbox| mini = 1 | icon = 8 | text = This is a mini message box with an information icon using [[Template:CommentSprite]]}}
 
=== Advanced usage ===
<pre style="width: 485px;">
{{msgbox
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link and some custom CSS
| discuss = 1
| css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;
}}
</pre>
 
Will result in:
{{msgbox| bgcol = #eef | linecol = #ddf | title = This is a blue message box | text = It has a discuss link and some custom CSS | discuss = 1  = 340px | css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;}}
 
<pre style="width: 485px;">
{{msgbox
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link, some custom CSS and a custom image
| discuss = 1
| image = Bot.png
| css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;
}}
</pre>
 
Will result in:
{{msgbox| bgcol = #eef | linecol = #ddf | title = This is a blue message box | text = It has a discuss link, some custom CSS and a custom image | discuss = 1 | css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888; | image = Bot.png}}
 
A custom image size can also be specified with "imagewidth", for example: <code>imagewidth = 50px</code>
 
=== Advanced Mini usage ===
<pre style="width: 680px;">{{msgbox
| mini = 1
| image = Bot.png
| bgcol = #eef
| linecol = #ddf
| css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;
| text = This is a mini message box, it is using similar settings as the box used in the advanced example above.
}}</pre>
 
Will result in: {{msgbox| mini = 1 | bgcol = #eef | linecol = #ddf | text = This is a mini message box, it is using similar settings as the box used in the advanced example above. | css = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888; | image = Bot.png}}
This can also have a custom image size.
{{doc/end}}</noinclude>