Template:Blockquote/doc: Difference between revisions

Jump to navigation Jump to search
styling
m (Removed 40 sitelinks migrated to an item on Wikidata)
(styling)
Line 4:
 
== Usage ==
 
{{tlx|Quote}} adds a [[block quotation]] to an article page.
 
Line 12 ⟶ 11:
 
=== Synopsis ===
;'''Unnamed (positional) parameters'''
 
;Unnamed (positional) parameters
<code><nowiki>{{quote|phrase|person|source}}</nowiki></code>
This markup will fail if any parameter contains an equals sign (=).
 
;'''Numbered (positional) parameters'''
<code><nowiki>{{quote|1=phrase|2=person|3=source}}</nowiki></code>
 
;'''Named parameters'''
<code><nowiki>{{quote|text=phrase|sign=person|source=source}}</nowiki></code>
 
=== ExampleStyle ===
Styling is applied through CSS rules in [[MediaWiki:Common.css]].
<syntaxhighlight lang=css>
/* Styling for Template:Quote */
blockquote.templatequote {
margin-top: 0;
}
blockquote.templatequote div.templatequotecite {
line-height: 1em;
/* @noflip */
text-align: left;
/* @noflip */
padding-left: 2em;
margin-top: 0;
}
blockquote.templatequote div.templatequotecite cite {
font-size: 85%;
}
</syntaxhighlight>
 
The source title is enclosed in {{tag|cite}}, thus it shows italicized.
;Wikitext:
<code><nowiki>{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=[[William Shakespeare]]|source=''[[Julius Caesar (play)|Julius Caesar]]'', act III, scene I}}</nowiki></code>
 
=== Examples ===
;Result:
 
{{markupv
|markup=<code><nowiki>{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=[[William Shakespeare]]|source=''[[Julius Caesar (play)|Julius Caesar]]'', act III, scene I}}</nowiki></code>
|renders=
{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=[[William Shakespeare]]|source=''[[Julius Caesar (play)|Julius Caesar]]'', act III, scene I}}
}}
 
=== Restrictions ===
 
If you do not provide quoted text, the template generates a parser error message, which will appear in red text in the rendered page.
 
Line 42 ⟶ 61:
 
=== Line breaks ===
 
{{Blockquote paragraphs}}
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu