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

м
Переписал
м (Переписал)
Строка 1: Строка 1:
<languages/>
<onlyinclude>
<onlyinclude>{{#switch:
 
| =
<div role="note" class="note note-{{#switch:{{{2|}}}
{{#if: {{#if:{{{1|}}}|{{{1}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <div role="note" class="note note-{{#switch:{{{2|}}}
     |gotcha=error
     |gotcha=error
     |=info
     |=info
     |#default={{{2|}}}
     |#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>
     }}" 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;'''Заметка:''' }}
</onlyinclude>
| #default=
  {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Note|noshift=1}}
}}</onlyinclude>
{{documentation|content=
== Использование ==
<pre>
{{note|Foo}}
{{note|Foo|reminder}}
{{note|Foo|error}}
{{note|Foo|gotcha}}
{{tip|Foo}}
{{note}} Свободный тест
{{tip}} Свободный тест
 
* Text {{note|Foo|inline=1}}
</pre>
{{note|Foo}}
{{note|Foo|reminder}}
{{note|Foo|error}}
{{note|Foo|gotcha}}
{{tip|Foo}}
{{note}} Свободный тест
 
{{tip}} Свободный тест
 
* Text {{note|Foo|inline=1}}
 
<templatedata>
{
"params": {
"1": {
"type": "content",
"label": "Text",
"required": true
},
"2": {
"label": "Type",
"description": "'reminder', 'error', 'gotcha' or nothing. Will affect formatting.",
"type": "string"
}
},
"format": "inline",
"description": "Show a note in a box (e.g. a top-of-the-page warning)."
}
</templatedata>
 
}}
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]