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> |
||
{{ |
{{Boxes| |
||
| ⚫ | |||
|title= |
|||
| ⚫ | |||
|target= |
|||
| ⚫ | |||
|header= |
|||
{{Box|...}} |
|||
|image= |
|||
{{Box|...}} |
|||
|content= |
|||
}} |
}} |
||
</pre> |
</pre> |
||
;Example |
|||
(Wrapped into [[Template:Boxes]]) |
|||
{{Boxes| |
|||
| ⚫ | |||
|title=Sports Connect |
|||
|target=Sports Connect |
|||
|header=bottom |
|||
|image=Ayso-connect.png |
|||
}} |
|||
| ⚫ | |||
|title=AYSOU |
|||
|target=AYSOU |
|||
|header=bottom |
|||
|image=Ayso-circle.png |
|||
}} |
|||
| ⚫ | |||
|title=Background Checks |
|||
|target=Background Checks |
|||
|header=bottom |
|||
|image=Ayso-run.png |
|||
}} |
|||
}} |
|||
<templatedata> |
<templatedata> |
||
{ |
{ |
||
"params": { |
|||
"1": { |
|||
"label": "Content", |
|||
| ⚫ | |||
"description": "Set to \"bottom\" to move header down. Otherwise it will show up at the top.", |
|||
"type": "content" |
|||
}, |
|||
"class": { |
|||
"label": "Class", |
|||
"description": "CSS class name to position / style the Boxes block.", |
|||
"example": "mt-5", |
|||
| ⚫ | |||
}, |
|||
} |
|||
"target": { |
|||
| ⚫ | |||
"label": "Link target", |
|||
"description": "A wrapper templates for boxes." |
|||
"type": "wiki-page-name" |
|||
}, |
|||
"title": { |
|||
"label": "Box title", |
|||
"description": "If not set, falls back to `target`.", |
|||
| ⚫ | |||
}, |
|||
"content": { |
|||
"label": "Box content", |
|||
"description": "Arbitrary wikitext adapted for use inside templates.", |
|||
"type": "content" |
|||
} |
|||
| ⚫ | |||
| ⚫ | |||
"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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Content | 1 | Instances of Template:Box. | Content | optional |
| Class | class | CSS class name to position / style the Boxes block.
| String | optional |

