doc: Porovnání verzí

Z Wiki JU
Jmarek (diskuse | příspěvky)
m naimportována 1 revize
Ofara (diskuse | příspěvky)
Bez shrnutí editace
 
Řádek 1: Řádek 1:
{{Documentation subpage}}
<div style="border:1px solid #a2a9b1; background:#f8f9fa; padding:0.6em 1em; margin-bottom:1em;">
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
'''Dokumentace''' – tato stránka je podstránka <code>Template:Note/doc</code> a vkládá se do šablony [[Template:Note]].
{{TemplateData header|editlinks=1|docpage=Note/doc}}
</div>
 
Zobrazí poznámku v rámečku (např. upozornění v horní části stránky). / Shows a note in a box (e.g. a top-of-the-page warning).
 
== Použití ==
<pre>
{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Více<br>řádků<br>textu}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} Prázdná šablona
 
* Text {{Note|inline=1|text=Foo}}
* Text {{Note|inline=pill|text=Foo}}
</pre>
 
== Ukázky ==
{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Více<br>řádků<br>textu}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} Prázdná šablona
 
* Text {{Note|inline=1|text=Foo}}
* Text {{Note|inline=pill|text=Foo}}
 
== Parametry ==
{| class="wikitable"
! Parametr !! Alias !! Popis !! Hodnoty
|-
| <code>text</code> || <code>1</code>, <code>content</code> || Text poznámky (povinný). || libovolný wikitext
|-
| <code>type</code> || <code>2</code> || Typ poznámky; určuje barvu a ikonu. Výchozí je <code>info</code>. || <code>info</code>, <code>reminder</code>, <code>warn</code>, <code>error</code>; aliasy <code>notice</code> → info, <code>warning</code> → warn, <code>gotcha</code> → error
|-
| <code>inline</code> || – || Zobrazení v textu bez zalomení řádku. || <code>1</code> = kompaktní box, <code>pill</code> = zaoblený odznak; jinak plnošířkový box
|}
 
== TemplateData ==
<templatedata>
<templatedata>
{
{
"format": "block",
    "format": "block",
"description": {
    "description": {
"en": "Show a note in a box (e.g. a top-of-the-page warning).",
        "en": "Show a note in a box (e.g. a top-of-the-page warning).",
"cs": "Zobrazí poznámku v poli (např. upozornění v horní části stránky)",
        "cs": "Zobrazí poznámku v rámečku (např. upozornění v horní části stránky)."
"tr": "Bir kutuda bir not gösterin (ör. sayfanın üstü uyarısı)."
    },
},
    "params": {
"params": {
        "text": {
"inline": {
            "aliases": ["1", "content"],
"label": {
            "label": { "en": "Text", "cs": "Text" },
"en": "Inline formatting",
            "description": { "en": "Informative note.", "cs": "Informativní poznámka." },
"cs": "Inline formátování",
            "type": "content",
"tr": "Satır içi biçimlendirme"
            "required": true
},
        },
"description": {
        "type": {
"en": "Show the template without line breaks before and after it.",
            "aliases": ["2"],
"cs": "Zobrazí šablonu bez zalomení řádků před a za ní.",
            "label": { "en": "Type", "cs": "Typ" },
"tr": "Şablonu, öncesinde ve sonrasında satır kesmeleri olmadan gösterin."
            "description": {
},
                "en": "Affects the color and icon.",
"default": "0",
                "cs": "Ovlivňuje barvu a ikonu."
"autovalue": "1",
            },
"type": "boolean"
            "suggestedvalues": ["info", "reminder", "warn", "error"],
},
            "default": "info",
"type": {
            "type": "string"
"aliases": [
        },
"2"
        "inline": {
],
            "label": { "en": "Inline", "cs": "Inline" },
"label": {
            "description": {
"en": "Type",
                "en": "1 = compact box, pill = rounded badge. Empty = full-width box.",
"cs": "Typ",
                "cs": "1 = kompaktní box, pill = zaoblený odznak. Prázdné = plnošířkový box."
"tr": "Tür"
            },
},
            "suggestedvalues": ["1", "pill"],
"description": {
            "type": "string"
"en": "One of “info”, “reminder”, “warn”, or “error”. This setting affects the color and icon.",
        }
"cs": "Jedna z možností “info”, “reminder”, “warn”, or “error” (informace, připomenutí, upozornění nebo chyba). Toto nastavení má vliv na barvu a ikonu.",
    },
"tr": "“info”, “reminder”, “warn” veya “error” değerlerden biri. Bu ayar, rengi ve simgeyi etkiler."
    "paramOrder": ["text", "type", "inline"]
},
"suggestedvalues": [
"info",
"reminder",
"warn",
"error"
],
"default": "info",
"type": "string"
},
"text": {
"aliases": [
"1",
"content"
],
"label": {
"en": "Text",
"cs": "Text",
"tr": "Metin"
},
"description": {
"en": "Informative note.",
"cs": "Informativní poznámka.",
"tr": "Bilgilendirecek not."
},
"type": "content",
"required": true
}
},
"paramOrder": [
"inline",
"type",
"text"
]
}
}
</templatedata>
</templatedata>
<includeonly>{{Sandbox other||
 
<!-- Categories below this line; interwikis at Wikidata -->
== Viz také ==
[[Category:Notice templates{{#translation:}}]]
* [[Template:Warn]] – zkratka pro tuto šablonu s <code>type=warn</code>.
}}</includeonly>
 
<includeonly>[[Category:Notice templates]]</includeonly><noinclude>[[Category:Template documentation pages]]</noinclude>

Aktuální verze z 8. 10. 2026, 15:00

Dokumentace – tato stránka je podstránka Template:Note/doc a vkládá se do šablony Template:Note.

Zobrazí poznámku v rámečku (např. upozornění v horní části stránky). / Shows a note in a box (e.g. a top-of-the-page warning).

Použití

{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Více<br>řádků<br>textu}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} Prázdná šablona

* Text {{Note|inline=1|text=Foo}}
* Text {{Note|inline=pill|text=Foo}}

Ukázky

Foo
Foo
Foo
Více
řádků
textu
Foo
Foo

Note Note: Prázdná šablona

  • Text
    Foo
  • Text
    Foo

Parametry

Parametr Alias Popis Hodnoty
text 1, content Text poznámky (povinný). libovolný wikitext
type 2 Typ poznámky; určuje barvu a ikonu. Výchozí je info. info, reminder, warn, error; aliasy notice → info, warning → warn, gotcha → error
inline – Zobrazení v textu bez zalomení řádku. 1 = kompaktní box, pill = zaoblený odznak; jinak plnošířkový box

TemplateData

Zobrazí poznámku v rámečku (např. upozornění v horní části stránky).

Parametry šablony

Tato šablona upřednostňuje parametry formátované v bloku.

ParametrPopisTypStav
Texttext 1 content

Informativní poznámka.

Obsahpovinný
Typtype 2

Ovlivňuje barvu a ikonu.

Doporučené hodnoty
info reminder warn error
Výchozí hodnota
info
Řetězecnepovinný
Inlineinline

1 = kompaktní box, pill = zaoblený odznak. Prázdné = plnošířkový box.

Doporučené hodnoty
1 pill
Řetězecnepovinný

Viz také