Template
Interface template

Notice

From Dogcraft Wiki

No edit summary
m (Added category: Notice templates, Interface templates)
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude><pre>{{Notice
<includeonly><div style="display:flex; margin:10px; float:left; border:1px solid {{{bordercolor|#d9d6d3}}}" class="notice phonefullscreen noexcerpt {{{class|}}}"><!--
--><div style="display:flex; flex-direction:column; justify-content:center; padding:{{{customiconpadding|12px}}}; background-color:{{{iconbackcolor|#8b0024}}};"><!--
      --->{{#if:{{{image|}}}|{{{image}}}|{{fa|{{{icon|edit}}}|{{{iconstyle|solid}}}|color={{{iconcolor|white}}}|style=font-size:160%;}} }}<!--
--></div><!--
--><div style="flex-grow:1; background-color:{{{contentbackcolor|#E9EDEF}}}; display:flex; flex-direction:column; justify-content:center;"><div style="padding:{{{customcontentpadding|12px 14px}}};"><!--
      -->{{#if: {{{title|}}}|'''{{{title|}}}'''|}}{{#if: {{{message|}}}|<b>:</b>|}} {{{message|}}}{{{license|}}}<!--
--></div></div></div><!--
--><div style="clear:{{{clear|left}}};"></div></includeonly><noinclude>
 
==Notice template==
This is a template for creating a general notice banner on pages. Useful for communicating some extra information the reader should be aware of.
 
Use [https://fontawesome.com/v6/icons https://fontawesome.com/v6/icons] for picking icons, or set an image as one.
 
See [[:Category:Notice templates]] for other templates based on this one.
 
===Example(s)===
<pre>{{Notice
|title=Title of notice
|title=Title of notice
|message=Message Body
|message=Message Body
Line 7: Line 24:
|customiconpadding=
|customiconpadding=
|customcontentpadding=
|customcontentpadding=
}}</pre>
}}</pre> generates: {{Notice
 
{{Notice
|title=Title of notice
|title=Title of notice
|message=Message Body
|message=Message Body
|icon=fa-pencil-square-o
}}
}}


</noinclude><includeonly>
==Template data==
<div><div style="display:table; max-width:100%;" class="phonefullscreen noexcerpt"><div style="float: left; padding: 10px 10px">
<span style="background-color: {{{iconbackcolor|#8b0024}}}; display:table-cell; text-align:center; overflow:hidden; padding: {{{customiconpadding|14px 8px 6px 12px}}}; vertical-align:middle;">
<i class="fa {{{icon|fa-pencil-square-o}}}" style="color:white; font-size:160%"></i>
</span><span style="background-color: {{{contentbackcolor|#E9EDEF}}}; display:table-cell; padding: {{{customcontentpadding|12px 14px 12px 14px}}}; overflow:hidden; max-width:100%">
{{#if: {{{title|}}}|'''{{{title|}}}: '''|}}{{{message|}}}</span>
</div></div></div>
</includeonly>
 
<noinclude>
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"iconbackcolor": {
"iconbackcolor": {
"label": "Icon Color",
"label": "Icon color",
"description": "Background color of the icon section of the notice",
"description": "Background color of the icon section of the notice",
"type": "string"
},
"class": {
"label": "Class",
"description": "Optional extra CSS classes for the notice",
"type": "string"
},
"image": {
"label": "Image",
"description": "Optional free-form image input in place of the icon, for use in license templates.",
"type": "string"
"type": "string"
},
},
"customiconpadding": {
"customiconpadding": {
"label": "Icon Padding Values",
"label": "Icon padding values",
"description": "Custom padding values for the icon section of the notice",
"description": "Custom padding values for the icon section of the notice",
"example": "10px 10px 10px 10px",
"example": "10px 10px 10px 10px",
Line 42: Line 57:
"label": "Icon",
"label": "Icon",
"description": "FontAwesome icon to display on the notice",
"description": "FontAwesome icon to display on the notice",
"example": "fa-pencil-square-o",
"example": "fas fa-edit",
"type": "string",
"type": "string",
"autovalue": ""
"autovalue": "fas fa-edit"
},
},
"contentbackcolor": {
"contentbackcolor": {
"label": "Content Background Color",
"label": "Content background color",
"description": "Background color of the body of the notice.",
"description": "Background color of the body of the notice.",
"type": "string"
"type": "string"
},
},
"customcontentpadding": {
"customcontentpadding": {
"label": "Content Padding Values",
"label": "Content padding values",
"description": "Custom padding values for the body of the notice",
"description": "Custom padding values for the body of the notice",
"example": "10px 10px 10px 10px",
"example": "10px 10px 10px 10px",
Line 71: Line 86:
"type": "string",
"type": "string",
"required": true
"required": true
},
"bordercolor": {
"label": "Border color",
"type": "string",
"default": "#d9d6d3"
},
"iconcolor": {
"label": "Icon color",
"type": "string",
"default": "white"
},
"license": {
"label": "License information",
"description": "Machine readable license information (hidden from viewer)",
"type": "string"
},
"clear": {
"label": "clear",
"example": "left, right, both",
"type": "string",
"default": "left"
}
}
},
},
Line 80: Line 116:
"contentbackcolor",
"contentbackcolor",
"customiconpadding",
"customiconpadding",
"customcontentpadding"
"customcontentpadding",
]
"class",
"image",
"bordercolor",
"iconcolor",
"license",
"clear"
],
"description": "A template for leaving a notice banner on articles."
}
}
</templatedata>
</templatedata> [[Category:Notice templates]] {{Interface template}}
</noinclude>
</noinclude>

Latest revision as of 11:03, 4 December 2023


Notice template

This is a template for creating a general notice banner on pages. Useful for communicating some extra information the reader should be aware of.

Use https://fontawesome.com/v6/icons for picking icons, or set an image as one.

See Category:Notice templates for other templates based on this one.

Example(s)

{{Notice
|title=Title of notice
|message=Message Body
|contentbackcolor=
|iconbackcolor=
|icon=
|customiconpadding=
|customcontentpadding=
}}

generates:

Title of notice: Message Body

Template data

A template for leaving a notice banner on articles.

Template parameters

ParameterDescriptionTypeStatus
Titletitle

Title of the notice

Stringsuggested
Messagemessage content

The message body of the notice

Stringrequired
Iconicon

FontAwesome icon to display on the notice

Example
fas fa-edit
Auto value
fas fa-edit
Stringoptional
Icon coloriconbackcolor

Background color of the icon section of the notice

Stringoptional
Content background colorcontentbackcolor

Background color of the body of the notice.

Stringoptional
Icon padding valuescustomiconpadding

Custom padding values for the icon section of the notice

Example
10px 10px 10px 10px
Stringoptional
Content padding valuescustomcontentpadding

Custom padding values for the body of the notice

Example
10px 10px 10px 10px
Stringoptional
Classclass

Optional extra CSS classes for the notice

Stringoptional
Imageimage

Optional free-form image input in place of the icon, for use in license templates.

Stringoptional
Border colorbordercolor

no description

Default
#d9d6d3
Stringoptional
Icon coloriconcolor

no description

Default
white
Stringoptional
License informationlicense

Machine readable license information (hidden from viewer)

Stringoptional
clearclear

no description

Default
left
Example
left, right, both
Stringoptional