Template:Box: Difference between revisions

From AYSO Wiki
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
<div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
style="height:340px; position:relative; overflow:hidden; background-position:center; background-repeat:no-repeat; background-size:cover; padding-bottom:52px;"
style="height:340px; position:relative; overflow:hidden; background-position:center; background-repeat:no-repeat; background-size:cover; padding-bottom:64px;"
{{#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 20: Line 20:


-->{{#ifeq:{{{header|}}}|bottom|{{#if:{{{target|}}}
-->{{#ifeq:{{{header|}}}|bottom|{{#if:{{{target|}}}
|[[{{{target|}}}|<div class="card-footer" style="position:absolute; left:0; right:0; bottom:0;">{{{title|Title}}}</div>]]
|[[{{{target|}}}|<div class="card-footer" style="position:absolute; left:0; right:0; bottom:0; height:56px; display:flex; align-items:center; justify-content:center; padding:0 12px; box-sizing:border-box;">{{{title|Title}}}</div>]]
|<div class="card-footer" style="position:absolute; left:0; right:0; bottom:0;">{{{title|Title}}}</div>
|<div class="card-footer" style="position:absolute; left:0; right:0; bottom:0; height:56px; display:flex; align-items:center; justify-content:center; padding:0 12px; box-sizing:border-box;">{{{title|Title}}}</div>
}}|}}
}}|}}
</div>
</div>
Line 38: Line 38:
</pre>
</pre>


;Example (Wrapped into [[Template:Boxes]])
;Example
(Wrapped into [[Template:Boxes]])
{{Boxes|
{{Boxes|
{{Box
{{Box
Line 90: Line 89:
}
}
},
},
"description": "Creates a box.",
"description": "Creates a styled program box.",
"paramOrder": [
"paramOrder": [
"title",
"title",

Revision as of 09:48, 12 February 2026


Usage
{{Box
|title=
|target=
|header=bottom
|image=
|content=
}}
Example (Wrapped into Template:Boxes)

Creates a styled program 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