Difference between revisions of "Template:Banner"
(Tag: 2017 source edit) |
(Tag: 2017 source edit) |
The template files can be downloaded in the template package.
The following parameters can be set in vidual editing mode:
Banner template for portal pages
optionalText headingStringSets the padding for the box in pixels. Default is 20.NumberText padding independent from box padding. Default is 0.Numberboxalignitems
Allows to customize the margin of the title (e.g,. 0px 0px 0px 0px)
Parameter | Description | Type | Status | ||||||
---|---|---|---|---|---|---|---|---|---|
Image name | banner-image |
Image name, without the File: prefix
|
File | required | |||||
Image width |
image-width
|
Width in pixels. Default setting is 200
|
Number | optional | |||||
Heading |
banner-title
|
Title |
title
|
no description
|
String | suggested | |||
Text |
banner-text
|
1-3 lines of text
|
Content | optional | |||||
Background color |
boxbgcolor
|
Default is grey (#efefef). Replace with any hex value, (e.g. #ffffe6)optional | |||||||
Section |
section
|
no description
|
Unknown | optional | Padding of the container box |
boxpadding
|
|||
Direction |
direction
|
no description
|
Unknown | optional | Content padding |
contentpadding
|
|||
Section-id |
section-id
|
no description
|
Unknown | optional | Vertical alignment of the box content | ||||
Short quote | short quote |
no description
|
String | optional | Title margin |
titlemargin
|
|
Unknown | optional |
<includeonly><templatestyles src="Banner/styles.css" /><div class="bannerbox" style="align-items:{{{boxalignitems|start}}}; background:{{{boxbgcolor|#efefef}}}; padding:{{{boxpadding|20}}}px"portal-bannerbox"> {{#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> This templates creates an intro banner on a page. The banner should contain an image (optional), a title and 2-3 lines of text. The template files can be downloaded in the [[Manual:Template/Template package|template package]]. [[File:template-download-Banner.PNG|550x550px|center|alt=screenshot of banner template|thumb|Banner examples]] <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)" } }, "paramOrder": [ "banner-image", "image-width", "banner-title", "banner-text", "boxbgcolor", "boxpadding", "contentpadding", "boxalignitems", "titlemargin" ], "description": "The following parameters can be set in vidual editing mode:" <div class="bannertitle">{{{banner-title|}}}</div> {{#if:{{{short quote|}}}|[[File:{{{image}}}|left|frameless|link=]]}} {{#if:{{{short quote|}}}|<div class="portal-shortquote">{{{short quote}}}</div>}} </div></includeonly> <noinclude> <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": {} }, "description": "Banner template for portal pages", "paramOrder": [ "image", "title", "section", "direction", "section-id", "short quote" ] } </templatedata> </noinclude>
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | <includeonly><div class="portal-bannerbox"><div class="bannertitle">{{{banner-title|}}}</div> | |
− | <includeonly>< | + | {{#if:{{{short quote|}}}|[[File:{{{image}}}|left|frameless|link=]]}} |
− | {{#if:{{{ | + | {{#if:{{{short quote|}}}|<div class="portal-shortquote">{{{short quote}}}</div>}} |
− | + | </div></includeonly> | |
− | + | <noinclude> | |
− | |||
− | |||
<templatedata> | <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": {} | |
− | + | }, | |
− | + | "description": "Banner template for portal pages", | |
− | + | "paramOrder": [ | |
− | + | "image", | |
− | + | "title", | |
− | + | "section", | |
− | + | "direction", | |
− | + | "section-id", | |
− | + | "short quote" | |
− | + | ] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |