Šablon:Citatny blok
lorem ipsum
Šablon Citatny blok možno jest upotrěbiti dlja stvarjanja različnyh citatnyh blokov. Jest klonom šablona Quote box iz anglijskoj Vikipedije i može se koristati bez izměn, vključno anglijskogo nazvanja šablona, ktoro rabotaje identično.
Upotrěba
[praviti izvorny kod]Može se koristati za izobraženje citat ili veršev, tuty šablon može pokazyvati nazvu, citatu, avtora i iztočnik v formě bloka s ramom i bez, imaje možnosti za nastavjenje granic, pozadja, ravnanja teksta i drugyh aspektov.
Uvaga: Šablon Citatny blok stvarjaje plyvajuči razděl div, čto označaje, že ako li v članku sut obrazky, jego pozicija bude měnjati se zavisno na razlogě rendera, a tekst članka može byti nad ili pod blokom i ne bude jego obtekati sboku. Tuto zavisi na odnošenju razměrov i tipa citaty i osnovnogo teksta.
Primětka: Tuty šablon koristaje tagy <div> i zato može ne vsegda rabotati, kogda jest vloženy pomočju sintaksa wikitext. Tuto jest naslědkom tutčasnyh ograničenij parsingovogo HTML softvera Vikipedije.
Kogda upotrěbjaje se s veršem, udobno jest upakovati sodržanje verša v tagy poem; tuto shranjae koncy redkov bez potrěby ručno ustanovjati odmětky <br/>.
Byti či ne byti, to je o čim tut ide ...
Parametry
[praviti izvorny kod]Glavne parametry
title: Opcionalna nazva, ktora se objevi na vrhu citatnogo a bloka.quote: Citat ili drugy tekst, ktory bude izobražati se v bloku.author: Opcionalno ime avtora. Na koncu može byti pridana referencija s tagom<ref>. Prěd imenom avtora avtomatično izobražaje se črtka, ako li avtora nema, črtka bude prěd nazvoju iztočnika.source: Opcionalny iztočnik citaty (nazva raboty "v lapkah" ili v kursivu, i druge dane publikacije). Možlivo jest koristati tag referencije<ref>.
Stilj glavnogo bloka
align: Ravnanje citatnogo bloka na stranici —left/right/center/none. Predustanovjeno jest ravnanje vpravo. Koristanjealign=noneodstranjaje i prěnos teksta po slovah.width: Širina citatnogo bloka. Prědustavjena na širinu vključenogo citata, izključajučialign=centerilialign=none, kogda prědustavjena širina bude 100%.border: Širina granicy citatnogo bloka. Prědustavjena na 1px. Ne zabezpametajte vključiti 'px' ili 'em' da by ukazati pravilnu širinu.fontsize: Velikost fonta teksta citatnogo bloka, zadavaje se v procentah, napr.fontsize=90%. Suglasno preporučenjam Vikipedije, koristajte velikost fonta od 85% ili vysšu.bgcolor: RGB-kolor pozadja bloka. Prědustavjen na #F9F9F9 (světly sěry).style: Parametr občego CSS-stilja. Zadavanje tutogo parametra zaměnjaje kolikake duplikaty v prědhodnyh parametrah.
Stilj nazvanja
title_bg: RGB-kolor pozadja nazvanja. Prědustavjen na #F9F9F9 (světly sěry).title_fnt: Kolor fonta nazvanja. prědustavjen na črny.tstyle: Parametr občego CSS-stilja. Zadavanje tutogo parametra zaměnjaje kolikake duplikaty v prědhodnyh parametrah.
Stilj citata
qalign: Ravnanje elementa citata —left/right/center. Prědustavjen naleft.qstyle: Parametr občego CSS-stilja. Zadavanje tutogo parametra zaměnjaje kolikake duplikaty v prědhodnyh parametrah.quoted: Ako li tuty parametr imaje istinno značenje (ne jest 0,falseili pusty) citatny blok bude zaključati citat v tolste lapky. Koristajte s ogledom; suglasno rekomendacijam Vikipedije, lapky ne izobražajut v člankah glavnogo prostranstva.
Stilj iztočnika
Tute nastavjenja vlivajut na ves blok author i source, ktory pokazyvaje se pod citatom.
salign: Ravnjanje elementa iztočnika —left/right/center. Prědustavjen na jednako značenje sqalign.sstyle: Parametr občego CSS-stilja. Zadavanje tutogo parametra zaměnjaje kolikake duplikaty v prědhodnyh parametrah.
Polna sintaksa
[praviti izvorny kod]{{Citatny blok
|class = <!-- Advanced users only. See the "Custom classes" section below. -->
|title =
|quote =
|author =
|source =
|align =
|width =
|border =
|fontsize =
|bgcolor =
|style =
|title_bg =
|title_fnt =
|tstyle =
|qalign =
|qstyle =
|quoted =
|salign =
|sstyle =
}}
Priměry
[praviti izvorny kod]Tut sut několiko priměrov koda šablona i jihnyh rezultatov. Za vyše hytryh priměrov gledite priměry na anglijskom za šablon Quote box. V tamtyh priměrah šablon {{lorem ipsum}} stvarjaje nekoliko redkov vzornogo teksta bez smysla, tute teksta ne sut čestju sintaksy citata.
Plyvanje i obtekanje
[praviti izvorny kod]Minimalny kod, prědustavjeno plyvanje poprav i minimalna širina:
{{Citatny blok
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.}}Cry "Havoc", and let slip the dogs of war.
Plyvanje poprav:
{{Citatny blok
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|width = 50%
|align = right
}}Cry "Havoc", and let slip the dogs of war.
Plyvanje polěv:
{{Citatny blok
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|width = 50%
|align = left}}Cry "Havoc", and let slip the dogs of war.
Centrovano, ne plyvaje:
{{Citatny blok
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|width = 50%
|align = center}}Cry "Havoc", and let slip the dogs of war.
Tolste lapky
[praviti izvorny kod]{{Citatny blok
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|quoted = 1}}Cry "Havoc", and let slip the dogs of war.
Ravnanje teksta v bloku
[praviti izvorny kod]{{Citatny blok
|title = Centrovany citat
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|qalign = center}}Cry "Havoc", and let slip the dogs of war.
{{Citatny blok
|title = Nazvanje polěv, citat poprav
|tstyle = text-align: left;
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|qalign = right}}Cry "Havoc", and let slip the dogs of war.
Vlastne klasy
[praviti izvorny kod]Tuty parametr musi se koristati toliko tymi redaktorami, ktore vpolno razumějut, kako rabotaje tuty šablon.
Parament class= može se upotrěbjati kako obča CSS=klasa v tutom šablonu. Něktore klasy ne sut suměstime s drugymi opcijami ili trěbujut specialnogo nastavjenja drugyh parametrov, da by šablon rabotal i izgledal dobro.
Vlastna klasa Letterhead
[praviti izvorny kod]Klasa letterhead se musi koristati či s title_bg|none, border|none, i bgcolor, ili ne koristati se i byti ustanovjena v none. Poneže vrhny lěvy ugol bude iměti bělo pozadje, ju trěba koristati jedino na stranicah s bělym pozadjem.
Trěba se dbati, da by ni nazvanje, ni tekst ne razširjali se do kuskov bloka v jego "lěvom uglu". Da by sdělati prazdny redok kako nazvanje, koristajte title| . Da by sdělati prazdny redok na koncu zaglavja, dodajte <br /><br /> na koncu parametra source (ili author, jestli source se ne koristaje).
{{Citatny blok
|class = letterhead
|title =
|tstyle = text-align: right;
|title_bg = none
|border = none
|quote = Cry "Havoc", and let slip the dogs of war.
|author = [[William Shakespeare]]
|source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.<br /><br />
|qalign = right
}}
Stisknuti tekst
[praviti izvorny kod]Česti teksta mogut byti skryte (stisknute) s pomoćju šablonov {{skryto odsud}} i {{skryto dotud}}.
{{Citatny blok
|border = 2px
|align = center
|bgcolor = Cornsilk
|title = The Spider and the Fly
|halign = center
|quote = <poem>
"Will you walk into my parlour?" said the Spider to the Fly,
"'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
''For who goes up your winding stair can ne'er come down again.''"
{{skryto odsud}}
"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
"''Oh no, no,''" said the little Fly, "''for I've often heard it said,''
''They never, never wake again, who sleep upon your bed!''"
{{skryto dotud}}
</poem>
|salign = right
|author = [[Mary Howitt]]
|source = <small>1829</small>
}}"Will you walk into my parlour?" said the Spider to the Fly,
""'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"Oh no, no," said the little Fly, "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."
"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
"Oh no, no," said the little Fly, "for I've often heard it said,
They never, never wake again, who sleep upon your bed!"
Primětite, že i kogda ustanovjeno halign center, centrovanje izključaje se vslěd koda {{skryto odsud}}, zatože toj šablon aplikuje svoje vlastne stilje. Tuto jest možlivo razrěšiti koristanjem contentstyle v {{skryto odsud}} s uměstnymi parametrami; v tutom slučaju:
{{skryto odsud|ta2=center|contentstyle=margin: 1em auto;}}
{{Citatny blok
|border = 2px
|align = center
|bgcolor = Cornsilk
|title = The Spider and the Fly
|halign = center
|quote = <poem>
"Will you walk into my parlour?" said the Spider to the Fly,
"'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
''For who goes up your winding stair can ne'er come down again.''"
{{skryto odsud||ta2=center|contentstyle=margin: 1em auto;}}
"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
"''Oh no, no,''" said the little Fly, "''for I've often heard it said,''
''They never, never wake again, who sleep upon your bed!''"
{{skryto dotud}}
</poem>
|salign = right
|author = [[Mary Howitt]]
|source = <small>1829</small>
}}"Will you walk into my parlour?" said the Spider to the Fly,
""'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"Oh no, no," said the little Fly, "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."
"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
"Oh no, no," said the little Fly, "for I've often heard it said,
They never, never wake again, who sleep upon your bed!"
Dane šablona
[praviti izvorny kod]| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Font size | fontsize |
The fontsize of the quote box text. Defaults to 88%.
|
String | optional |
| Title font color | title_fnt |
The title font color. Defaults to black.
|
String | optional |
| Title background color | title_bg |
The RGB background color of the title. Defaults to #F9F9F9 (light gray).
|
String | optional |
| Background color | bgcolor |
The RGB background color of the box. Defaults to #F9F9F9 (light gray).
|
String | optional |
| Width | width |
The width of the quote box. Defaults to the width of the quote included, unless align=center where the width will default to 100%. Use CSS lengths eg. 50% or 400px
|
String | optional |
| Border width | border |
The width of the quote box border. Defaults to 1px. Remember to include 'px' or 'em' to specify the correct width.
|
String | optional |
| Author | author 2 |
The author to whom the quote is attributed
|
Line | optional |
| Quote | quote 1 content quotetext text |
The quote or text to be displayed in the box.
|
Content | required |
| CSS class | class |
Optional CSS class to modify or override the default class ''quotebox''. Care should be used when using this parameter. Consider using other templates instead. See the ''Custom classes'' section of this document for more information.
|
String | optional |
| Title | title |
Optional title to appear at the top of the quote box.
|
String | optional |
| Source | source 3 |
Optional source of the quote (author, publication, etc.). Set off from author with a comma.
|
String | optional |
| Add quotes? | quoted |
If this parameter evaluates to true (is not 0, false, or empty) the quote box will enclose the quote in fat-quotes. Use judiciously, and read the Manual of Style.
|
String | optional |
| Source alignment | salign |
Alignment of the source element—left / right / center. Defaults to the value of qalign.
|
String | optional |
| Quote alignment | qalign halign |
Alignment of the quote element—left / right / center. Defaults to left.
|
String | optional |
| Alignment | align |
Alignment of the quote box on the page—left / right / center / none. Defaults to right alignment. Using align=none will remove word wrapping.
|
String | optional |
| Title CSS class | tclass |
Advanced: additional classes to apply to the title element
|
String | optional |
| Quote CSS class | qclass |
Advanced: additional classes to apply to the quote's element
|
Unknown | optional |
| Title CSS style | tstyle |
A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding title parameters.
|
String | optional |
| Source CSS style | sstyle |
A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding source parameters.
|
String | optional |
| CSS style | style |
A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding parameters.
|
String | optional |
| Quote CSS style | qstyle |
A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding quote parameters.
|
String | optional |
Dokumentacija vyše jest dana iz Šablon:Citatny blok/Dokumentacija[izměniti | historija]
Koristni(ki/ce) mogut eksperimentovati v pěskovišču. Prosimo dodavati kategorije jedino na stranicu dokumentacije.