Jump to content

Template:Collapse/doc: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
update for other languages
imported>Pathoschild
→Example Usage: + custom styles
Line 4: Line 4:
This template may also be used to hide "spoiler" content.
This template may also be used to hide "spoiler" content.


==Example Usage==
==Basic usage==
===Default usage===
===Default usage===
<pre>
<pre>
{{collapse
{{collapse
  |content = <source lang="c#">
  |content = <source lang="c#">
Lots of code here
Lots of code here
</source>
</source>
Line 15: Line 15:


{{collapse
{{collapse
  |content = <source lang="c#">
  |content = <source lang="c#">
Lots of code here
Lots of code here
</source>
</source>
Line 24: Line 24:
{{collapse
{{collapse
  |code
  |code
  |content = <source lang="c#">
  |content = <source lang="c#">
Lots of code here
Lots of code here
</source>
</source>
Line 31: Line 31:


{{collapse|code|
{{collapse|code|
  |content = <source lang="c#">
  |content = <source lang="c#">
Lots of code here
Lots of code here
</source>
</source>
}}
}}


===Spoiler Prevention===
===Collapse spoilers===
<pre>
<pre>
{{collapse
{{collapse
Line 45: Line 45:


{{collapse|Solution|content=Solve the puzzle by performing action x during a full moon on the 12th day of any season.}}
{{collapse|Solution|content=Solve the puzzle by performing action x during a full moon on the 12th day of any season.}}
==Advanced usage==
===Custom styles===
<pre>
{{collapse
  |content = Some example text here.
  |css    = border: 1px solid red; background: #FCC;
}}
</pre>
{{collapse
  |content = Some example text here.
  |css    = border: 1px solid red; background: #FCC; padding: 0.2em;
}}


<includeonly>[[Category:Formatting templates]]
<includeonly>[[Category:Formatting templates]]

Revision as of 16:25, 11 January 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.