Шаблон:Note: различия между версиями

м
Добавил nobanner
м (1 версия импортирована)
м (Добавил nobanner)
 
(не показано 18 промежуточных версий 2 участников)
Строка 1: Строка 1:
<languages/>
<includeonly><span role="note" class="note note-{{{1}}}" >{{{2}}}</span></includeonly><noinclude>
<onlyinclude>{{#switch:
| =
{{#if: {{#if:{{{1|}}}|{{{1}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <div role="note" class="note note-{{#switch:{{{2|}}}
    |gotcha=error
    |=info
    |#default={{{2|}}}
    }}" style="background-position:{{dir|{{pagelang}}|right|left}} 7px top 50%; {{dir|{{pagelang}}|padding-right: 40px; padding-left: 0.5em;|padding-right: 0.5em; padding-left: 40px;}} {{#if:{{{inline|}}}|display:inline-block; vertical-align:middle;}}">{{{1}}}</div>
  | [[File:Bulbgraph.png|18px|Заметка|link=]]&nbsp;'''Заметка:''' }}
| #default=
  {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Note|noshift=1}}
}}</onlyinclude>
{{documentation|content=
== Использование ==
== Использование ==
=== Код ===
Скопируйте wiki-код, вставьте в нужное место страницы и измените текст сообщения.
<pre>
<pre>
{{note|Foo}}
{{note|note| Заметка, совет }}
{{note|Foo|reminder}}
</pre>
{{note|Foo|error}}
{{note|Foo|gotcha}}
{{tip|Foo}}
{{note}} Свободный тест
{{tip}} Свободный тест


* Text {{note|Foo|inline=1}}
<pre>
{{note|info| Информация }}  
</pre>
</pre>
{{note|Foo}}
{{note|Foo|reminder}}
{{note|Foo|error}}
{{note|Foo|gotcha}}
{{tip|Foo}}
{{note}} Свободный тест


{{tip}} Свободный тест
<pre>
 
{{note|warn| Предупреждение }}
* Text {{note|Foo|inline=1}}
</pre>


<pre>
{{note|nobanner| Строка без баннера}}
</pre>
=== Результат ===
{{note|note| Заметка, совет }}
{{note|info| Информация }}
{{note|warn| Предупреждение }}
{{note|nobanner| Строка без баннера}}
== Описание ==
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"1": {
"1": {
"type": "content",
"label": "Тип заметки",
"label": "Text",
"example": "note, info, warn",
"required": true
"description": "От типа заметки зависит её цвет",
"required": true,
"type": "line"
},
},
"2": {
"2": {
"label": "Type",
"label": "Текст заметки",
"description": "'reminder', 'error', 'gotcha' or nothing. Will affect formatting.",
"required": true,
"description": "Любая строка",
"type": "string"
"type": "string"
}
}
},
},
"format": "inline",
"description": "Вставляет в страницу блок с текстом. Цвет блока зависит от типа заметки."
"description": "Show a note in a box (e.g. a top-of-the-page warning)."
}
}
</templatedata>
</templatedata>
 
</noinclude>
}}
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]