Difference between revisions of "Template:Banner"
Fbaeckmann (talk | contribs) (Tag: 2017 source edit) |
eval>WikiSysop |
[[File:{{{image}}}|left|frameless|link=]]
Template for MediaWiki/Homepage redesign. The CSS is in MediaWiki:Gadget-site.css. See also Template:Full-width image.Template for full-width images with inset text.Banner template with image, title and text
requiredno descriptionno descriptionUnknownno descriptionUnknownno descriptionUnknownno descriptionUnknownbanner-title
Parameter | Description | Type | Status | ||||
---|---|---|---|---|---|---|---|
Image name | banner-image |
Image name, without the File: prefix
|
File | optional | Title |
title
|
|
Image width |
image-width
|
Width in pixels. Default setting is 200
|
Number | optional | |||
Heading |
banner-title
|
Text heading
|
String | optionalsuggested | |||
SectionText |
section
|
banner-text
|
1-3 lines of text
|
Content | optional | ||
DirectionBackground color |
direction
|
boxbgcolor
|
Default is grey (#efefef). Replace with any hex value, (e.g. #ffffe6)
|
String | optional | Section-id |
section-id
|
Padding of the container box |
boxpadding
|
Sets the padding for the box in pixels. Default is 20.
|
Number | optional | Short quote |
short quote
|
|
Content padding |
contentpadding
|
Text padding independent from box padding. Default is 0.
|
Number | optional | Banner-title | ||
Vertical alignment of the box content | boxalignitems |
no description
|
String | suggested | optional | ||
Title margin |
titlemargin
|
Allows to customize the margin of the title (e.g,. 0px 0px 0px 0px)
|
Unknown | optional |
<!-- <includeonly><templatestyles src="Banner/styles.css" /><div class="banner-image nomobilebannerbox" style="align-items:{{{boxalignitems|start}}}; background:{{{boxbgcolor|#efefef}}}; padding:{{{boxpadding|20}}}px"> <div class="banner-box banner-box-{{{direction}}}"> <div class="name">{{{title}}}</div> <div class="type">{{{section}}}</div> </div> --> <!--</div>--> <div class="portal-bannerbox"> <h1>{{{banner-title|}}}</h1> [[File:{{{image}}}|left|frameless|link=]] {{#if:{{{short quote|}}}|<div class="portal-shortquote">{{{short quote}}}</div>}} </div> <noinclude> Template for [[MediaWiki/Homepage redesign]]. The CSS is in [[MediaWiki:Gadget-site.css]]. See also [[Template:Full-width image]]. <templatedata> { "params": { "direction": {}, "title": { "type": "string", "required": false }, "section": {}, "image": { "description": "Image name, without the File: prefix", "example": "Example.png", "required": true, "type": "wiki-file-name" }, "section-id": {}, "short quote": {}, "banner-title": { "type": "string", "suggested": true } }, "description": "Template for full-width images with inset text.", "paramOrder": [ "image", "title", "section", "direction", "section-id", "short quote", "banner-title{{#if:{{{banner-image|}}}|<div class="banner-image">[[File:{{{banner-image}}}|left|{{{image-width|200}}}x{{{image-width|200}}}px|link=]]</div>|}}<div class="banner-content" style="padding:{{{contentpadding|0}}}px;">{{#if:{{{banner-title|}}}|<div class="banner-title"><h1 style="margin:{{{titlemargin|margin:12px 0 0 0; }}}>{{{banner-title}}}</h1></div>|}}{{#if:{{{banner-text|}}}|<div class="banner-text">{{{banner-text}}}</div>|}}</div></div></includeonly><noinclude> <templatedata> { "params": { "banner-image": { "description": "Image name, without the File: prefix", "type": "wiki-file-name", "label": "Image name" }, "banner-title": { "type": "string", "suggested": true, "label": "Heading", "description": "Text heading" }, "banner-text": { "label": "Text", "description": "1-3 lines of text", "type": "content" }, "boxbgcolor": { "label": "Background color", "description": "Default is grey (#efefef). Replace with any hex value, (e.g. #ffffe6)", "type": "string" }, "boxpadding": { "label": "Padding of the container box", "description": "Sets the padding for the box in pixels. Default is 20.", "type": "number" }, "contentpadding": { "label": "Content padding", "description": "Text padding independent from box padding. Default is 0.", "type": "number" }, "image-width": { "label": "Image width", "description": "Width in pixels. Default setting is 200", "type": "number" }, "boxalignitems": { "label": "Vertical alignment of the box content", "example": "start, center", "type": "string" }, "titlemargin": { "label": "Title margin", "description": "Allows to customize the margin of the title (e.g,. 0px 0px 0px 0px)" } }, "description": "Banner template with image, title and text", "paramOrder": [ "banner-image", "image-width", "banner-title", "banner-text", "boxbgcolor", "boxpadding", "contentpadding", "boxalignitems", "titlemargin" ] } </templatedata> </noinclude>
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <includeonly><templatestyles src="Banner/styles.css" /><div class="bannerbox" style="align-items:{{{boxalignitems|start}}}; background:{{{boxbgcolor|#efefef}}}; padding:{{{boxpadding|20}}}px"> | ||
+ | {{#if:{{{banner-image|}}}|<div class="banner-image">[[File:{{{banner-image}}}|left|{{{image-width|200}}}x{{{image-width|200}}}px|link=]]</div>|}}<div class="banner-content" style="padding:{{{contentpadding|0}}}px;">{{#if:{{{banner-title|}}}|<div class="banner-title"><h1 style="margin:{{{titlemargin|margin:12px 0 0 0; }}}>{{{banner-title}}}</h1></div>|}}{{#if:{{{banner-text|}}}|<div class="banner-text">{{{banner-text}}}</div>|}}</div></div></includeonly><noinclude> | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
− | " | + | "banner-image": { |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
"description": "Image name, without the File: prefix", | "description": "Image name, without the File: prefix", | ||
− | " | + | "type": "wiki-file-name", |
− | + | "label": "Image name" | |
− | " | ||
}, | }, | ||
− | |||
− | |||
"banner-title": { | "banner-title": { | ||
"type": "string", | "type": "string", | ||
− | "suggested": true | + | "suggested": true, |
+ | "label": "Heading", | ||
+ | "description": "Text heading" | ||
+ | }, | ||
+ | "banner-text": { | ||
+ | "label": "Text", | ||
+ | "description": "1-3 lines of text", | ||
+ | "type": "content" | ||
+ | }, | ||
+ | "boxbgcolor": { | ||
+ | "label": "Background color", | ||
+ | "description": "Default is grey (#efefef). Replace with any hex value, (e.g. #ffffe6)", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "boxpadding": { | ||
+ | "label": "Padding of the container box", | ||
+ | "description": "Sets the padding for the box in pixels. Default is 20.", | ||
+ | "type": "number" | ||
+ | }, | ||
+ | "contentpadding": { | ||
+ | "label": "Content padding", | ||
+ | "description": "Text padding independent from box padding. Default is 0.", | ||
+ | "type": "number" | ||
+ | }, | ||
+ | "image-width": { | ||
+ | "label": "Image width", | ||
+ | "description": "Width in pixels. Default setting is 200", | ||
+ | "type": "number" | ||
+ | }, | ||
+ | "boxalignitems": { | ||
+ | "label": "Vertical alignment of the box content", | ||
+ | "example": "start, center", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "titlemargin": { | ||
+ | "label": "Title margin", | ||
+ | "description": "Allows to customize the margin of the title (e.g,. 0px 0px 0px 0px)" | ||
} | } | ||
}, | }, | ||
− | "description": " | + | "description": "Banner template with image, title and text", |
"paramOrder": [ | "paramOrder": [ | ||
− | "image", | + | "banner-image", |
− | "title", | + | "image-width", |
− | " | + | "banner-title", |
− | " | + | "banner-text", |
− | " | + | "boxbgcolor", |
− | " | + | "boxpadding", |
− | " | + | "contentpadding", |
+ | "boxalignitems", | ||
+ | "titlemargin" | ||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |