Template:META Message: Difference between revisions

From NixOS Wiki
imported>Samueldr
m tweaks spacing for message boxes.
m Update with full template
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>{{Template}}
 
== About ==
 
A templated message.
A templated message.


Use of <code>&lt;table></code> is to allow vertical centering.
Use of <code>&lt;table></code> is to allow vertical centering.


=== Preview ===
== Usage ==


<pre><nowiki>
<pre><nowiki>
Line 10: Line 13:
</nowiki></pre>
</nowiki></pre>


{{Template:META Message}}
<pre><nowiki>
{{Template:META Message|heading=heading}}
</nowiki></pre>


<pre><nowiki>
<pre><nowiki>
Line 18: Line 23:
}}
}}
</nowiki></pre>
</nowiki></pre>
== Example ==
{{Template:META Message}}
{{Template:META Message|heading=heading}}


{{Template:META Message
{{Template:META Message
Line 24: Line 35:
}}
}}


</noinclude><includeonly><div
</noinclude><includeonly><div class="nixos-template-message"><table class="message-box" role="presentation"
  class="nixos-template-message"
   style="
   style="
     border: 1px solid {{{border|#A7D7F9}}};
     border: 1px solid {{{border|#A7D7F9}}};
Line 32: Line 42:
     margin-bottom: 1ex;
     margin-bottom: 1ex;
   "
   "
><table class="message-box" role="presentation">
>
     <tr>
     <tr>
       <td style="padding-left: 0.5em; padding-right: 0.5em;">{{{signal}}}</td>
       <td style="padding-left: 0.5em; padding-right: 0.5em; min-width: 64px;">{{{signal}}}</td>
       <td style="padding-right: 1em; width:100%;">
       <td style="padding-right: 1em; width:100%;">
         <div>'''{{{heading}}}'''</div>
         {{#if: {{{heading|}}}|<div>'''{{{heading}}}'''</div>|}}
         <div>{{{message}}}</div>
         <div>{{{message}}}</div>
       </td>
       </td>
     </tr>
     </tr>
   </table></div></includeonly>
   </table></div></includeonly>

Latest revision as of 02:21, 7 April 2024

This page is a template. It should be used as part of other articles. For more information, see Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to discuss this template in the talk page.

If you wanted to create a new page instead, use the search box to search for the title of the new page you want to create and follow the link Create the page "XYZ" on this wiki! in the results page. An alternative is to create a dangling link to the new page from an existing page. A final option is to directly visit the expected URL of the page.

About

A templated message.

Use of <table> is to allow vertical centering.

Usage

{{Template:META Message}}
{{Template:META Message|heading=heading}}
{{Template:META Message
|border = #ff0000
|background = #00ff00
}}

Example