Difference between revisions of "Template:Hidden/doc"
m (+example) |
m (removed comments (Layout break in later MediaWiki Version 1.19)) |
||
Line 12: | Line 12: | ||
Examples: | Examples: | ||
− | <code><nowiki>{{</nowiki>Hidden | header text without equal sign |content text without equal sign<br/> typewriter text}}</code> | + | <code><nowiki>{{</nowiki>Hidden | header text without equal sign |content text without equal sign<br/> typewriter text}}</code> |
− | + | {{Hidden | header text without equal sign |content text without equal sign | |
typewriter text}} | typewriter text}} | ||
→ the content text becomes formatted as wiki text | → the content text becomes formatted as wiki text | ||
− | <code><nowiki>{{Hidden | header= header text | content = content text}}</nowiki></code> | + | <code><nowiki>{{Hidden | header= header text | content = content text}}</nowiki></code> |
− | + | {{Hidden | header= header text | content = content text}} | |
− | <code><nowiki>{{Hidden | headerstyle= text-align:center; | header= header text | content = content text}}</nowiki></code> | + | <code><nowiki>{{Hidden | headerstyle= text-align:center; | header= header text | content = content text}}</nowiki></code> |
− | + | {{Hidden | headerstyle= text-align:center; | header= header text | content = content text}} | |
− | <code><nowiki>{{Hidden | header= header text | content = content text | contentstyle= text-align:justify; }}</nowiki></code> | + | <code><nowiki>{{Hidden | header= header text | content = content text | contentstyle= text-align:justify; }}</nowiki></code> |
− | + | {{Hidden | header= header text | content = content text | contentstyle= text-align:justify; }} | |
− | <code><nowiki>Some text around here {{Hidden | header = Title | toggle text = Show UML diagram / Hide UML diagram | content = content text}}</nowiki></code> | + | <code><nowiki>Some text around here {{Hidden | header = Title | toggle text = Show UML diagram / Hide UML diagram | content = content text}}</nowiki></code> |
− | + | Some text around here {{Hidden | header = Title | toggle text = Show UML diagram / Hide UML diagram | content = content text}} | |
− | <code><nowiki>Some text around here {{Hidden | header = Title | content = content text | toggle text = + / − | toggle position = left}}</nowiki></code> | + | <code><nowiki>Some text around here {{Hidden | header = Title | content = content text | toggle text = + / − | toggle position = left}}</nowiki></code> |
− | + | Some text around here {{Hidden | header = Title | content = content text | toggle text = + / − | toggle position = left}} | |
− | <code><nowiki>{{Hidden | header = Some text here … | content = content text | class = toccolours border-round | toggle text = + / − | toggle position = left}}</nowiki></code> | + | <code><nowiki>{{Hidden | header = Some text here … | content = content text | class = toccolours border-round | toggle text = + / − | toggle position = left}}</nowiki></code> |
− | + | {{Hidden | header = Some text here …| content = content text | class = toccolours border-round | toggle text = + / − | toggle position = left}} | |
− | <code><nowiki>{{Hidden | header = Some text here … | content = content text not collpsed | class = toccolours border-round | not collapsed = yes}}</nowiki></code> | + | <code><nowiki>{{Hidden | header = Some text here … | content = content text not collpsed | class = toccolours border-round | not collapsed = yes}}</nowiki></code> |
− | + | {{Hidden | header = Some text here … | content = content text not collpsed | class = toccolours border-round| not collapsed = yes}} | |
− | <code><nowiki>{{Hidden | header = Some text here … | content = content text not collpsed | contentstyle = border-left: 1px solid #ccc;border-bottom: 1px solid #ccc;padding:0ex 1em;}}</nowiki></code><br/> | + | <code><nowiki>{{Hidden | header = Some text here … | content = content text not collpsed | contentstyle = border-left: 1px solid #ccc;border-bottom: 1px solid #ccc;padding:0ex 1em;}}</nowiki></code><br/> |
− | + | {{Hidden | header = Some text here … | content = content text not collpsed | contentstyle = border-left: 1px solid #ccc;border-bottom: 1px solid #ccc;padding:0ex 1em;}} | |
== Technical documentation == | == Technical documentation == |
Revision as of 23:09, 12 November 2012
Usage
This template creates collapsible parts. Template parameter are:
- header or 1 → text of header
- headerstyle → CSS for the header
- content or 2 → text of content
- contentstyle, contentclass → CSS style or class for the content
- class → CSS class for the entire box
- toggle position = left → alters the position of the toggler to being left
- not collapsed → any value (the box will be opend on initialisation)
Examples:
{{Hidden | header text without equal sign |content text without equal sign
typewriter text}}
content text without equal sign
typewriter text
→ the content text becomes formatted as wiki text
{{Hidden | header= header text | content = content text}}
content text
{{Hidden | headerstyle= text-align:center; | header= header text | content = content text}}
content text
{{Hidden | header= header text | content = content text | contentstyle= text-align:justify; }}
content text
Some text around here {{Hidden | header = Title | toggle text = Show UML diagram / Hide UML diagram | content = content text}}
content text
Some text around here {{Hidden | header = Title | content = content text | toggle text = + / − | toggle position = left}}
content text
{{Hidden | header = Some text here … | content = content text | class = toccolours border-round | toggle text = + / − | toggle position = left}}
content text
{{Hidden | header = Some text here … | content = content text not collpsed | class = toccolours border-round | not collapsed = yes}}
content text not collpsed
{{Hidden | header = Some text here … | content = content text not collpsed | contentstyle = border-left: 1px solid #ccc;border-bottom: 1px solid #ccc;padding:0ex 1em;}}
content text not collpsed
Technical documentation
CSS-dependencies:
.border-round { /* optional */
-moz-border-radius:0.5em;
-webkit-border-radius:0.5em;
-o-border-radius:0.5em;
-khtml-border-radius:0.5em;
border-radius:0.5em;
}
/* for toggle position */
div.mw-collapsible.force-toggle-float-left span.mw-collapsible-toggle {
clear:right; float:left;margin-right:0.2em;
}