CityOfSilver (talk | contribs) No edit summary |
Sophivorus (talk | contribs) (Replace #ifexist for Template:EXISTS) |
||
(20 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{| | <div class="template-notice noprint navigation-not-searchable {{{class|}}}" style="border-color: {{{border-color|}}}"> | ||
| | <div class="template-notice-image">{{#if:{{{image|}}}|{{#if:{{EXISTS|File:{{PAGENAME:{{{image}}}}}}}|[[File:{{PAGENAME:{{{image}}}}}|{{{image-size|x40px}}}|link={{{image-link|}}}|alt={{{image-alt|}}}]]|{{{image}}}}}|[[File:Commons-emblem-notice.svg|{{{image-size|x40px}}}|link={{{image-link|}}}|alt={{{image-alt|}}}]]}}</div> | ||
|- | <div class="template-notice-content">{{#if:{{{title|{{{2|}}}}}}| | ||
<span class="template-notice-title">{{{title|{{{1}}}}}}</span>{{#if:{{{text|{{{2|}}}}}}| | |||
<span class="template-notice-text">{{{text|{{{2}}}}}}</span>}}| | |||
|{{{ | <div class="template-notice-text">{{{text|{{{1}}}}}}</div>}}{{#if:{{{foot|}}}| | ||
<div class="template-notice-foot">{{{foot}}}</div>}}{{#if:{{{title|}}}|{{#if:{{{text|}}}{{{foot|}}}| | |||
<span class="template-notice-more">Read more...</span>}}}} | |||
</div>{{#if:{{{logo|}}}| | |||
<div class="template-notice-logo">{{#if:{{EXISTS|File:{{PAGENAME:{{{logo}}}}}}}|[[File:{{PAGENAME:{{{logo}}}}}|{{{logo-size|x40px}}}|link={{{logo-link|}}}|alt={{{logo-alt|}}}]]|{{{logo}}}}}</div>}} | |||
</div><usescript src="TemplateNotice.js" /><templatestyles src="Notice/styles.css" />{{#if:{{{category|}}}|{{#if:{{NAMESPACE}}||[[Category:{{{category}}}]]}}}}<noinclude>{{Documentation}}</noinclude> | |||
| | |||
}} | |||
</ | |||
{{ | |||
}} | |||
< | |||
| | |||
| | |||
| | |||
| | |||
| | |||
}} | |||
</ | |||
{{ | |||
| | |||
}} | |||
| | |||
| | |||
| | |||
| | |||
</ | |||
= | |||
[[Category: | |||
</noinclude> |
Latest revision as of 16:01, 19 January 2024
Template documentationedit documentation
Use this meta template to build standardized and mobile-friendly notices.
Usage
Basic
The following wikitext:
{{Notice|Text of the notice.}}
will produce:
While the following:
{{Notice|Title of the notice.|Text of the notice.}}
will produce:
Full
The following wikitext:
{{Notice | border-color = #aaf | image = Closed Book Icon.svg | image-size = 80px | image-link = Appropedia:Books | image-alt = Appropedia book | logo = Appropedia.png | logo-size = 80px | logo-link = Welcome to Appropedia | logo-alt = Appropedia logo | title = Title of the notice. | text = Text of the notice. | foot = Foot of the notice. }}
will produce:
See also
Template data
Use this meta template to build notices.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title 1 | Title of the notice.
| String | suggested |
Text | text 2 | Text of the notice
| Content | suggested |
Foot | foot | Small text at the bottom of the notice.
| String | optional |
Image | image | Main image of the notice
| File | optional |
Image size | image-size | Size of the image
| String | optional |
Image link | image-link | Page to link from the image
| Page name | optional |
Image alternative text | image-alt | Alternative text of the image, for screen readers and vision-impaired people
| String | optional |
Logo | logo | Logo of the notice
| File | optional |
Logo size | logo-size | Size of the logo
| String | optional |
Logo link | logo-link | Page to link from the logo
| Page name | optional |
Logo alternative text | logo-alt | Alternative text of the logo, for screen readers and vision-impaired people
| String | optional |
Border color | border-color | Color of the border
| String | optional |
Class | class | Extra CSS class of the notice
| String | optional |
Category | category | Name of the category (without the "Category:" prefix) where to add all content pages with this notice (only works for pages in the main namespace)
| String | optional |