Jump to content

Template:Collapse/doc: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
→Example Usage: + custom styles
imported>Margotbean
No edit summary
Line 60: Line 60:


<includeonly>[[Category:Formatting templates]]
<includeonly>[[Category:Formatting templates]]
[[de:Vorlage:{{PAGENAME}}]]
{{Addlanglinks}}</includeonly>
[[es:Plantilla:{{PAGENAME}}]]
[[ja:テンプレート:{{PAGENAME}}]]
[[pt:Predefinição:{{PAGENAME}}]]
[[ru:Шаблон:{{PAGENAME}}]]
[[zh:Template:{{PAGENAME}}]]</includeonly>
<noinclude>[[Category:Template documentation‎]]</noinclude>
<noinclude>[[Category:Template documentation‎]]</noinclude>

Revision as of 02:00, 7 April 2019

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 = <source lang="c#">
Lots of code here
</source>
}}
Details 
Lots of code here

Named section

{{collapse
 |code
 |content = <source lang="c#">
Lots of code here
</source>
}}
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.