Template:Boxes: Difference between revisions

From AYSO Wiki
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly><div class="ayso-card-deck {{{class|}}}"
style="display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:24px; align-items:stretch;">
<div class="ayso-box-item" style="min-width:0; box-sizing:border-box;">
{{{1|}}}</div></includeonly><noinclude>
<div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary"
style="width:100%; max-width:100%; min-width:0; 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|}}}}}}}}}"}}><!--

-->{{#ifeq:{{{header|}}}|bottom||{{#if:{{{target|}}}
|[[{{{target|}}}|<div class="card-header">{{{title|Title}}}</div>]]
|<div class="card-header">{{{title|Title}}}</div>
}}}}<!--

-->{{#if:{{{target|}}}
|[[{{{target|}}}|{{#if: {{{content|}}}
|<div class="card-body">
{{{content|}}}</div>
|<div class="card-body"></div>
}}]]
|<div class="card-body">
{{{content|}}}</div>
}}<!--

-->{{#ifeq:{{{header|}}}|bottom|{{#if:{{{target|}}}
|[[{{{target|}}}|<div class="card-footer"
style="position:absolute; left:0; right:0; bottom:28px; height:48px; display:flex; align-items:center; justify-content:center;">
{{{title|Title}}}
</div>]]
|<div class="card-footer"
style="position:absolute; left:0; right:0; bottom:28px; height:48px; display:flex; align-items:center; justify-content:center;">
{{{title|Title}}}
</div>
}}|}}
</div>
</div>
</includeonly>

<noinclude>
;Usage
;Usage
<pre>
<pre>
{{Box
{{Boxes|
{{Box|...}}
|title=
{{Box|...}}
|target=
{{Box|...}}
|header=
{{Box|...}}
|image=
{{Box|...}}
|content=
}}
}}
</pre>
</pre>

;Example
(Wrapped into [[Template:Boxes]])
{{Boxes|
{{Box
|title=Sports Connect
|target=Sports Connect
|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": {
"1": {
"label": "Box header position",
"label": "Content",
"description": "Instances of Template:Box.",
"description": "Set to \"bottom\" to move header down. Otherwise it will show up at the top.",
"type": "string"
"type": "content"
},
},
"image": {
"class": {
"label": "Image",
"label": "Class",
"description": "Name of the uploaded image to be shown as the box background.",
"description": "CSS class name to position / style the Boxes block.",
"type": "wiki-file-name"
"example": "mt-5",
"type": "string"
},
}
"target": {
},
"label": "Link target",
"description": "Name of the page to link the box to.",
"description": "A wrapper templates for boxes."
"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.",
"paramOrder": [
"title",
"header",
"target",
"image",
"content"
]
}
}
</templatedata>
</templatedata></noinclude>
</noinclude>

Revision as of 10:33, 12 February 2026

Usage
{{Boxes|
{{Box|...}}
{{Box|...}}
{{Box|...}}
{{Box|...}}
{{Box|...}}
}}

A wrapper templates for boxes.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Content1

Instances of Template:Box.

Contentoptional
Classclass

CSS class name to position / style the Boxes block.

Example
mt-5
Stringoptional