Template:Main Page Box

From Dothraki
(Difference between revisions)
Jump to: navigation, search
m (Reverted edits by Numm164 (talk) to last revision by Ochristi)
 
Line 1: Line 1:
dishoom
+
<includeonly><div class="mpb{{#switch: {{{position}}}
 +
| full =
 +
| left =-left
 +
| right =-right
 +
| default
 +
}}">
 +
<h{{{h}}} class="mpb-h{{{h}}}">{{{hline}}}</h{{{h}}}>
 +
<div>
 +
{{{content}}}
 +
</div>
 +
</div>
 +
</includeonly><noinclude>
 +
This is a shiny '''Template''' for creating the '''Main Page Boxes'''.
 +
 
 +
== There are exactly four parameters: ==
 +
 
 +
{| style="background-color:#89D1FC;"
 +
|- style="background-color:#e3f3fc;"
 +
! Parameter !! possible Values !! Results
 +
|- style="background-color:#e3f3fc;"
 +
|| <pre>position =</pre> || <pre>left, right, full</pre> ||
 +
* the '''left''' causes the box to have a '''0.3em''' margin to the right
 +
* the '''right''' generates a '''0.3em''' margin to the left
 +
* the '''full''' option has '''no margin''' to a side
 +
|- style="background-color:#e3f3fc;"
 +
| <pre>h =</pre> || <pre>1, 3</pre> ||
 +
* '''1''' is just for the big headline '''h1 size''' and '''centered'''
 +
* '''3''' is for the smaller ones
 +
|- style="background-color:#e3f3fc;"
 +
| <pre>hline =</pre> || ''one line of text'' ||
 +
* this goes to the content of the head line
 +
|- style="background-color:#e3f3fc;"
 +
| <pre>content =</pre> || ''some more text'' ||
 +
* this goes to the main content of the box
 +
|}
 +
 
 +
== This is how it works: ==
 +
{| style="background-color:#89D1FC;"
 +
|- style="background-color:#e3f3fc;"
 +
! sample code !! Result
 +
 
 +
|- style="background-color:#e3f3fc;"
 +
| <pre><nowiki>{{{{PAGENAME}}
 +
| position = left
 +
| h = 3
 +
| hline = Title:
 +
| content =
 +
some lines<br />of text
 +
}}</nowiki></pre> ||
 +
{{{{PAGENAME}}
 +
| position = left
 +
| h = 3
 +
| hline = Title:
 +
| content =
 +
some lines<br />of text
 +
* "left" box results in right margin
 +
}}
 +
 
 +
|- style="background-color:#e3f3fc;"
 +
| <pre><nowiki>{{{{PAGENAME}}
 +
| position = full
 +
| h = 1
 +
| hline = Big Title:
 +
| content =
 +
compare:
 +
* the margin to the table border
 +
* the position and size of the title
 +
}}</nowiki></pre> ||
 +
{{{{PAGENAME}}
 +
| position = full
 +
| h = 1
 +
| hline = Big Title:
 +
| content =
 +
compare:
 +
* the margin to the table border
 +
* the position and size of the title
 +
}}
 +
 
 +
|- style="background-color:#e3f3fc;"
 +
| <pre><nowiki>{{{{PAGENAME}}
 +
| position = right
 +
| h = 3
 +
| hline = Title:
 +
| content =
 +
some lines<br />of text
 +
* "left" box results in right margin
 +
}}</nowiki></pre> ||
 +
{{{{PAGENAME}}
 +
| position = right
 +
| h = 3
 +
| hline = Title:
 +
| content =
 +
some lines<br />of text
 +
* "left" box results in right margin
 +
}}
 +
|}
 +
__NOTOC__ __NOEDITSECTION__
 +
</noinclude>

Latest revision as of 09:49, 2 September 2017

This is a shiny Template for creating the Main Page Boxes.

There are exactly four parameters:

Parameter possible Values Results
position =
left, right, full
  • the left causes the box to have a 0.3em margin to the right
  • the right generates a 0.3em margin to the left
  • the full option has no margin to a side
h =
1, 3
  • 1 is just for the big headline h1 size and centered
  • 3 is for the smaller ones
hline =
one line of text
  • this goes to the content of the head line
content =
some more text
  • this goes to the main content of the box

This is how it works:

sample code Result
{{{{PAGENAME}}
| position = left
| h = 3
| hline = Title:
| content =
some lines<br />of text
}}

Title:

some lines
of text

  • "left" box results in right margin


{{{{PAGENAME}}
| position = full
| h = 1
| hline = Big Title:
| content =
compare:
* the margin to the table border
* the position and size of the title
}}

Big Title:

compare:

  • the margin to the table border
  • the position and size of the title


{{{{PAGENAME}}
| position = right
| h = 3
| hline = Title:
| content =
some lines<br />of text
* "left" box results in right margin
}}

Title:

some lines
of text

  • "left" box results in right margin


Personal tools