Difference between revisions of "Template:Collapse/doc"
Jump to navigation
Jump to search
Margotbean (talk | contribs) |
m (Replace deprecated <source> tags with <syntaxhighlight> tags) |
||
Line 8: | Line 8: | ||
<pre> | <pre> | ||
{{collapse | {{collapse | ||
− | |content = < | + | |content = <syntaxhighlight lang="c#"> |
Lots of code here | Lots of code here | ||
− | </ | + | </syntaxhighlight> |
}} | }} | ||
</pre> | </pre> | ||
{{collapse | {{collapse | ||
− | |content = < | + | |content = <syntaxhighlight lang="c#"> |
Lots of code here | Lots of code here | ||
− | </ | + | </syntaxhighlight> |
}} | }} | ||
Line 24: | Line 24: | ||
{{collapse | {{collapse | ||
|code | |code | ||
− | |content = < | + | |content = <syntaxhighlight lang="c#"> |
Lots of code here | Lots of code here | ||
− | </ | + | </syntaxhighlight> |
}} | }} | ||
</pre> | </pre> | ||
{{collapse|code| | {{collapse|code| | ||
− | |content = < | + | |content = <syntaxhighlight lang="c#"> |
Lots of code here | Lots of code here | ||
− | </ | + | </syntaxhighlight> |
}} | }} | ||
Revision as of 16:50, 19 February 2021
Description
This template creates a collapsible box for extended content. This should be used sparingly, since it reduces readability.
This template may also be used to hide "spoiler" content.
Basic usage
Default usage
{{collapse |content = <syntaxhighlight lang="c#"> Lots of code here </syntaxhighlight> }}
Details |
---|
Lots of code here
|
Named section
{{collapse |code |content = <syntaxhighlight lang="c#"> Lots of code here </syntaxhighlight> }}
code |
---|
Lots of code here
|
Collapse spoilers
{{collapse |Solution |content=Solve the puzzle by performing action x during a full moon on the 12th day of any season. }}
Solution |
---|
Solve the puzzle by performing action x during a full moon on the 12th day of any season. |
Advanced usage
Custom styles
{{collapse |content = Some example text here. |css = border: 1px solid red; background: #FCC; }}
Details |
---|
Some example text here. |