Template:FrameBox: Difference between revisions

From Shiptest Wiki
Jump to navigationJump to search
(adds framebox)
 
(Minor framebox improvement)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><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; background: #{{{color}}}3e">
<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|Missing.png}}}|left|24px]]'''{{{title|No Title!}}}'''[[file:{{{image|Missing.png}}}|right|24px]]</center></div>
<div style="padding: 1em; background: #{{{color}}}3e">{{{content}}}</div></div></includeonly><noinclude>
<div style="padding: 1em">{{{content|No 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 ==
== About ==
Infobox with title and content, intended use in [[Main Page]] and [[Administrators]].
Infobox with title and content, intended use in [[Main Page]] and [[Administrators]].
== 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 ==
== Examples ==
Line 55: Line 28:
<pre>{{FrameBox
<pre>{{FrameBox
| color      = BBA0DD
| color      = BBA0DD
| image      = Generic botanist.png
| image      = Autowiki-Botanist.png
| title      = Departments and Roles
| title      = Species
| content    = {{pagejobs}}
| content    = {{Species}}
}}</pre>
}}</pre>
{{FrameBox
{{FrameBox
| color      = BBA0DD
| color      = BBA0DD
| image      = Generic botanist.png
| image      = Autowiki-Botanist.png
| title      = Departments and Roles
| title      = Species
| content    = {{pagejobs}}
| content    = {{Species}}
}}
}}


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
<templatedata>
{
"params": {
"color": {
"type": "string",
"description": "RGB-color of the title-background (anything that would fit behind a '#' like 'BBA0DD'",
"default": "888"
},
"image": {
"type": "wiki-file-name",
"description": "Image to be displayed on the left and right of the titlebar "
},
"title": {
"type": "string",
"required": true,
"description": "Centered text in the title"
},
"content": {
"type": "content",
"required": true,
"description": "Content to be displayed in the infobox"
}
}
}
</templatedata></noinclude>

Latest revision as of 21:21, 29 January 2024


About

Infobox with title and content, intended use in Main Page and Administrators.

Examples

Bare 1

{{FrameBox}}
No Title!
No Content!

Bare 2

{{FrameBox
|color=
|image=
|title=
|content=
}}
[[file:|left|24px]]'[[file:|right|24px]]

Normal

{{FrameBox
| color      = BBA0DD
| image      = Autowiki-Botanist.png
| title      = Species
| content    = {{Species}}
}}

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
colorcolor

RGB-color of the title-background (anything that would fit behind a '#' like 'BBA0DD'

Default
888
Stringoptional
imageimage

Image to be displayed on the left and right of the titlebar

Fileoptional
titletitle

Centered text in the title

Stringrequired
contentcontent

Content to be displayed in the infobox

Contentrequired