Difference between revisions of "Template:Wfmessage"

From Second Life Wiki
Jump to navigation Jump to search
(Replacing SVG icon by PNG, because SVG support is broken on the SL Wiki)
m (Tinkering with CSS to get a slighty better look)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div style="align-items:center;color:#212529;display:flex;font-size:14px;line-height:1.5;margin:2px 0;padding:16px;{{#switch:{{{type|}}}
<div style="align-items:center;color:#212529;display:flex;font-size:14px;line-height:1.5;margin:2px 0;padding:12px;{{#switch:{{{type|}}}
|advice = background-color:#76C551;
|advice = background-color:#4cd2ff;
|content = border-color:#7092FF;border-style:solid;border-width:3px;
|content = border-color: #0098cc;border-style:solid;border-width:3px;
|delete = border-color:#DC3545;border-style:solid;border-width:3px;
|delete = border-color:#DC3545;border-style:solid;border-width:3px;
|structural = border-color:#6F42C1;border-style:solid;border-width:1px;
|structural = border-color:#007299;border-style:solid;border-width:1px;
|notice
|notice
|#default = border-color:#7EBC6F;border-style:solid;border-width:1px;
|#default = border-color:#00bfff;border-style:solid;border-width:1px;
}}"><!--
}}"><!--
--><div style="box-sizing:border-box;flex:none;padding:0 15px;text-align:left;"><!--
--><div style="box-sizing:border-box;flex:none;padding:0 12px;text-align:left;"><!--
--><p style="margin:0;">[[File:{{#if: {{{image|}}}|{{{image|}}}|{{#switch:{{{type|}}}
--><p style="margin:0;">[[File:{{#if: {{{image|}}}|{{{image|}}}|{{#switch:{{{type|}}}
|advice = Ambox warning.png{{!}}alt=exclamation mark
|advice = Ambox warning.png{{!}}alt=exclamation mark
Line 15: Line 15:
|notice
|notice
|#default = Ambox notice.png{{!}}alt=information sign
|#default = Ambox notice.png{{!}}alt=information sign
}}}}|16px|text-top]]<!--
}}}}|40px|text-top]]<!--
--></p><!--
--></p><!--
--></div><!--
--></div><!--
--><div style="box-sizing:border-box;flex:auto;">{{{text|some text goes here}}}{{#if: {{{edittext|}}}|<br/><span class="user-show" style="font-size:12px;">{{{edittext|}}}</span>}}</div><!--
--><div style="box-sizing:border-box;flex:auto;">{{{text|some text goes here}}}{{#if: {{{edittext|}}}|<br/><span class="user-show" style="font-size:12px;">{{{edittext|}}}</span>}}</div><!--
-->{{#if: {{{image2|}}}|<div style="box-sizing:border-box;flex:none;padding:0 15px;"><p style="margin:0;">[[File:{{{image2|}}}|16px|text-top]]</p></div>}}<!--
-->{{#if: {{{image2|}}}|<div style="box-sizing:border-box;flex:none;padding:0 12px;"><p style="margin:0;">[[File:{{{image2|}}}|32px|text-top]]</p></div>}}<!--
--></div><!--
--></div><!--
-->{{#if: {{{nocat|}}}||{{{categories|}}} }}<!--
-->{{#if: {{{nocat|}}}||{{{categories|}}} }}<!--
--><noinclude>{{Documentation}}</noinclude>
--><noinclude>{{Documentation}}</noinclude>

Latest revision as of 14:38, 5 December 2023

information sign

some text goes here
[Edit] [🔄Purge] Template-info.png Template documentation

Usage

The Website flex message box template is a message box template like Template:Mbox but based on the style of the home page. It uses "Wikipedia logo"CSS flexboxes to style the content.

Notes

A detailed documentation for each parameter is provided below. The type needs some visual explanation.

Syntax

{{Wfmessage
| type = 
| image = 
| text = 
| nocat = 
| categories = 
}}

Parameters

{
	"params": {
		"type": {
			"description": "basic style of the template",
			"example": "notice",
			"type": "string",
			"default": "notice",
			"suggested": true
		},
		"image": {
			"description": "name of an image to display before the text",
			"example": "example.png{{!}}alt=some example image",
			"type": "unbalanced-wikitext"
		},
		"text": {
			"description": "text shown in the message box",
			"type": "unbalanced-wikitext",
			"suggested": true
		},
		"edittext": {
			"description": "text shown below the other \"text\" but visible to users only (should be used to give some advice to editors)",
			"type": "unbalanced-wikitext"
		},
		"image2": {
			"description": "image shown after the text (to the right on LTR languages)",
			"example": "Example.svg{{!}}alt=an example file",
			"type": "unbalanced-wikitext",
			"default": "(none)"
		},
		"nocat": {
			"description": "insert any text to supress the categorisation",
			"type": "boolean",
			"default": "(empty)"
		},
		"categories": {
			"description": "categories to be added to a page using a template derived from this one",
			"example": "[[Category:Templates|~some sort key]]",
			"type": "unbalanced-wikitext"
		}
	},
	"description": "This is a messagebox like Ambox but based on the style of the OpenStreetMap webpage. ",
	"format": "block"
}
  • type=advice

exclamation mark

some text goes here
Advice contains important information the user should take into consideration. This refers to import guidelines and others. It basically says "you should take that into consideration. Otherwise, you provoke a conflict or worse."
  • type=content

broom

some text goes here
Content issues indicate problems arising from translations or cleanup necessities. Similarly, it can also be used for incomplete or dubious content. It suggests to "please double check what is written here".
  • type=delete

trash bin

some text goes here
Type delete is used for content whose deletion is requested. That effectively limits its use to {{Delete}}. The intended message is "this may affect you soon".
  • type=notice

information sign

some text goes here
Notices are used for editing requests, "Wikipedia logo"stubs, and general notices that may or may not be relevant to the user. It is basically an equivalent to "for your interest"/"FYI".
  • type=structural

arrows

some text goes here
This type indicates structural changes to one or multiple pages about a similar topic. For the ordinary reader, it should be understood as "this is some information in case you are interested in wiki matters". This would be used for {{Merge}}, {{Move}}, {{Split section}}, {{Delete proposal}} ...

Example

{{...}}

See also

  • {{Ambox}} - stands for Article message box. This template is used in many pages.