Template:Quote box2/doc

From Dodge Wiki
Jump to navigation Jump to search

Quote box2 places text in a box with versatile formatting. This template is backwardly compatible with {{quote box}}. A variety of examples are shown on the testcases page.

It should be noted that simply because this template allows various formatting, such formatting may not be acceptable to all editors.

Usage

This template may be added by copy-pasting the template as shown below into an article.

{{Quote box2
|width     = 
|border    =
|align     = 
|bgcolor   =
|fontsize  = 
|title_bg  = 
|title_fnt = 
|title     = 
|halign    = 
|quote     = 
|salign    = 
|source    = 
}}

Parameters

Parameter Explanation
width Set the width of the quote box using em, px or %; defaults to the width of the text
It may be desirable to match the width of an infobox in the article. Infobox widths vary— some common boxes are:
border Set the border width using em or px; defaults to 1px
align Set the horizontal alignment for the quote box to left, center or right; defaults to right. Left alignment creates a 0em left margin and a 1em right margin; right alignment creates a 1em left margin and a 0em right margin.
bgcolor Set the box background color; defaults to #F9F9F9
#F9F9F9 is the the color of the WP left sidebar with the default Monobook skin; the WP article background is #F8FCFF. See web colors and list of colors for more.

Please ensure that the result will be readable by people with color blindness, and those with visual disabilities. The Web Content Accessibility Guidelines recommend a contrast ratio of at least 5:1 for text — use this Contrast ratio calculator to help determine if the colors you choose will be visible to everyone.

fontsize Set the base font size; defaults to 90%
title_bg Set the title background color; defaults to no background
title_fnt Set the title font color; defaults to black
title Insert the desired title; this will be centered and bolded
halign Set the horizontal alignment for the quote text to left, center, right or justify; defaults to center.
quote Quote text
salign Set the horizontal alignment for the source text to left, center or right; defaults to the halign setting
source Source text

Formatting

Normally, text is formatted as a single paragraph. Line breaks may be retained by adding a <br /> at the end of line. Content that includes spaces or line breaks may also retain the formatting by placing it within the [[mw:Extension:Poem|Template:Tag]] tags. Formatting such as font size, color and other attributes may be included by using [[Span and div|Template:Tag]] or [[Font family (HTML)|Template:Tag]] tags. Line padding my be handled by including non-breaking spaces or by using the {{pad}} template. Images may be included by formatting them in the proper syntax.

Examples

{{quote box2 |width=30em | bgcolor=#c6dbf7 |align=right |halign=left | quote="Baden-Powell is a wonderfully able scout and quick at sketches. I do not know another who could have done the work at Mafeking if the same conditions had been imposed. All the bits of knowledge he studiously gathered have been utilized in saving that community." |source= — ''Siege of Mafeking Abandoned by the Boers'', [[Frederick Russell Burnham]], the American scout, interviewed by [[The Times]], May 19, 1900.}}

produces:

"Baden-Powell is a wonderfully able scout and quick at sketches. I do not know another who could have done the work at Mafeking if the same conditions had been imposed. All the bits of knowledge he studiously gathered have been utilized in saving that community."
 — Siege of Mafeking Abandoned by the Boers, Frederick Russell Burnham, the American scout, interviewed by The Times, May 19, 1900.

More examples can be found on the examples page.

See also

Similar templates
  • Template:Epigraph – quote without border, page-wide, normal-sized attribution
  • Template:Quote – quote without border, page-wide, smaller-sized attribution
  • Template:Quotation – quote with border, page-wide
  • Template:Quote box – quote with border, in a reduced floating box
  • Template:Quote box2 – quote with border, in a reduced floating box, optional title, extra formatting options
  • Template:Cquote – pull-quote between graphic quotation marks, page-wide
  • Template:Rquote – pull-quote between graphic quotation marks, in a reduced floating area
  • Category:Quotation templates – more templates