Template:Hide: Difference between revisions
Jump to navigation
Jump to search
KokoroSenshi (talk | contribs) m (Changed #css to direct to Template:Hide/Styles.css) |
(Feature is finally in MediaWiki, took long enough) |
||
Line 1: | Line 1: | ||
<div class="template-hide mw-collapsible {{#if:{{{visible|}}}||mw-collapsed}}" style="{{{framestyle|}}}"> | <div class="template-hide mw-collapsible {{#if:{{{visible|}}}||mw-collapsed}}" data-expandtext="[show ▼]" data-collapsetext="[hide ▲]" style="{{{framestyle|}}}"> | ||
<div class="template-hide-head mw-collapsible-toggle gradient" style="float: none; {{{headerstyle|}}}"><!-- | <div class="template-hide-head mw-collapsible-toggle gradient" style="float: none; {{{headerstyle|}}}"><!-- | ||
--><span></span><!-- | --><span></span><!-- | ||
--><span>{{{header}}}</span><!-- | --><span>{{{header}}}</span><!-- | ||
--><span class="template-hide-toggle | --><span class="template-hide-toggle mw-collapsible-text nomobile"></span></div> | ||
<div class="nav-content mw-collapsible-content" style="{{{contentstyle|}}}">{{{content}}}</div> | <div class="nav-content mw-collapsible-content" style="{{{contentstyle|}}}">{{{content}}}</div> | ||
</div>{{#if:{{#varexists:cssHide}}|<!-- nothing -->|{{#css:Template:Hide/Styles.css}}{{#vardefine:cssHide}}}}<noinclude> | </div>{{#if:{{#varexists:cssHide}}|<!-- nothing -->|{{#css:Template:Hide/Styles.css}}{{#vardefine:cssHide}}}}<noinclude> |
Revision as of 17:24, 2 December 2018
{{#css:Template:Hide/Styles.css}}
Usage
This is intended to create a collapsible selection of text, in most cases to be used on pages with large amounts of similar list-like content, such as the Failed Nominations page. There are two ways to use this template:
One Template
This form is usually used for text without tricky wikicode
{{Hide | header = | content = | visible = | framestyle = | headerstyle = | contentstyle = }}
- header — The title of the box
- content — The content to place in the box
- visible — Type anything to make the content visible on page load
- framestyle — CSS styling for the frame
- headerstyle — CSS styling for the header
- contentstyle — CSS styling for the content area