Template:Box: Difference between revisions
From AYSO Wiki
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
| ⚫ | |||
<div class="card with-{{#ifeq:{{{header|}}}|bottom|footer|header}} border border-primary" |
|||
style=" |
style="height:340px; display:flex; flex-direction:column; background-position:center; background-repeat:no-repeat; background-size:cover; padding:14px;" |
||
{{#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 19: | Line 20: | ||
-->{{#ifeq:{{{header|}}}|bottom|{{#if:{{{target|}}} |
-->{{#ifeq:{{{header|}}}|bottom|{{#if:{{{target|}}} |
||
|[[{{{target|}}}|<div class="card-footer">{{{title|Title}}}</div>]] |
|[[{{{target|}}}|<div class="card-footer" style="margin-top:auto;">{{{title|Title}}}</div>]] |
||
|<div class="card-footer">{{{title|Title}}}</div> |
|<div class="card-footer" style="margin-top:auto;">{{{title|Title}}}</div> |
||
}}|}} |
}}|}} |
||
</div> |
|||
| ⚫ | |||
</includeonly> |
|||
... |
|||
<noinclude> |
|||
;Usage |
|||
<pre> |
|||
{{Box |
|||
|title= |
|||
|target= |
|||
|header=bottom |
|||
|image= |
|||
|content= |
|||
}} |
|||
</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> |
|||
{ |
|||
"params": { |
|||
"header": { |
|||
"label": "Box header position", |
|||
"description": "Set to \"bottom\" to move header down. Otherwise it will show up at the top.", |
|||
"type": "string" |
|||
}, |
|||
"image": { |
|||
"label": "Image", |
|||
"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 styled program box.", |
|||
"paramOrder": [ |
|||
"title", |
|||
"header", |
|||
"target", |
|||
"image", |
|||
"content" |
|||
] |
|||
} |
|||
</templatedata> |
|||
</noinclude> |
</noinclude> |
||
Revision as of 09:41, 12 February 2026
- Usage
{{Box
|title=
|target=
|header=bottom
|image=
|content=
}}
- Example (Wrapped into Template:Boxes)
Creates a styled program box.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Box title | title | If not set, falls back to `target`. | String | optional |
| Box header position | header | Set to "bottom" to move header down. Otherwise it will show up at the top. | String | optional |
| Link target | target | Name of the page to link the box to. | Page name | optional |
| Image | image | Name of the uploaded image to be shown as the box background. | File | optional |
| Box content | content | Arbitrary wikitext adapted for use inside templates. | Content | optional |

