Template

Difference between revisions of "Ambox/doc"

From Joomla! Documentation

< Template:Ambox
m
Line 3: Line 3:
 
It generates a two column table with an optional "message icon". The message <tt>text</tt> must be provided by the calling template in the <nowiki>{{{text}}}</nowiki> parameter.
 
It generates a two column table with an optional "message icon". The message <tt>text</tt> must be provided by the calling template in the <nowiki>{{{text}}}</nowiki> parameter.
  
<tt>ambox</tt> '''should never be used directly''', but only via "proxy templates" such as '''{{tlp|inuse}}''', '''{{tlp|underconstruction}}''' or '''{{tlp|docstatus}}'''. Those templates provide default parameters to have a consistant look and feel for alert message boxes including a standard message text.
+
<tt>ambox</tt> '''should never be used directly''', but only via "[[:Category:Marker templates|proxy templates]]" such as '''{{tl|notice}}''', '''{{tl|inuse}}''', '''{{tl|underconstruction}}''' or '''{{tl|docstatus}}'''. Those templates provide default parameters to have a consistant look and feel for alert message boxes including a standard message text and appropriate category tags.
  
 
== Parameters ==
 
== Parameters ==
Line 10: Line 10:
 
: the message text to display
 
: the message text to display
 
Optional:
 
Optional:
 +
;style (empty)
 +
: value of the HTML style attribute applied to the table element
 
;type (notice)
 
;type (notice)
 
: controls the class attribute used
 
: controls the class attribute used
Line 16: Line 18:
 
;imageright (none)
 
;imageright (none)
 
: an supplemental image from the Image: namespace, shown in a third column
 
: an supplemental image from the Image: namespace, shown in a third column
;style (empty)
 
: CSS properties for the HTML <tt>style</tt> attribute applied to the &lt;table&gt; element. Please try to avoid using colors and fancy font settings in inline styles as this may conflict with a skin's color schema and user settings -- think accessibility!
 
  
=== type and image ===
+
=== type ===
:'''Internal note:''' Please update the list of image names if files become available.
+
{| class="wikitable"
{| class="wikitable parameters"
+
!Value    !!CSS class
!Value   !! CSS class !! Image name
+
|-
 +
|serious  ||ambox-serious
 +
|-
 +
|content  ||ambox-content
 +
|-
 +
|style    ||ambox-style
 +
|-
 +
|merge    ||ambox-merge
 +
|-
 +
|notice  ||ambox-notice
 +
|-
 +
|growth  ||ambox-growth
 +
|-
 +
|protection||ambox-protection
 +
|-
 +
|#default ||ambox-notice
 +
|}
 +
 
 +
=== image ===
 +
: Please update this list to the image names used.
 +
{| class="wikitable"
 +
!Value !!Image name
 
|-
 
|-
|serious  ||ambox-serious ||[[Image:Stop_hand_nuvola.svg.png|50|Stop icon]]
+
|serious  || [[Image:Stop hand nuvola.svg.png|50px]]
 
|-
 
|-
|content  ||ambox-content ||[[Image:Info_content.png|50]]<br/>(paper sheet?)
+
|content  || [[Image:Quill_silver.png|left|50px]]
 
|-
 
|-
|style    ||ambox-style  ||[[Image:Info_style.png|50]]<br/>(a [[wikipedia:Feather|calamus/quill]]?)
+
|style    || [[Image:Broom-icon.png|50px]]
 
|-
 
|-
|merge    ||ambox-merge  ||[[Image:Info_merge.png|50]]<br/>(arrows, bandage, symbolic diff output?)
+
|merge    || [[Image:Merge-split.png|50px]]
 
|-
 
|-
|notice  ||ambox-notice  ||[[Image:Info_non-talk.png|50]]
+
|notice  || [[Image:Info non-talk.png]]
 
|-
 
|-
|growth   ||ambox-growth  ||[[Image:Info_growth.png|50]]
+
|notice   || [[Image:Green-plus-icon.png|50px]]
 
|-
 
|-
|blank    ||ambox || empty cell
+
|blank    || empty cell
 
|-
 
|-
|#default ||ambox-notice ||empty cell
+
|#default || empty cell
 
|}
 
|}
  
 
=== imageright ===
 
=== imageright ===
An optional, arbitragy image from the {{ns:image}} namespace. If this value is not empty, a third right column in added to the alert box.
+
An optional, arbitrary image from the {{ns:image}} namespace. If this value is not empty, a third right column in added to the alert box to display the given image.
 +
 
 +
Try it in the [[Template:Ambox/sandbox]].
  
 
=== Stylesheet ===
 
=== Stylesheet ===
  table.metadata plainlinks ambox ''type''
+
  table.ambox ambox-''type''
 
  td.ambox-image
 
  td.ambox-image
 
  td.ambox-imageright
 
  td.ambox-imageright
<includeonly>[[Category:Templates that need an overhaul]]</includeonly>
+
table.standard-main
 +
table.standard-talk
 +
table.standard-file
 +
table.standard-other
 +
<includeonly>{{wikipedia template}}[[Category:Marker templates|{{PAGENAME}}]]</includeonly>

Revision as of 11:21, 3 May 2008

This is a documentation subpage for Template:Ambox.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:Ambox.

{{ambox}} is the base tempate used by several "alert message boxes" which can be placed at the top of an article. It generates a two column table with an optional "message icon". The message text must be provided by the calling template in the {{{text}}} parameter.

ambox should never be used directly, but only via "proxy templates" such as {{notice}}, {{inuse}}, {{underconstruction}} or {{docstatus}}. Those templates provide default parameters to have a consistant look and feel for alert message boxes including a standard message text and appropriate category tags.

Parameters[edit]

Mandatory:

text
the message text to display

Optional:

style (empty)
value of the HTML style attribute applied to the table element
type (notice)
controls the class attribute used
image (none)
an image from the Image: namespace as a notification icon
imageright (none)
an supplemental image from the Image: namespace, shown in a third column

type[edit]

Value CSS class
serious ambox-serious
content ambox-content
style ambox-style
merge ambox-merge
notice ambox-notice
growth ambox-growth
protection ambox-protection
#default ambox-notice

image[edit]

Please update this list to the image names used.
Value Image name
serious Stop hand nuvola.svg.png
content
style Broom-icon.png
merge 50px
notice Info non-talk.png
notice 50px
blank empty cell
#default empty cell

imageright[edit]

An optional, arbitrary image from the File namespace. If this value is not empty, a third right column in added to the alert box to display the given image.

Try it in the Template:Ambox/sandbox.

Stylesheet[edit]

table.ambox ambox-type
td.ambox-image
td.ambox-imageright
table.standard-main
table.standard-talk
table.standard-file
table.standard-other