Template:CollapseGallery: Difference between revisions

From FOnline: Reloaded Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
<includeonly><div style="{{#if:{{{3|}}}|text-align:{{{3}}};}}">
<includeonly><div style="{{#if:{{{3|}}}|text-align:{{{3}}};}}">
<div style="display: inline-block; {{#if:{{{border|}}}|border:.5em solid {{{border}}}; {{roundy|{{{radius|.9em}}}}}|border:1px solid #000;}};">
<div style="display: inline-block; {{#if:{{{border|}}}|border:.5em solid {{{border}}}; {{Roundy|{{{radius|.9em}}}}}|border:1px solid #000;}};">
<!-- Header -->
<!-- Header -->
<div style="background-color:{{{border|#000}}}; color:{{{color|#fff}}}; text-align:left; padding:5px;"><span style="font-size:14pt;">{{{1}}}</span></div>
<div style="background-color:{{{border|#000}}}; color:{{{color|#fff}}}; text-align:left; padding:5px;"><span style="font-size:14pt;">{{{1}}}</span></div>
<!-- Teaser -->{{{4}}}
<!-- Teaser -->{{{4}}}
<!-- Collapsing Link -->
<!-- Collapsing Link -->
<div class="collapsibletoggle" style="text-align:right; font-size:14pt; font-weight:bold; padding:0 5px 5px 5px;">[<span class="mw-customtoggle-{{{2}}} showhidetext"><span class="collapsibletoggletext hiddentext">Collapse Gallery</span><span class="collapsibletoggletext">Expand Gallery</span></span>]</div>
<div class="collapsibletoggle" style="text-align:right; font-size:14pt; font-weight:bold; padding:0 5px 5px 5px;">[<span class="mw-customtoggle-{{{2}}} showhidetext"><span class="collapsibletoggletext hiddentext">Collapse</span> - <span class="collapsibletoggletext">Expand</span></span>]</div>
<!-- Rest of Gallery -->
<!-- Rest of Gallery -->
<div id="mw-customcollapsible-{{{2}}}" class="mw-collapsible mw-collapsed">{{{5}}}</div>
<div id="mw-customcollapsible-{{{2}}}" class="mw-collapsible mw-collapsed">{{{5}}}</div>
</div>
</div>
</div>{{#if:{{{more_images|}}}|<center>{{{more_images}}}</center>|}}</includeonly><noinclude>
</div></includeonly><noinclude>
== Usage ==
== Usage ==
Do not put any of these on the ID or the gallery will be glitched!
Do not put any of these on the ID or the gallery will be glitched!

Latest revision as of 01:36, 3 June 2022

Usage

Do not put any of these on the ID or the gallery will be glitched!

  • Spaces (example: Wasteland)
  • An ID already used by another gallery (example: two galleries with the ID "CollapseGallery")

This is the collapsing gallery template.

Syntax:

{{collapsegallery | 1=title | 2=id | 3=align | 4=<gallery> teaser </gallery> | 5=<gallery> expanded </gallery> | border | color}}
title
id unique id for collapse gallery (examples: cg1, cg2, etc.). id's may not contain spaces. Do not include spaces in the id.
align left, right or center, default is left.
4 teaser gallery
5 expanded gallery
border border color and have it be thicker with rounded edges. default is the traditional collapse gallery style.
color title color, default is white.

Example

This:

; Traditional (border isn't set):
{{CollapseGallery|Hello, world!|cg1|center|<gallery>
File:Wikigetstarted.jpg
</gallery>|<gallery>
File:Wikigetstarted.jpg
</gallery>}}

; Rounded:
{{CollapseGallery|Hello, world!|cg2|center|<gallery>
File:Wikigetstarted.jpg
</gallery>|<gallery>
File:Wikigetstarted.jpg
</gallery>|border=blue|color=cyan}}

results in this:

Traditional (border isn't set)
Hello, world!
[Collapse - Expand]
Rounded
Hello, world!
[Collapse - Expand]