Template:Note: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Blanked the page) Tag: Blanking |
||
Line 1: | Line 1: | ||
<languages/> <onlyinclude>{{#switch:<translate></translate> | = {{#if: {{#if:{{{1|{{{text|}}}}}}|{{{1|{{{text|}}}}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <templatestyles src=".note { |
|||
background-position: left 7px top 50%; |
|||
padding: 0.5em 0.5em 0.5em 40px; |
|||
margin: 0.5em 0; |
|||
overflow: hidden; |
|||
background-color: #f8f9fa; |
|||
background-repeat: no-repeat; |
|||
border: 1px solid #ddd; |
|||
} |
|||
.note-inline { |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
} |
|||
.note-info { |
|||
background-color: #f6efe5; |
|||
/* [[File:OOjs_UI_icon_reference_20_ac6600.svg]] */ |
|||
background-image: url(https://upload.wikimedia.org/wikipedia/commons/d/d5/OOjs_UI_icon_reference_20_ac6600.svg); |
|||
background-size: 25px; |
|||
border-color: #ac6600; |
|||
padding-left: 40px; |
|||
min-height: 28px; |
|||
} |
|||
.note-reminder { |
|||
background-color: #fff9ea; |
|||
/* [[File:OOjs_UI_icon_lightbulb-yellow.svg]] */ |
|||
background-image: url(https://upload.wikimedia.org/wikipedia/commons/a/a8/OOjs_UI_icon_lightbulb-yellow.svg); |
|||
background-size: 25px; |
|||
border-color: #fc3; |
|||
min-height: 28px; |
|||
} |
|||
.note-warn { |
|||
background-color: #fff9ea; |
|||
/* [[File:OOjs_UI_icon_alert-warning.svg]] */ |
|||
background-image: url(https://upload.wikimedia.org/wikipedia/commons/3/3b/OOjs_UI_icon_alert-warning.svg); |
|||
background-size: 25px; |
|||
border-color: #fc3; |
|||
min-height: 28px; |
|||
} |
|||
.note-error { |
|||
background-color: #fee7e6; |
|||
/* [[File:OOjs_UI_icon_notice-destructive.svg]] */ |
|||
background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/bf/OOjs_UI_icon_notice-destructive.svg); |
|||
background-size: 25px; |
|||
border-color: #c33; |
|||
min-height: 28px; |
|||
}" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}} |gotcha=error |=info |#default={{{2|{{{type|}}}}}} }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{text}}}}}}</div> | [[File:OOjs UI icon lightbulb-20 fc3.svg|18px|<translate><!--T:1--> Note</translate>|link=]] '''<translate><!--T:2--> Note:</translate>''' }} | #default= {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Note|noshift=1}} }}</onlyinclude> {{documentation|content= <translate> == Usage == <!--T:3--> </translate> <pre> {{Note|Foo}} {{Note|Foo|info}} {{Note|Foo|reminder}} {{Note|Foo|warn}} {{Note|Foo|error}} {{Note}} <translate><!--T:6--> Loose test</translate> * Text {{Note|Foo|inline=1}} </pre> {{Note|Foo}} {{Note|Foo|info}} {{Note|Foo|reminder}} {{Note|Foo|warn}} {{Note|Foo|error}} {{Note}} <translate><!--T:4--> Loose test</translate> * Text {{Note|Foo|inline=1}} == Parameters == <templatedata> { "params": { "inline": { "label": "Inline formatting", "description": "Show the template without line breaks before and after it", "type": "boolean" }, "text": { "aliases": [ "1" ], "label": "Text", "type": "content", "required": true }, "type": { "aliases": [ "2" ], "label": "Type", "description": "One of 'info', 'reminder', 'warn', or 'error'. This setting affects the color and icon.", "type": "line", "default": "info" } }, "format": "inline", "description": "Show a note in a box (e.g. a top-of-the-page warning).", "paramOrder": [ "type", "text", "inline" ] } </templatedata> }} [[Category:Templates{{#translation:}}|{{PAGENAME}}]] |