Шаблон:Spoiler: различия между версиями
Нет описания правки |
|||
Строка 40: | Строка 40: | ||
<nowiki>{{Spoiler| title=My spoiler| text=text under spoiler| bckg1=black| bckg2=white| color1=white| color2=blue| bord1=1px #CCFF00 solid| bord2=1px black solid| width=300px}}</nowiki> | <nowiki>{{Spoiler| title=My spoiler| text=text under spoiler| bckg1=black| bckg2=white| color1=white| color2=blue| bord1=1px #CCFF00 solid| bord2=1px black solid| width=300px}}</nowiki> | ||
<br/> | <br/> | ||
{{Spoiler|title=My spoiler|text=text under spoiler|bckg1=black|bckg2=white|color1=white|color2=blue|bord1=1px #CCFF00 solid|bord2=1px | {{Spoiler|title=My spoiler|text=text under spoiler|bckg1=black|bckg2=white|color1=white|color2=blue|bord1=1px #CCFF00 solid|bord2=1px grey solid|width=300px}} | ||
Spoiler-in-spoiler construction may be used, but with some bugs... for example: | Spoiler-in-spoiler construction may be used, but with some bugs... for example: | ||
{{spoiler|title=1 spoiler|text=spoiler-in-spoiler{{spoiler|title=2 spoiler|text=looks like good}}but it's crashing, if first element of '''text''' parametr is spoiler again. At first you must print some words or may be picture, and after that spoiler. Bug example:{{spoiler|title=spoiler with bug|text={{spoiler|text=something evil was happened :D}} }} }} | {{spoiler|bord2=1px grey solid|title=1 spoiler|text=spoiler-in-spoiler{{spoiler|bord2=1px grey solid|title=2 spoiler|text=looks like good}}but it's crashing, if first element of '''text''' parametr is spoiler again. At first you must print some words or may be picture, and after that spoiler. Bug example:{{spoiler|bord2=1px grey solid|title=spoiler with bug|text={{spoiler|bord2=1px grey solid|text=something evil was happened :D}} }} }} | ||
</noinclude> | </noinclude> |
Версия от 01:01, 26 мая 2011
Spoiler |
---|
no text |
Spoilers use JavaScript code and if you wanna that its work in your wiki - you must copy text from Mediawiki:Common.js to analog of this page in your wiki. On this page describing JavaScript code, which you can use at all pages of your wiki...
Spoiler, realized on <table class="collapsible"> |
---|
{|class="collapsible collapsed" !Spoiler name |
<div class="NavFrame collapsed">
<div class="NavHead"> Spoiler name </div>
<div class="NavContent"> text under spoiler </div>
</div>
Правила оформления
Для того что бы внедрить шаблон на страницу напишите {{spoiler|x}}, вместо х необходимо поставить определенные параметры. Список параметров:
- title - Заголовок спойлера.
- text - Информация под спойлером.
- bckg1 - Цвет заголовка.
- bckg2 - Цвет окна под спойлером.
- bord1 - Описание границы заголовка.
- bord2 - Описание границы окна под спойлером.
- width - Ширина спойлера.
Пример:
{{Spoiler| title=My spoiler| text=text under spoiler| bckg1=black| bckg2=white| color1=white| color2=blue| bord1=1px #CCFF00 solid| bord2=1px black solid| width=300px}}
My spoiler |
---|
text under spoiler |
Spoiler-in-spoiler construction may be used, but with some bugs... for example:
1 spoiler | ||||||
---|---|---|---|---|---|---|
spoiler-in-spoiler
but it's crashing, if first element of text parametr is spoiler again. At first you must print some words or may be picture, and after that spoiler. Bug example:
|
|}