- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
Template:Collapsegallery: Difference between revisions
Jump to navigation
Jump to search
imported>CrackRabbit No edit summary |
imported>MarioMario456 No edit summary |
||
(59 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div style="{{#if:{{{3|}}}|text-align:{{{3}}};}}"> | |||
{| align | <div style="display: inline-block; {{#if:{{{border|}}}|border:.5em solid {{{border}}}; {{roundy|{{{radius|.9em}}}}}|border:1px solid #000;}};"> | ||
! | <!-- Header --> | ||
< | <div style="background-color:{{{border|#000}}}; color:{{{color|#fff}}}; text-align:left; padding:5px;"><span style="font-size:14pt;">{{{1}}}</span> <span style="font-size:6pt;">[[Template:pixplz|About missing Pics]]</span></div> | ||
<div | <!-- Teaser -->{{{4}}} | ||
{ | <!-- 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> | |||
<!-- Rest of Gallery --> | |||
<div id="mw-customcollapsible-{{{2}}}" class="mw-collapsible mw-collapsed">{{{5}}}</div> | |||
</div> | |||
</div>{{#if:{{{more_images|}}}|<center>{{{more_images}}}</center>|}}</includeonly><noinclude> | |||
</div></ | |||
|} | |||
< | |||
{{ | |||
== Usage == | == Usage == | ||
This is the collapsing gallery template. See [[Encyclopedia Dramatica:Collapsing Objects]] for an explanation. | |||
Syntax: | |||
< | '''<pre>{{collapsegallery | 1=title | 2=id | 3=align | 4=<gallery> teaser </gallery> | 5=<gallery> expanded </gallery> | border | color}}</pre>''' | ||
{| border="1" | {| border="1" | ||
Line 29: | Line 23: | ||
|- | |- | ||
!id | !id | ||
|unique id for collapse gallery ( | |unique id for collapse gallery (examples: cg1, cg2, etc.). ''[https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#the-id-attribute IDs may not contain spaces or special characters].'' '''Do not put spaces/special characters in the ID.''' | ||
|- | |- | ||
!align | !align | ||
Line 35: | Line 29: | ||
|- | |- | ||
!4 | !4 | ||
|gallery | |teaser gallery | ||
|- | |||
!5 | |||
|expanded gallery | |||
|- | |- | ||
!border | !border | ||
Line 44: | Line 41: | ||
|} | |} | ||
== Example == | === Example === | ||
This: | |||
<pre>; Traditional (border isn't set): | |||
{{Collapsegallery|Hello, world!|cg1|center|<gallery> | {{Collapsegallery|Hello, world!|cg1|center|<gallery> | ||
File:Popcorn3.gif | |||
</gallery>|<gallery> | |||
File:Popcorn4.gif | File:Popcorn4.gif | ||
</gallery>}} | </gallery>}} | ||
; Rounded: | |||
{{Collapsegallery|Hello, world!|cg2|center|<gallery> | {{Collapsegallery|Hello, world!|cg2|center|<gallery> | ||
File:Popcorn2.gif | |||
</gallery>|<gallery> | |||
File:Popcorn4.gif | File:Popcorn4.gif | ||
</gallery>|border=blue|color=cyan}} | </gallery>|border=blue|color=cyan}}</pre> | ||
</pre> | |||
results in this: | |||
; Traditional (border isn't set): | |||
{{Collapsegallery|Hello, world!|cg1|center|<gallery> | {{Collapsegallery|Hello, world!|cg1|center|<gallery> | ||
File:Popcorn3.gif | File:Popcorn3.gif | ||
</gallery>|<gallery> | |||
File:Popcorn4.gif | File:Popcorn4.gif | ||
</gallery>}} | </gallery>}} | ||
; Rounded: | |||
{{Collapsegallery|Hello, world!|cg2|center|<gallery> | {{Collapsegallery|Hello, world!|cg2|center|<gallery> | ||
File:Popcorn2.gif | File:Popcorn2.gif | ||
</gallery>|<gallery> | |||
File:Popcorn4.gif | File:Popcorn4.gif | ||
</gallery>|border=blue|color=cyan}} | </gallery>|border=blue|color=cyan}} | ||
[[Category:Formatting Templates|{{PAGENAME}}]]</noinclude> | [[Category:Formatting Templates|{{PAGENAME}}]]</noinclude> |
Latest revision as of 18:41, 20 August 2022
Usage
This is the collapsing gallery template. See Encyclopedia Dramatica:Collapsing Objects for an explanation.
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.). IDs may not contain spaces or special characters. Do not put spaces/special characters 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:Popcorn3.gif </gallery>|<gallery> File:Popcorn4.gif </gallery>}} ; Rounded: {{Collapsegallery|Hello, world!|cg2|center|<gallery> File:Popcorn2.gif </gallery>|<gallery> File:Popcorn4.gif </gallery>|border=blue|color=cyan}}
results in this:
- Traditional (border isn't set)
- Rounded