Template:Box: Difference between revisions

From AYSO Wiki
Content deleted Content added
No edit summary
m 39 revisions imported: Import changes since February 9, 2026
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><div class="card {{{class|}}} with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
<includeonly><div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
style="grid-column:auto / span 1; width:auto !important; max-width:none !important; min-width:0 !important; float:none !important; box-sizing:border-box; height:340px; position:relative; overflow:hidden; background-position:center; background-repeat:no-repeat; background-size:cover; {{{style|}}}"
style="grid-column:auto / span 1; width:auto !important; max-width:none !important; min-width:0 !important; float:none !important; box-sizing:border-box; height:340px; position:relative; overflow:hidden; background-position:center; background-repeat:no-repeat; background-size:cover;"
{{#if:{{{image|}}}|data-background="{{#ifeq:{{{image|}}}|default|/w/extensions/MyWikisLocalConfig/Ayso-logo.png|{{filepath:{{PAGENAME:{{{image|}}}}}}}}}"}}><!--
{{#if:{{{image|}}}|data-background="{{#ifeq:{{{image|}}}|default|/w/extensions/MyWikisLocalConfig/Ayso-logo.png|{{filepath:{{PAGENAME:{{{image|}}}}}}}}}"}}><!--


Line 37: Line 37:
|image=
|image=
|content=
|content=
|class=
|style=
}}
}}
</pre>
</pre>
;Example
;Example
(Wrapped into [[Template:Boxes]])
{{Boxes|
{{Boxes|
{{Box
{{Box|title=Sports Connect|target=Sports Connect|header=bottom|image=Ayso-connect.png}}
|title=Sports Connect
{{Box|title=AYSOU|target=AYSOU|header=bottom|image=Ayso-circle.png}}
|target=Sports Connect
{{Box|title=Background Checks|target=Background Checks|header=bottom|image=Ayso-run.png}}
|header=bottom
|image=Ayso-connect.png
}}
{{Box
|title=AYSOU
|target=AYSOU
|header=bottom
|image=Ayso-circle.png
}}
{{Box
|title=Background Checks
|target=Background Checks
|header=bottom
|image=Ayso-run.png
}}
}}
}}
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"header": {
"header": { "label": "Box header position", "description": "Set to \"bottom\" to move header down. Otherwise it will show up at the top.", "type": "string" },
"label": "Box header position",
"image": { "label": "Image", "description": "Name of the uploaded image to be shown as the box background.", "type": "wiki-file-name" },
"description": "Set to \"bottom\" to move header down. Otherwise it will show up at the top.",
"target": { "label": "Link target", "description": "Name of the page to link the box to.", "type": "wiki-page-name" },
"type": "string"
"title": { "label": "Box title", "description": "If not set, falls back to `target`.", "type": "string" },
},
"content": { "label": "Box content", "description": "Arbitrary wikitext adapted for use inside templates.", "type": "content" },
"image": {
"class": { "label": "Extra CSS class", "description": "Optional CSS class added to the card.", "type": "string" },
"label": "Image",
"style": { "label": "Inline style", "description": "Optional inline CSS appended to the card.", "type": "string" }
"description": "Name of the uploaded image to be shown as the box background.",
"type": "wiki-file-name"
},
"target": {
"label": "Link target",
"description": "Name of the page to link the box to.",
"type": "wiki-page-name"
},
"title": {
"label": "Box title",
"description": "If not set, falls back to `target`.",
"type": "string"
},
"content": {
"label": "Box content",
"description": "Arbitrary wikitext adapted for use inside templates.",
"type": "content"
}
},
},
"description": "Creates a box.",
"description": "Creates a box.",
"paramOrder": [
"paramOrder": [ "title", "header", "target", "image", "content", "class", "style" ]
"title",
"header",
"target",
"image",
"content"
]
}
}
</templatedata>
</templatedata>

Latest revision as of 02:04, 19 February 2026

Usage
{{Box
|title=
|target=
|header=
|image=
|content=
}}
Example

(Wrapped into Template:Boxes)

Creates a box.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Box titletitle

If not set, falls back to `target`.

Stringoptional
Box header positionheader

Set to "bottom" to move header down. Otherwise it will show up at the top.

Stringoptional
Link targettarget

Name of the page to link the box to.

Page nameoptional
Imageimage

Name of the uploaded image to be shown as the box background.

Fileoptional
Box contentcontent

Arbitrary wikitext adapted for use inside templates.

Contentoptional