Jump to content

Template:Collapse/doc: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
update for other languages
imported>Margotbean
No edit summary
 
(3 intermediate revisions by 3 users not shown)
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 = <syntaxhighlight lang="c#">
Lots of code here
Lots of code here
</source>
</syntaxhighlight>
}}
}}
</pre>
</pre>


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


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


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


===Spoiler Prevention===
===Collapse spoilers===
<pre>
<pre>
{{collapse
{{collapse
Line 46: Line 46:
{{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.}}


<includeonly>[[Category:Formatting templates]]
==Advanced usage==
[[de:Vorlage:{{PAGENAME}}]]
===Custom styles===
[[es:Plantilla:{{PAGENAME}}]]
<pre>
[[ja:テンプレート:{{PAGENAME}}]]
{{collapse
[[pt:Predefinição:{{PAGENAME}}]]
  |content = Some example text here.
[[ru:Шаблон:{{PAGENAME}}]]
  |css    = border: 1px solid red; background: #FCC;
[[zh:Template:{{PAGENAME}}]]</includeonly>
}}
<noinclude>[[Category:Template documentation‎]]</noinclude>
</pre>
{{collapse
  |content = Some example text here.
  |css    = border: 1px solid red; background: #FCC; padding: 0.2em;
}}
 
<includeonly>{{Addlanglinks}}[[Category:Templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 21:02, 8 January 2023

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.