Template:Message box: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
let's not do the whole pre thing, honey
m 96 revisions imported
 
(91 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} }} {{{css|}}}">
<includeonly><div
{{#if: {{{icon|}}} | {{CommentSprite| {{{icon}}} }} }}{{#if: {{{title|}}} | '''{{{title|}}}''' }}{{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
class="msgbox searchaux {{#if: {{{mini|{{{small|}}}}}} | msgbox-mini | }} {{
{{#if: {{{text|}}} |<br />{{{text}}} }}
  #switch: {{{type|}}}
</div><noinclude>
  | style | display | presentation = msgbox-yellow
== Usage ==
  | minor | minor-issue | content | issue = msgbox-orange
=== Basic usage ===
  | major | major-issue | delete = msgbox-red
<pre>
  | organization | title | move = msgbox-purple
{{msgbox
  | details | parity | edition | upcoming = msgbox-blue
| title = This is a normal message box
  | notice | note | info = msgbox-green
| text = With helpful and descriptive subtext
  | other = msgbox-magenta
  | #default = {{#if: {{#pos: {{{class|}}} | msgbox- <!-- end pos -->}} || msgbox-gray <!-- end if -->}}
}} {{{class|}}}"
style="
  max-width: {{{width|{{#if: {{{mini|{{{small|}}}}}} | 50em | 90% }}}}};
  {{#if: {{{subtle|}}} | max-width: 300px; float: right; clear: both; flex-direction: column; font-size: 95%; }}
  {{#if: {{{bgcol|}}} | background: {{{bgcol}}}; | }}
  {{#if: {{{linecol|}}} | border-left: 4px solid {{{linecol}}}; | }}
  {{#if: {{{float|}}} | float: {{{float}}}; | }}
  {{{css|}}}
  "
>
<div id="msgbox-icon"> {{
  #if: {{{icon|}}}
    | <div id="msgbox-iconimage" style="{{{imagecss|}}}">
}}{{
  #if: {{{image|}}}{{{imagetextbefore|}}}{{{imagetextafter|}}}
  | <div id="msgbox-image" style="{{{imagecss|}}}">
}} {{{imagetextbefore|}}}{{
  #if: {{{icon|}}}
  | {{CommentSprite | {{{icon|}}} }}
}}{{
  #if:{{{image|}}}
  |{{
      #if: {{{imageisraw|}}}
      | {{{image}}}
      | [[File:{{{image}}}|{{#if: {{{imagesize|}}}| {{{imagesize}}}| {{#if: {{{mini|{{{small|}}}}}} | 16px | 32px }}}}|text-top]]
}}}}{{{imagetextafter|}}}{{
  #if: {{{icon|}}}
  | </div>
}}{{
  #if: {{{image|}}}{{{imagetextbefore|}}}{{{imagetextafter|}}}
  | </div>
}}
}}
</pre>
</div>
 
<div style="width: 100%;">{{
Will result in:
  #if: {{{title|}}}
{{msgbox| title = This is a normal message box | text = With helpful and descriptive subtext}}
  | '''{{{title}}}'''&nbsp;{{
 
    #if: {{{discuss|}}}{{{discussPage|}}}{{{discussAnchor|}}}
=== Mini usage ===
    | <sup>[<nowiki/>{{direct link|{{
<pre>
      #if: {{{discussPage|}}}
{{msgbox
      | {{{discussPage}}}
| type = mini
      | {{TALKPAGENAME}}
| icon = 8
    }}{{
| title = This is a mini message box with an information icon using [[Template:CommentSprite]]
      #if: {{{discussAnchor|}}}
      | &#35;{{{discussAnchor}}}
    }}|discuss}}</sup>
  }}
}}{{
  #if: {{{linkshere|}}}
  | <sup>{{#if:{{{discuss|}}}|, <nowiki/>|[<nowiki/>}}[[Special:WhatLinksHere/{{FULLPAGENAME}}|links]]{{#ifeq:{{NAMESPACENUMBER}}|6|, [[Special:GlobalUsage/{{PAGENAME}}|global usage]]}}<nowiki/>]</sup>
  | {{
    #if:{{{discuss|}}}
    |<sup>]</sup>
  }}
}}
}}
</pre>
{{
 
  #if: {{{text|}}}
Will result in:
  | <div id="msgbox-text">{{{text}}}</div>
{{msgbox| type = mini | icon = 8 | title = This is a mini message box with an information icon using [[Template:CommentSprite]]}}
 
=== Advanced usage ===
<pre>
{{msgbox
| type = normal
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link and custom CSS
| discuss = true
| css = width: 320px; font-size: x-large;
}}
}}
</pre>
</div>
 
</div>{{
Will result in:
  #if: {{{subtle|}}}
{{msgbox| type = normal | bgcol = #eef | linecol = #ddf | title = This is a blue message box | text = It has a discuss link and custom width | discuss = true | css = width: 320px; font-size: x-large;}}
  | <div class="mobileonly">{{-}}</div>
 
}}</includeonly><noinclude>
[[Category:Box templates]]
{{documentation}}
<!-- Put categories/interwikis on the documentation page -->
</noinclude>
</noinclude>

Latest revision as of 11:33, 4 July 2024

[create] [refresh]Documentation
This template has no documentation. If you know how to use this template, please create it.