Mall:Peidetud/doc: erinevus redaktsioonide vahel

Allikas: Vikipeedia
Eemaldatud sisu Lisatud sisu
PResümee puudub
Sobiv juhend
1. rida: 1. rida:
See mall loob kasti, milles kuvatakse malli päis ja link <tt>[näita]<tt>. Klõps lingil avab päise all kasti alumise poole, milles on peidetud sisu. Seejuures saab lingist <tt>[näita]<tt> link <tt>[peida]<tt>. Taasklõps lingil peidab taas päisest allapoole jääva sisu.
<noinclude>{{template doc page viewed directly}}</noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
Võetud inglise wikist: Template:Hidden


== Kasutamine ==
{{interwikitmp-grp|V=D|wqt=|wsr=|mdw=|wdy=|wsp=|wvy=|wbk=}}
This template creates a [[Wikipedia:NavFrame|dynamic navigation box]] using style sheet declarations in [[MediaWiki:Common.css]] and Javascript code in [[MediaWiki:Common.js]]. It displays the first parameter (the heading) with a [show] link on the right. If [show] is clicked by the user, the second parameter (the body) is displayed below the heading and the [show] link becomes [hide]. Clicking on [hide] then hides the body again and the [hide] link becomes [show] again.


: <tt><nowiki>{{peidetud|päis|sisu}}</nowiki></tt>
==Usage==
:: '''päis''' – vaikimisi nähtav kiri
Only two parameters are required for this template:
:: '''sisu''' – vaikimisi peidetud osa
;header : text for header (or title); alternative to using unnamed parameter <nowiki>{{{1}}}</nowiki>
;content : text for content (or body); alternative to using unnamed parameter <nowiki>{{{2}}}</nowiki>


{| class="wikitable" style="text-align: center"
===Optional parameters===
|+ Koodis <tt>style=" ... "<tt> sisalduvad valikulised vormindusparameetrid

! !!colspan="2"| Päis !! colspan="2"| Sisu !!
;headercss : add [[w:Cascading Style Sheets|CSS]] to the header.
|-valign=top style="background: #e0eee0"
;contentcss : add [[w:Cascading Style Sheets|CSS]] to the content box.
| Kirjeldus || Parameeter || Vaikimisi || Parameeter || Vaikimisi || Võimalikud väärtused

|-valign=top
;fw1 : the font-weight for the heading (default "bold")
|align=left| Kirja paksus || '''päis-p''' || <tt>bold</tt> || '''sisu-p''' || <tt>normal</tt> ||align=left| <tt>bold</tt> (paks), <tt>normal</tt> (harilik) või number vahemikus <tt>100</tt>–<tt>900</tt> (paksim)
;fw2 : the font-weight for the body (default "normal")
|-valign=top

|align=left| Taustavärv || '''päis-t''' || <tt>transparent</tt> || '''sisu-t''' || <tt>transparent</tt> ||align=left| Värvi nimetus või kood, näiteks <tt>yellow</tt>, <tt>#00ff00</tt> või <tt>rgb(255,0,255)</tt>
;bg1 : the background-color for the heading (default "transparent")
|-valign=top
;bg2 : the background-color for the body (default "transparent")
|align=left| Kirja joondus || '''päis-j''' || <tt>center</tt> || '''sisu-j''' || <tt>left</tt> ||align=left| <tt>left</tt> (vasakul), <tt>center</tt> (keskel), <tt>right</tt> (paremal) või <tt>justify</tt> (rööpjoondus)

|-valign=top
;ta1 : the text-align for the heading (default "center")
|align=left| Täiendav vorming || '''päis-css''' || || '''sisu-css''' || ||align=left| Täiendavad vormingud, iga vormingu järel peab olema semikoolon, näiteks <tt>line-height:140%; font-size:90%;</tt>
;ta2 : the text-align for the body (default "left")
<br/>'''Note:''' This template will not respect the user preference "justify paragraphs".

==Examples==
===The simplest===
In this example only the two required parameters are specified.
{| class="wikitable"
| {{rh}} | Code
| <pre>{{hidden|Title text here|Body text line 1<br/>Body text line 2}}</pre>
|-
| {{rh}} | Result
| {{hidden|Title text here|Body text line 1<br/>Body text line 2}}
|}
|}


===Header background===
== Näited ==
{| class="wikitable"
| {{rh}} | Code
| <pre>{{hidden|Title text here|Body text line 1<br/>Body text line 2|bg1=#ccccff|ta2=center}}</pre>
|-
| {{rh}} | Result
| {{hidden|Title text here|Body text line 1<br/>Body text line 2|bg1=#ccccff|ta2=center}}
|}



===CSS===
{| class="wikitable"
{| class="wikitable"
|+ Valikuliste parameetriteta
| {{rh}} | Code
|style="background-color:#ececec;font-weight:bold"| Kood
|
| <pre>{{peidetud|Päise tekst|Peidetud tekst}}</pre>
<pre>
{{hidden
| headercss = background: #ccccff; font-size: 110%; width: 50%;
| contentcss = text-align: center; font-size: 110%; width: 50%;
| header = Title text here
| content = Body text line 1<br/>Body text line 2<br/>Body text line 3
}}</pre>
|-
|-
|style="background-color:#ececec;font-weight:bold"| Tulemus
| {{rh}} | Result
| {{peidetud|Päise tekst|Peidetud tekst}}
|
{{hidden
| headercss = background: #ccccff; font-size: 110%; width: 50%;
| contentcss = text-align: center; font-size: 110%; width: 50%;
| header = Title text here
| content = Body text line 1<br/>Body text line 2<br/>Body text line 3
}}

|}
|}


===Lorem ipsum===
{| class="wikitable"
{| class="wikitable"
|+ Valikuliste parameetritega
| {{rh}} | Code
|style="background-color:#ececec;font-weight:bold"| Kood
| <pre>{{hidden|ta1=left|bg1=cyan|bg2=yellow|lorem ipsum|{{lorem ipsum}}}}</pre>
| <pre>{{peidetud|Päise tekst|Peidetud tekst|päis-p=400|päis-t=#7fff00|sisu-j=right}}</pre>
|-
|-
|style="background-color:#ececec;font-weight:bold"| Tulemus
| {{rh}} | Result
| {{peidetud|Päise tekst|Peidetud tekst|päis-p=400|päis-t=#7fff00|sisu-j=right}}
| {{hidden|ta1=left|bg1=cyan|bg2=yellow|lorem ipsum|{{lorem ipsum}}}}
|}<includeonly>
|}

== Issues ==
=== Show/hide button overlap ===
With ta1=right or a long header, the header may overlap the show/hide button:
{{evd|hidden|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.|def}}

;Example with long header
{{hidden|abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc |def}}

;Example with ta1=right
{{hidden|ta1=right|abc|def}}

;Example with ta1=right & first line blank
{{hidden|ta1=right|
&nbsp;
abc|def}}

=== Sections ===
Sections included inside a hidden block result in broken anchors in the table of contents at the top of the page.
{{hidden begin|title=example}}
==== You can't get here from the table of contents ====
{{hidden end}}

==See also==
* {{tiw|hidden begin}}
* {{tiw|hidden end}}
* {{tim|hidden}}.


<includeonly>
[[Kategooria:Vormindamise mallid|{{PAGENAME}}]]
[[Kategooria:Vormindamise mallid|{{PAGENAME}}]]


[[dsb:Pśedłoga:Nawikašćik]]
[[bg:Шаблон:Скриване]]
[[ca:Template:Caixa ocultable]]
[[en:Template:Hidden]]
[[de:Vorlage:Navigationsleiste]]
<!-- [[en:Template:Hidden]] -->
[[eo:Ŝablono:Kaŝskatolo]]
[[eo:Ŝablono:Kaŝskatolo]]
[[fr:Modèle:Boîte déroulante]]
[[fr:Modèle:Boîte déroulante]]
[[hsb:Předłoha:Nawigaciska lajsta]]
[[hsb:Předłoha:Nawigaciska lajsta]]
[[it:Template:Cassetto]]
[[ja:Template:Hidden]]
[[ja:Template:Hidden]]
[[pl:Szablon:Ukryte]]
[[pt:Predefinição:Oculto]]
[[ru:Шаблон:Навигационная полоса]]
[[sl:Predloga:Skrito]]


</includeonly>
</includeonly>

Redaktsioon: 15. august 2009, kell 16:37

See mall loob kasti, milles kuvatakse malli päis ja link [näita]. Klõps lingil avab päise all kasti alumise poole, milles on peidetud sisu. Seejuures saab lingist [näita] link [peida]. Taasklõps lingil peidab taas päisest allapoole jääva sisu.

Kasutamine

{{peidetud|päis|sisu}}
päis – vaikimisi nähtav kiri
sisu – vaikimisi peidetud osa
Koodis style=" ... " sisalduvad valikulised vormindusparameetrid
Päis Sisu
Kirjeldus Parameeter Vaikimisi Parameeter Vaikimisi Võimalikud väärtused
Kirja paksus päis-p bold sisu-p normal bold (paks), normal (harilik) või number vahemikus 100900 (paksim)
Taustavärv päis-t transparent sisu-t transparent Värvi nimetus või kood, näiteks yellow, #00ff00 või rgb(255,0,255)
Kirja joondus päis-j center sisu-j left left (vasakul), center (keskel), right (paremal) või justify (rööpjoondus)
Täiendav vorming päis-css sisu-css Täiendavad vormingud, iga vormingu järel peab olema semikoolon, näiteks line-height:140%; font-size:90%;

Näited

Valikuliste parameetriteta
Kood
{{peidetud|Päise tekst|Peidetud tekst}}
Tulemus
Päise tekst
Peidetud tekst
Valikuliste parameetritega
Kood
{{peidetud|Päise tekst|Peidetud tekst|päis-p=400|päis-t=#7fff00|sisu-j=right}}
Tulemus
Päise tekst
Peidetud tekst