Vorlage:Banner: Unterschied zwischen den Versionen

Banner>WikiSysop
 
K (1 Version importiert)
 

This template creates an intro banner on a page. The banner should contain an image (optional), a title and 2-3 lines of text.

Add new banner

Vorlagenparameter

Parameter Beschreibung Typ Status
Banner image (optional) banner-image

Image name, without the File: prefix

Standard
leer
Beispiel
myimage.png
Autowert
leer
Unbekannt vorgeschlagen
Image width (if image is used) image-width

Width in pixels. Default setting is 200

Standard
200
Beispiel
leer
Autowert
leer
Nummer vorgeschlagen
Image alignment imagealign

keine Beschreibung

Standard
left
Beispiel
left, right
Autowert
leer
Unbekannt vorgeschlagen
Heading (optional) banner-title

Box heading

Standard
leer
Beispiel
leer
Autowert
leer
Zeichenfolge vorgeschlagen
Heading size titlesize

keine Beschreibung

Standard
1.6em
Beispiel
2em, 15px
Autowert
leer
Unbekannt vorgeschlagen
Text banner-text

1-3 lines of text

Standard
leer
Beispiel
leer
Autowert
leer
Inhalt vorgeschlagen
Text size textsize

keine Beschreibung

Standard
1.3em
Beispiel
12px, 1em
Autowert
leer
Unbekannt vorgeschlagen
Background color (optional) boxbgcolor

Default is grey (#efefef). Replace with any hex value, (e.g. #ffffe6)

Standard
#efefef
Beispiel
leer
Autowert
leer
Zeichenfolge vorgeschlagen
Heading color hcolor

Color of the heading.

Standard
#000000
Beispiel
#ffffff
Autowert
leer
Unbekannt vorgeschlagen
Text color textcolor

keine Beschreibung

Standard
#000000
Beispiel
#000000
Autowert
leer
Unbekannt veraltet
Padding of the container box (optional) boxpadding

Sets the padding for the box in pixels. Default is 20.

Standard
0
Beispiel
8
Autowert
Nummer vorgeschlagen
Border (optional) boxborder

adds a border around the box

Standard
leer
Beispiel
1px solid #efefef
Autowert
leer
Unbekannt vorgeschlagen
Content padding (optional) contentpadding

Text padding independent from box padding. Default is 0.

Standard
0
Beispiel
0 0 0 10
Autowert
leer
Nummer vorgeschlagen
Vertical alignment of the box content boxalignitems

Box can be top-aligned with value "start" or center-aligned (value "center")

Standard
start
Beispiel
start, center
Autowert
leer
Zeichenfolge vorgeschlagen
Margin around title titlemargin

Allows to customize the margin around the title (e.g,. 0px 0px 0px 0px)

Standard
leer
Beispiel
0px 0px 0px 0px
Autowert
leer
Unbekannt vorgeschlagen
<includeonly><templatestyles src="Banner/styles.css" /><div class="bannerbox" style="{{#if:{{{boxalignitems|}}}|align-items:{{{boxalignitems}}};|}}{{#ifeq:{{{imagealign|}}}|right|flex-direction:row-reverse;|flex-dirction:row;}}{{#if:{{{boxbgcolor|}}}|background:{{{boxbgcolor}}};|}}{{#if:{{{boxpadding|}}}|padding:{{{boxpadding}}}px;|}}{{#if:{{{boxborder|}}}|border:{{{boxborder}}};|}}">
        
        {{#if:{{{banner-image|}}}|<div class="banner-image">[[File:{{{banner-image}}}|{{{image-width|200}}}x{{{image-width|200}}}px|link=]]</div>|}}<div class="banner-content" {{#if:{{{contentpadding|}}}|style="padding:{{{contentpadding}}}px"|}}>{{#if:{{{banner-title|}}}|<div class="banner-title"><h1 style="{{#if:{{{titlesize|}}}|font-size:{{{titlesize}}};|}}{{#if:{{{titlemargin|}}}|margin:{{{titlemargin}}};|}}{{#if:{{{hcolor|}}}|color={{{hcolor}}};|}}">{{{banner-title}}}</h1></div>|}}{{#if:{{{banner-text|}}}|<div class="banner-text" style="{{#if:{{{textcolor|}}}|color:{{{textcolor}}};|}}{{#if:{{{textsize|}}}|color:{{{textsize}}};|}}">{{{banner-text}}}</div>|}}</div></div></includeonly><noinclude>
        
        This template creates an intro banner on a page. The banner should contain an image (optional), a title and 2-3 lines of text.
        
        
        
        
        <templatedata>
        
        {
        
        	"params": {
        
        		"banner-image": {
        
        			"description": "Image name, without the File: prefix",
        
        			"label": "Banner image (optional)",
        
        			"example": "myimage.png",
        
        			"suggested": true
        
        		},
        
        		"banner-title": {
        
        			"type": "string",
        
        			"suggested": true,
        
        			"label": "Heading (optional)",
        
        			"description": "Box heading"
        
        		},
        
        		"banner-text": {
        
        			"label": "Text",
        
        			"description": "1-3 lines of text",
        
        			"type": "content",
        
        			"suggested": true
        
        		},
        
        		"boxbgcolor": {
        
        			"label": "Background color (optional)",
        
        			"description": "Default is grey (#efefef). Replace with any hex value, (e.g. #ffffe6)",
        
        			"type": "string",
        
        			"suggested": true,
        
        			"default": "#efefef"
        
        		},
        
        		"boxpadding": {
        
        			"label": "Padding of the container box (optional)",
        
        			"description": "Sets the padding for the box in pixels. Default is 20.",
        
        			"type": "number",
        
        			"example": "8",
        
        			"suggested": true,
        
        			"default": "0",
        
        			"autovalue": ""
        
        		},
        
        		"contentpadding": {
        
        			"label": "Content padding (optional)",
        
        			"description": "Text padding independent from box padding. Default is 0.",
        
        			"type": "number",
        
        			"example": "0 0 0 10",
        
        			"default": "0",
        
        			"suggested": true
        
        		},
        
        		"image-width": {
        
        			"label": "Image width (if image is used)",
        
        			"description": "Width in pixels. Default setting is 200",
        
        			"type": "number",
        
        			"suggested": true,
        
        			"default": "200"
        
        		},
        
        		"boxalignitems": {
        
        			"label": "Vertical alignment of the box content",
        
        			"example": "start, center",
        
        			"type": "string",
        
        			"description": "Box can be top-aligned with value \"start\" or center-aligned (value \"center\")",
        
        			"default": "start",
        
        			"suggested": true
        
        		},
        
        		"titlemargin": {
        
        			"label": "Margin around title",
        
        			"description": "Allows to customize the margin around the title (e.g,. 0px 0px 0px 0px)",
        
        			"example": " 0px 0px 0px 0px",
        
        			"suggested": true
        
        		},
        
        		"boxborder": {
        
        			"label": "Border (optional)",
        
        			"description": "adds a border around the box",
        
        			"example": "1px solid #efefef",
        
        			"suggested": true
        
        		},
        
        		"textcolor": {
        
        			"label": "Text color",
        
        			"example": "#000000",
        
        			"default": "#000000",
        
        			"deprecated": true,
        
        			"suggested": true
        
        		},
        
        		"hcolor": {
        
        			"label": "Heading color",
        
        			"description": "Color of the heading. ",
        
        			"example": "#ffffff",
        
        			"default": "#000000",
        
        			"suggested": true
        
        		},
        
        		"imagealign": {
        
        			"label": "Image alignment",
        
        			"example": "left, right",
        
        			"default": "left",
        
        			"suggested": true
        
        		},
        
        		"titlesize": {
        
        			"label": "Heading size",
        
        			"example": "2em, 15px",
        
        			"default": "1.6em",
        
        			"suggested": true
        
        		},
        
        		"textsize": {
        
        			"label": "Text size",
        
        			"example": "12px, 1em",
        
        			"default": "1.3em",
        
        			"suggested": true
        
        		}
        
        	},
        
        	"paramOrder": [
        
        		"banner-image",
        
        		"image-width",
        
        		"imagealign",
        
        		"banner-title",
        
        		"titlesize",
        
        		"banner-text",
        
        		"textsize",
        
        		"boxbgcolor",
        
        		"hcolor",
        
        		"textcolor",
        
        		"boxpadding",
        
        		"boxborder",
        
        		"contentpadding",
        
        		"boxalignitems",
        
        		"titlemargin"
        
        	],
        
        	"description": "Add new banner"
        
        }
        
        
        </templatedata>
        
        
        </noinclude>
(kein Unterschied)

Anhänge

Diskussionen