Template:Colored box: Difference between revisions

From Open Food Facts wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
{{{content}}}{{clr}}</div>
{{{content}}}{{clr}}</div>
</div><noinclude>
</div><noinclude>
{{Colored gutter}}
DOCUMENTATION
DOCUMENTATION
== Usage ==
== Usage ==
Line 191: Line 192:
== See also ==
== See also ==
* [[Template:Colored bar]]
* [[Template:Colored bar]]
* [[Template:Colorbar]]
* [[Template:Colored gutter]]
* [[Template:Colored bar]]
* [[Template:Begin colored insert]]
* [[Template:Begin colored insert]]
* [[Template:End insert]]
* [[Template:End insert]]

Latest revision as of 15:32, 11 April 2024

{{{title}}}
{{{content}}}

DOCUMENTATION

Usage

Allow to insert a modern box. For the box to continue to the bottom you must use the argument « | flex = 1 1 auto »

Syntax

Reduced Syntax

{{Colored box
 | title = 
 | title-color = #000
 | background-title-color = #eaecf0
 | icon = 
 | content = 
 | background-content-color = #f8f9fa
 | link = 
}}

Complete syntax

{{Colored box
 | title = 
 | title-color = #000
 | background-title-color = #eaecf0
 | icon = 
 | content = 
 | background-content-color = #f8f9fa
 | style = 
 | link = 
}}

Parameters

Colored box for content presentation.

[Edit template data]

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Titletitle

Title of the box.

Example
Tag water
Stringrequired
Contentcontent

Content of the box.

Example
Content text
Contentrequired
Linklink

Title of the wiki page to edit the content.

Example
Map_Features
Page namesuggested
Title background colorbackground-title-color

Hexadecimal color code of the title bar background.

Default
#339966
Example
#447FF5
Stringsuggested
Iconicon

Name of the file for icon.

Example
Circle-icons-chat.svg
Fileoptional
Title colortitle-color

Hexadecimal color code of the title text.

Default
#FFFFFF
Example
#339966
Stringoptional
Stylestyle

Additional CSS style for the container.

Example
flex: 1 1 20em;
Stringoptional
Link colorlink-color

Hexadecimal color code of the Modify link.

Default
#999999
Example
#339966
Stringoptional
Content background colorbackground-content-color

Hexadecimal color code of the box content background.

Default
#F8F9FA
Example
#339966
Stringoptional
view-textview-text

Default title: edit, can be changed

Default
edit
Unknownoptional
Title background color on hovertitre-couleur-fond-hover

When hovering with the mouse, changes the background color of the title.

Default
{{{titre-couleur-fond}}}
Unknownoptional
Flexflex

Integration in the grid of the dynamic column/line. The first number indicates the proportion to which the box can expand, the second to which it can shrink, the third the minimum width in px/em of the box

Default
0 1 auto
Example
1 1 25em
Stringoptional
Center the titlecenter

If filled, allows to center the title.

Unknownoptional

Exemple

  • {{Colored box | title = Wikidata Query Builder | title-color = #000 | background-title-color = #D33F00 | icon = | content = Lorem Ipsum | background-content-color = #f8f9fa | link = Wikidata:Query Builder }}
Wikidata Query Builder edit
Lorem Ipsum
  • {{Colored box | title = Box name | title-color = #000 | background-title-color = #eaecf0 | icon = | content = | background-content-color = #f8f9fa | link = }}
Box name

See also