Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Collapse/doc: Difference between revisions

Template page
moved from template page
 
oops
 
(11 intermediate revisions by 9 users not shown)
Line 1: Line 1:
'''{{int:usage}}:''' <nowiki>{{</nowiki>collapsed|title=''title''|1=''content''}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
* Note: If the ''content'' includes an equal sign, use <nowiki>{{</nowiki>collapsed|1=''content''}} or replace the equal signs with <code>&amp;#61;</code>.
{{Uses TemplateStyles|Template:Collapse/styles.css}}
* Set <code>expand</code> to 'yes' (or anything besides 'no') to have the box expanded by default.
{{TemplateBox
* Default title is <nowiki>{{PAGENAME}}</nowiki> unless defined otherwise by title= ''MyTitle''
  |1        = title
;Optional parameters<nowiki>:</nowiki>
  |1label-en= title
* <code>header-c</code> = header color {{color|grey|(default: #f0f2f5)}}
  |1d-en    = The always visible title of the collapsed box
* <code>border-c</code> = border color {{color|grey|(default: #c0c0c0)}}
  |1aliases = <!-- List of aliases, separated by / (a slash) -->
* <code>background-c</code> = background color {{color|grey|(default: #fff)}}
  |1type    = line
* <code>border-w</code> = border width {{color|grey|(default: 1px)}}
  |1def    = <nowiki>{{PAGENAME}}</nowiki>
* <code>border-s</code> = border style {{color|grey|(default: solid)}}
  |1stat    = suggested
* <code>font-size</code> = size of header and body text {{color|grey|(default: 88%)}}
 
* <code>header-fs</code> = size of header text {{color|grey|(default: 88% or '<tt>font-size</tt>' if set)}}
  |2        = 1
* <code>width</code> = width of box {{color|grey|(default: 100%)}}
  |2label-en= content
View source for additional parameters.
  |2d-en    = Hidden content of the box. If it includes an equal sign, be sure to use the <code><nowiki>{{collapsed|1=</nowiki>''content''<nowiki>}}</nowiki></code> form or replace the equal signs with <code>&amp;#61;</code>.
<!--
  |2d-td-en = Hidden content of the box. If it includes an equal sign, be sure to use the “<nowiki>{{collapsed|1=</nowiki>''content''<nowiki>}}</nowiki>” form or replace the equal signs with “&amp;#61;”.
The title is shifted slightly to the left due to the show/hide button. This can be corrected by declaring '<tt>header-align</tt>' equal to '<tt>center</tt>' (even though that's already the default).
  |2aliases =
-->
  |2type    = content
<includeonly>
  |2def    =
[[Category:Formatting templates|{{PAGENAME}}]]
  |2stat    = required
[[Category:Collapsible templates|{{PAGENAME}}]]
 
</includeonly>
  |3        = expand
  |3label-en= expand
  |3d-en    = Whether the box should be expanded (not collapsed) by default (anything apart from “no” means yes)
  |3aliases =
  |3type    = line
  |3def    = no
  |3stat    = optional-
 
  |4        = header-c
  |4label-en= header background color
  |4d-en    = CSS color code or name of the background color of the header
  |4aliases =
  |4type    = line
  |4def    = #f0f2f5
  |4stat    = optional-
 
  |5        = border-c
  |5label-en= border color
  |5d-en    = CSS color code or name of the outer border of the whole box
  |5aliases =
  |5type    = line
  |5def    = #aaa
  |5stat    = optional-
 
  |6        = background-c
  |6label-en= background color
  |6d-en    = CSS color code or name of the background of the whole box
  |6aliases =
  |6type    = line
  |6def    = #fff
  |6stat    = optional-
 
  |7        = border-w
  |7label-en= border width
  |7d-en    = CSS length of the width of the outer border of the whole box
  |7aliases =
  |7type    = line
  |7def    = 1px
  |7stat    = optional-
 
  |8        = border-s
  |8label-en= border style
  |8d-en    = CSS border style of the outer border of the whole box
  |8aliases =
  |8type    = line
  |8def    = solid
  |8stat    = optional-
 
  |9        = font-size
  |9label-en= general font size
  |9d-en    = CSS font size of the header and body text (relative values are relative to the context of the box)
  |9aliases =
  |9type    = line
  |9def    = 88%
  |9stat    = optional-
 
  |10        = header-fs
  |10label-en= header font size
  |10d-en    = CSS font size of the header text; overrides the general font size (relative values are still relative to the context of the box, not the general font size)
  |10aliases =
  |10type    = line
  |10def    =
  |10stat    = optional-
 
  |11        = header-fc
  |11label-en= header foreground color
  |11d-en    = CSS color code or name of the foreground (text) color of the header
  |11aliases =
  |11type    = line
  |11def    = #000
  |11stat    = optional-
 
  |12        = width
  |12label-en= width
  |12d-en    = CSS length of the width of the box
  |12aliases =
  |12type    = line
  |12def    = 100%
  |12stat    = optional-
 
  |13        = align
  |13label-en= body text align
  |13d-en    = Text alignment of the content: “left”, “right” or “center”. By default it inherits the context’s alignment
  |13aliases =
  |13type    = line
  |13def    =
  |13stat    = optional-
 
  |14        = header-align
  |14label-en= header text align
  |14d-en    = Text alignment of the header: “left”, “right” or “center”. Explicit “center” enlarges left padding of the title <!-- The title is shifted slightly to the left due to the show/hide button. This can be corrected by declaring '<code>header-align</code>' equal to '<code>center</code>' (even though that's already the default). -->
  |14aliases =
  |14type    = line
  |14def    = center
  |14stat    = optional-
 
  |15        = clear
  |15label-en= clear
  |15d-en    = The side to clear on (i.e. prevent things floated to that side of the page from overlapping with the collapse box): “left”, “right”, “both” or “none”
  |15aliases =
  |15type    = line
  |15def    = both
  |15stat    = optional-
 
  |16        = margin
  |16label-en= margin
  |16d-en    = CSS margin size of the whole box
  |16aliases =
  |16type    = line
  |16def    = auto
  |16stat    = optional-
 
  |17        = color
  |17label-en= body foreground color
  |17d-en    = CSS color code or name of the foreground (text) color of the body
  |17aliases =
  |17type    = line
  |17def    = #222
  |17stat    = optional-
 
  |18        = class
  |18label-en= CSS class
  |18d-en    = Additional CSS classes for the whole box
  |18aliases =
  |18type    = line
  |18def    =
  |18stat    = optional-
 
| name = collapse
| desc-en = This template creates a collapsible box.
 
| namespace = all
| usergroup = all
 
| setscats =
* [[:Category:Pages using "Collapse" template without content]], if parameter <code>1</code> is empty.
 
| seealso =
* {{tld|collapse top}}
* {{tld|collapse bottom}}
 
| i18n-method = -
 
| useTemplateData = 1
}}
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Formatting templates]]
[[Category:Collapsible templates]]
}}</includeonly>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.