Template:Collapse: Difference between revisions
From Space Station 14 Wiki
(Created page with "<includeonly><!-- --><div class="mw-collapsible {{#if: {{{collapsed|1}}}|mw-collapsed}}" style="{{{style|}}}">{{{1}}}</div></includeonly><noinclude> {{documentation}} Category:Markup templates <templatedata> { "params": { "1": { "label": "Content", "description": "Content inside the box.", "type": "string", "required": true }, "collapsed": { "label": "Is collapsed by default?", "type": "boolean", "default": "1", "suggested": true...") |
(template styles template used instead of direct cat link; moved from markup template to spoiler templates cat) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
# template styles | |||
--><templatestyles src="Template:Collapse/styles.css" /><!-- | |||
# template | |||
--><div | --><div | ||
class="mw-collapsible {{#if: {{{collapsed|1}}}|mw-collapsed}}" | class=" | ||
mw-collapsible | |||
{{#if: {{{collapsed|1}}}|mw-collapsed}} | |||
expand-collapse-button-float-{{{button float|none}}}" | |||
style="{{{style|}}}">{{{1}}}</div></includeonly><noinclude> | style="{{{style|}}}">{{{1}}}</div></includeonly><noinclude> | ||
{{documentation}} | {{documentation|bb= | ||
{{uses template styles}} | |||
}} | |||
[[Category: | [[Category:Spoiler templates]] | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 25: | Line 34: | ||
"example": "width: 10rem;", | "example": "width: 10rem;", | ||
"type": "string", | "type": "string", | ||
"suggested": true | |||
}, | |||
"button float": { | |||
"label": "Button float", | |||
"description": "Placement for the \"Expand/Collapse\" button using float.", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"left", | |||
"right", | |||
"none" | |||
], | |||
"default": "none", | |||
"suggested": true | "suggested": true | ||
} | } | ||
}, | }, | ||
"description": "A template for creating collapsible blocks | "description": "A template for creating collapsible blocks.", | ||
"paramOrder": [ | "paramOrder": [ | ||
"1", | "1", | ||
"collapsed", | "collapsed", | ||
"style" | "style", | ||
"button float" | |||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Latest revision as of 11:31, 15 August 2024
Uses template styles
This template uses template styles found in:
- As a separate string of text
{{Collapse|text inside!!}}
:
- Inside a string of text
Lorem ipsum {{Collapse|text inside!!}} dolor sit amet
:
A template for creating collapsible blocks.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Content | 1 | Content inside the box. | String | required |
Is collapsed by default? | collapsed | no description
| Boolean | suggested |
Any custom styling | style | no description
| String | suggested |
Button float | button float | Placement for the "Expand/Collapse" button using float.
| String | suggested |