Template:DW/Sitenotice
Template page
More actions
%CLOSE%
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]
Template loop detected: Template:DW/Sitenotice/doc
The above text is transcluded from Template:DW/Sitenotice/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:DW/Sitenotice/doc. (View all subpages of this page.)
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:DW/Sitenotice/doc. (View all subpages of this page.)
This template is used on MediaWiki:Sitenotice
Usage
{{Sitenotice
|image = Displays an image before the text (should be set to x40px if it's too big).
|image bg = Colour of the div where the image is displayed (Hex, Name, or Class).
|text = Text to be displayed
|text bg = Colour of the div where the text is displayed (Hex, Name, or Class).
|text color = If, for some reason, you need the text to be a different colour (Hex, Name, or Class).
|mobile = Can be set to 'yes' to enable displaying the sitenotice on the mobile skin.
}}
- The sitenotice is defaulted to not be shown on the mobile skin. Per meta:Forum:Mobile sitenotice, this behaviour can be switched off by setting the
|mobileparameter to 'yes' in cases of scheduled website outages and others. - The
|typeparameter may be omitted. All site notices of a given type are dismissed together regardless of the site notice id number. - The
|imageparameter may be omitted, leaving the text full width.|image bgwill be automatically omitted with it. - Existing colour classes may be used on
|text bgand|image bginstead, listed below. These will automatically switch between dark and light modes.- These classes are defined in MediaWiki:Common.less/wikitables.less, and overridden for dark mode in MediaWiki:Vector-darkmode.less/wikitables.less.
| Backgrounds | Text |
|---|---|
| table-bg-red | text-red |
| table-bg-orange | text-orange |
| table-bg-yellow | text-yellow |
| table-bg-green | text-green |
| table-bg-blue | text-blue |
| table-bg-purple | text-purple |
| table-bg-pink | text-pink |
| table-bg-grey | text-grey |
Note that %CLOSE% is replaced by the close X, positioned absolutely in the top right of the parent (or left for ltr), however any padding/margins etc to ensure that the X does not overlap the contents must be added manually (done within this template).
Examples
| Code | Result |
|---|---|
{{Sitenotice
|image = [[File:Red Topaz.png|x40px]]
|image bg = #801c13
|text = This is where you will write your text. You can use <code><choose></code> and such. This '''must''' used for site-wide bugs and issues noted by RSDW administrators.
|text bg = #9f261e
|text color = white
}}
|
Template:Sitenotice |
{{Sitenotice
|text = This is a text only sitenotice where the image was omitted, with changing background and text colors. This '''must''' be used for starting events, whether this is in conjunction with the Dragonwilds Discord, or similar.
|text bg = table-bg-green
|text color = text-green
}}
|
Template:Sitenotice |
{{Sitenotice
|type = warn
|image = [[File:Artisan.png|40px]]
|image bg = palegoldenrod
|text = This is a sitenotice with a type, such as for cautionary and warning notices.
|text color = #fff
|text bg = #DAA520
}}
|
Template:Sitenotice |