Template:Message box: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
Msgbox standard template. Testing...
 
m 96 revisions imported
 
(95 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<div style="{{msgbox/style|{{{type|normal}}}|width = {{{width}}}|bgcol = {{{bgcol}}}|linecol = {{{linecol}}} }}">
<includeonly><div
{{#if: {{{title|}}} | '''{{{title}}}''' }} {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
class="msgbox searchaux {{#if: {{{mini|{{{small|}}}}}} | msgbox-mini | }} {{
{{#if: {{{subtitle|}}} |<br />{{{subtitle}}} }}
  #switch: {{{type|}}}
</div><noinclude>
  | style | display | presentation = msgbox-yellow
{{msgbox
  | minor | minor-issue | content | issue = msgbox-orange
| title = Sample message box
  | major | major-issue | delete = msgbox-red
| subtitle = Sample message box
  | organization | title | move = msgbox-purple
  | details | parity | edition | upcoming = msgbox-blue
  | notice | note | info = msgbox-green
  | 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>
}}
}}
 
</div>
== Usage ==
<div style="width: 100%;">{{
=== Basic usage ===
  #if: {{{title|}}}
<pre>
  | '''{{{title}}}'''&nbsp;{{
{{msgbox
    #if: {{{discuss|}}}{{{discussPage|}}}{{{discussAnchor|}}}
| title = This is a normal message box
    | <sup>[<nowiki/>{{direct link|{{
| subtitle = With helpful and descriptive subtext
      #if: {{{discussPage|}}}
      | {{{discussPage}}}
      | {{TALKPAGENAME}}
    }}{{
      #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| title = This is a normal message box | subtitle = With helpful and descriptive subtext}}
 
=== Mini usage ===
<pre>
{{msgbox
| type = mini
| title = This is a mini message box
}}
}}
</pre>
</div>
 
</div>{{
Will result in:
  #if: {{{subtle|}}}
{{msgbox| type = mini | title = This is a mini message box}}
  | <div class="mobileonly">{{-}}</div>
 
}}</includeonly><noinclude>
=== Advanced usage ===
{{documentation}}
<pre>
<!-- Put categories/interwikis on the documentation page -->
{{msgbox
| type = normal
| width = 640px
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| subtitle = It has a discuss link and custom width
| discuss = true
}}
</pre>
 
Will result in:
{{msgbox| type = normal | width = 640px | bgcol = #eef | linecol = #ddf | title = This is a blue message box | subtitle = It has a discuss link and custom width | discuss = true}}
 
[[Category:Box templates]]
</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.