Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3).
Navigation
Topics Help • Register • News • History • How to • Sequences statistics • Template prototypes

Difference between revisions of "Template:Box"

From Prime-Wiki
Jump to: navigation, search
(new)
 
 
Line 36: Line 36:
 
creates
 
creates
 
{{Box|title=Test|content=Here's the content.}}
 
{{Box|title=Test|content=Here's the content.}}
[[Category:Templates]]</noinclude><includeonly>{{#ifeq:{{{hide}}}|true|<div align="center" class="mw-collapsible mw-collapsed" style="background-color:Gainsboro; margin-bottom:0.1em; border-radius:4px;"><div style="font-size:120%; font-weight:bold;">{{{title}}}</div><div class="mw-collapsible-content" align="left" style="background-color:White; margin-bottom:0; padding:0.2em 0.5em 0.2em 0.5em; border:1px solid #AAAAAA; border-radius:4px">{{{content}}}</div></div>
+
[[Category:Templates]]</noinclude><includeonly>{{#ifeq:{{{hide}}}|true|<div align="center" class="mw-collapsible mw-collapsed" style="background-color:Gainsboro; margin-bottom:0.1em; border-radius:4px;"><div style="font-size:120%; font-weight:bold;">{{{title}}}</div><div class="mw-collapsible-content" align="left" style="background-color:White; margin-bottom:0; padding:0.2em 0.5em 0.2em 0.5em; border:1px solid #AAAAAA; border-radius:4px">
 +
{{{content}}}</div></div>
 
|
 
|
<div align="center" style="background-color:Gainsboro; margin-bottom:0.1em; border-radius:4px; font-size:120%; font-weight:bold;">{{{title}}}</div><div style="margin-bottom:0; padding:0.2em 0.5em 0.2em 0.5em; border:1px solid #AAAAAA; border-radius:4px;">{{{content}}}</div>
+
<div align="center" style="background-color:Gainsboro; margin-bottom:0.1em; border-radius:4px; font-size:120%; font-weight:bold;">{{{title}}}</div><div style="margin-bottom:0; padding:0.2em 0.5em 0.2em 0.5em; border:1px solid #AAAAAA; border-radius:4px;">
 +
{{{content}}}</div>
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 14:29, 14 December 2018

Template Box:

Display contents in a seperate box which can be hidden.

Calling:

{{Box|<hide=true,false>|title=<text>|content=<text>}}

Parameters:

{{Box
|hide=
|title=
|content=
}}
hide: true or false (default)
title: text of centered title
content: contents to display in the box

Content hidden

{{Box|hide=true|title=Test|content=Here's the content.}}

creates

Test
Here's the content.

Content shown

{{Box|title=Test|content=Here's the content.}}

creates

Test
Here's the content.