Template

Difference between revisions of "Ambox/doc"

From Joomla! Documentation

< Template:Ambox
m
m (correct image link added to the template docs)
 
(8 intermediate revisions by 2 users not shown)
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 "[[: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 optional category tags.
+
<tt>ambox</tt> '''should never be used directly''', but only via "proxy templates" such as {{tl|notice}}, {{tl|inuse}}, {{tl|underconstruction}}, or other [[:Category:Marker templates|Marker templates]]. 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 box color
 
;image (none)
 
;image (none)
: an image from the Image: namespace as a notification icon
+
: a notification icon.
 
;imageright (none)
 
;imageright (none)
: an supplemental image from the Image: namespace, shown in a third column
+
: a supplemental image from the Image: namespace, shown in a third (right) column
  
 
=== type ===
 
=== type ===
 
{| class="wikitable"
 
{| class="wikitable"
!Value    !!CSS class
+
!Value    !!CSS class !! Preview
 
|-
 
|-
|serious  ||ambox-serious
+
|serious  ||ambox-serious || <div class="ambox ambox-serious">serious lorem ipsum</div>
 
|-
 
|-
|content  ||ambox-content
+
|content  ||ambox-content || <div class="ambox ambox-content">content lorem ipsum</div>
 
|-
 
|-
|style    ||ambox-style
+
|style    ||ambox-style || <div class="ambox ambox-style">style lorem ipsum</div>
 
|-
 
|-
|merge    ||ambox-merge
+
|merge    ||ambox-merge || <div class="ambox ambox-merge">merge lorem ipsum</div>
 
|-
 
|-
|notice  ||ambox-notice
+
|notice  ||ambox-notice || <div class="ambox ambox-notice">notice lorem ipsum</div>
 
|-
 
|-
|growth  ||ambox-growth
+
|growth  ||ambox-growth || <div class="ambox ambox-growth">growth lorem ipsum</div>
 
|-
 
|-
|protection||ambox-protection
+
|protection||ambox-protection || <div class="ambox ambox-protection">protection lorem ipsum</div>
 
|-
 
|-
|#default ||ambox-notice
+
|#default ||ambox-notice || see ''notice''
 
|}
 
|}
 +
The color scheme is based off the official [[Project:Colors|Joomla! logo and working group color palette]] and available for users of the Monobook and Joomla! skins.
  
 
=== image ===
 
=== image ===
Line 45: Line 44:
 
!Value !!Image name
 
!Value !!Image name
 
|-
 
|-
|serious  || [[Image:Stop hand nuvola.svg.png|50px]]
+
|serious  || [[Image:Stop hand nuvola.svg.png]]
 
|-
 
|-
|content  || [[Image:Quill_silver.png|left|50px]]
+
|content  || [[Image:Quill_icon.png|left|60px]]
 
|-
 
|-
|style    || [[Image:Broom-icon.png|50px]]
+
|style    || [[Image:Broom-icon.png]]
 
|-
 
|-
|merge    || [[Image:Merge-split.png|50px]]
+
|merge    || [[Image:Merge-icon.png|50px]]
 
|-
 
|-
 
|notice  || [[Image:Info non-talk.png]]
 
|notice  || [[Image:Info non-talk.png]]
 
|-
 
|-
|notice   || [[Image:Green-plus-icon.png|50px]]
+
|growth   || [[Image:Green-plus-icon.png|50px]]
 +
|-
 +
|jdoc    || [[Image:Documentation all together tranparent small.png]]
 
|-
 
|-
 
|blank    || empty cell
 
|blank    || empty cell
Line 68: Line 69:
  
 
=== Stylesheet ===
 
=== Stylesheet ===
  table.ambox ambox-''type''
+
  table.ambox           (basic table settings)
  td.ambox-image
+
table.ambox-''type''     (text and border colors)
  td.ambox-imageright
+
  td.ambox-image       (left icon column)
  table.standard-main
+
  td.ambox-imageright   (right image column)
 +
  table.standard-main   (namespace specific overrides {{tl|main talk file other}})
 
  table.standard-talk
 
  table.standard-talk
 
  table.standard-file
 
  table.standard-file
 
  table.standard-other
 
  table.standard-other
 
<includeonly>{{wikipedia template}}[[Category:Marker templates|{{PAGENAME}}]]</includeonly>
 
<includeonly>{{wikipedia template}}[[Category:Marker templates|{{PAGENAME}}]]</includeonly>

Latest revision as of 22:03, 1 February 2013

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 other Marker templates. 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:

type (notice)
controls the box color
image (none)
a notification icon.
imageright (none)
a supplemental image from the Image: namespace, shown in a third (right) column

type[edit]

Value CSS class Preview
serious ambox-serious
serious lorem ipsum
content ambox-content
content lorem ipsum
style ambox-style
style lorem ipsum
merge ambox-merge
merge lorem ipsum
notice ambox-notice
notice lorem ipsum
growth ambox-growth
growth lorem ipsum
protection ambox-protection
protection lorem ipsum
#default ambox-notice see notice

The color scheme is based off the official Joomla! logo and working group color palette and available for users of the Monobook and Joomla! skins.

image[edit]

Please update this list to the image names used.
Value Image name
serious Stop hand nuvola.svg.png
content
Quill icon.png
style Broom-icon.png
merge Merge-icon.png
notice Info non-talk.png
growth 50px
jdoc Documentation all together tranparent small.png
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           (basic table settings)
table.ambox-type      (text and border colors)
td.ambox-image        (left icon column)
td.ambox-imageright   (right image column)
table.standard-main   (namespace specific overrides {{main talk file other}})
table.standard-talk
table.standard-file
table.standard-other