Template:Dmbox: Difference between revisions

remove invitations for custom styles that are coincidentally totally unused in template space, move invalid type to class
m (1 revision imported: Wikipedia article on Nicotine templates needed)
imported>Izno
(remove invitations for custom styles that are coincidentally totally unused in template space, move invalid type to class)
 
Line 1: Line 1:
<templatestyles src="Dmbox/styles.css" />
<templatestyles src="Dmbox/styles.css" />
<table id="
<div role="note" id="
{{#switch:{{{type|}}}
{{#switch:{{{type|}}}
| setindex = setindexbox
| setindex = setindexbox
Line 10: Line 10:
| disambig       
| disambig       
| #default = dmbox-disambig
| #default = dmbox-disambig
}} {{{class|}}}" style="{{{style|}}}" role="presentation">
}} {{{class|}}}">{{#ifeq:{{{image|}}}|none|
<tr>
| {{#if:{{{image|}}}
{{#ifeq:{{{image|}}}|none
   | <div>{{{image}}}</div>
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td>
| <td class="mbox-image" style="padding: 2px 0 2px 0.4em;"> {{#if:{{{image|}}}
   | {{{image}}}
   | [[File:{{#switch:{{{type|}}}
   | [[File:{{#switch:{{{type|}}}
     | setindex = DAB list gray.svg
     | setindex = DAB list gray.svg
Line 21: Line 18:
     | #default = Disambig gray.svg
     | #default = Disambig gray.svg
     }}|30px|alt=Disambiguation icon]]
     }}|30px|alt=Disambiguation icon]]
   }}</td>
   }}
}}
}}<div class="dmbox-body">{{{text}}}</div>{{#if:{{{imageright|}}}|<div>{{{imageright}}}</div>}}
<td class="mbox-text" style="padding: 0.25em 0.4em; font-style: italic; {{{textstyle|}}}"> {{{text}}} </td>
</div><!--  
{{#if:{{{imageright|}}}
| <td class="mbox-imageright" style="padding: 2px 0.4em 2px 0;"> {{{imageright}}} </td>
}}
</tr>
</table><!--  
   Detect and report usage with faulty "type" parameter:
   Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
-->{{#switch:{{{type|}}}
Line 34: Line 26:
| disambig
| disambig
| setindex =    <!-- Do nothing, valid "type" -->
| setindex =    <!-- Do nothing, valid "type" -->
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
| #default = <div class="dmbox-invalid-type">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!--  
}}<!--  
   Magic word for disambiguation pages:
   Magic word for disambiguation pages:
Anonymous user