Template:Pageframe: Difference between revisions

1,201 bytes added ,  10:04, 26 April 2020
Added documentation. TODO - Consider protecting this page
(Created page with "<div style="box-shadow: 0 0 .3em #999; border-radius: .2em; margin: 1em 0.2em 1em 0.2em; padding: 1px;"> <div style="background: #{{{color|888}}}; border-radius: .2em; color:...")
 
(Added documentation. TODO - Consider protecting this page)
Line 1: Line 1:
<div style="box-shadow: 0 0 .3em #999; border-radius: .2em; margin: 1em 0.2em 1em 0.2em; padding: 1px;">
<includeonly><div style="box-shadow: 0 0 .3em #999; border-radius: .2em; margin: 1em 0.2em 1em 0.2em; padding: 1px;">
<div style="background: #{{{color|888}}}; border-radius: .2em; color: #FFF; padding: .4em .8em .5em;"><center>[[file:{{{image}}}|left|24px]]'''{{{title}}}'''[[file:{{{image}}}|right|24px]]</center></div>
<div style="background: #{{{color|888}}}; border-radius: .2em; color: #FFF; padding: .4em .8em .5em;"><center>[[file:{{{image}}}|left|24px]]'''{{{title}}}'''[[file:{{{image}}}|right|24px]]</center></div>
<div style="padding: 1em; background: #{{{color}}}3e">{{{content}}}</div></div>
<div style="padding: 1em; background: #{{{color}}}3e">{{{content}}}</div></div></includeonly><noinclude>
{{Needs revision
|reason = Fix behaviour for missing parameters and empty parameters.
|user = [[User:Helpful Herbert|Helpful Herbert]] ([[User talk:Helpful Herbert|talk]]) 10:04, 26 April 2020 (UTC)
}}
 
== About ==
Infobox with title and content, intended use in [[Main Page]].
 
== Parameter-Usage ==
{| class="wikitable"
!Parameter
!Default
!Description
|-
!color
|888
|RGB-color of the title-background (anything that would fit behind a '#' like 'BBA0DD'
|-
!image
|
|Image to be displayed on the left and right of the titlebar
|-
!title
|
|Centered text in the title
|-
!content
|
|Content to be displayed in the infobox
|}
 
== Examples ==
=== Bare 1 ===
<pre>{{Pageframe}}</pre>
{{Pageframe}}
 
=== Bare 2 ===
<pre>{{pageframe
|color=
|image=
|title=
|content=
}}</pre>
{{pageframe
|color=
|image=
|title=
|content=
}}
 
=== Normal ===
<pre>{{pageframe
| color      = BBA0DD
| image      = Generic botanist.png
| title      = Departments and Roles
| content    = {{pagejobs}}
}}</pre>
{{pageframe
| color      = BBA0DD
| image      = Generic botanist.png
| title      = Departments and Roles
| content    = {{pagejobs}}
}}
 
[[Category:Templates]]
</noinclude>
1,133

edits