Template:Cquote

From NeuroWiki
Revision as of 10:14, 25 May 2025 by Selfice (talk | contribs) (Created page with "<includeonly><table style="display: table; border-collapse: collapse; margin: auto; background-color:{{{bgcolor|transparent}}}; {{#if:{{{width|}}}|width: min({{{width}}}, 90%);|}} {{#if: {{{bgcolor|}}}|border: 1px solid #AAAAAA;}}"> <tr> <td style="vertical-align: top; color:#F29792; font-size:{{#switch:{{{size|{{{4|{{{quotewidth|{{{width|20px}}}}}}}}}}}} |10px=20px |30px=60px |40px=80px |50px=100px |60px=120px |#default=36px}}; font-family:'Times New Roman',serif; font-...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
[ View | Edit | History | Purge ]Documentation page

This template is for quotations.

Introduction

Parameter List

  • {{{1}}}: Quotation text.
  • {{{2}}}: Author.
  • {{{3}}}: Source.
  • {{{width}}}: Width, default value is auto.
  • {{{bgcolor}}}: Background color, default value is transparent. When this parameter is not empty, the template adds a border styled as 1px solid #AAAAAA.
  • {{{neurofont}}}: Font; entering "neuro" or "evil" also changes the color. Entering "yes" only changes the font. Default is "no."
  • {{{4}}}, {{{size}}}, {{{quotewidth}}}: Set the font-size of the quotation marks, use any one of these.
    • The default value for the font-size of the quotation marks is 36px.
    • If only the parameter width is set and none of these three parameters are set, the font-size of the quotation marks will be determined based on the value of width. Otherwise, the value of the set parameter among these three will be used. The relationship between the set value and the font-size of the quotation marks is shown in the table below.
Set Value font-size of Quotation Marks
10px 20px
30px 60px
40px 80px
50px 100px
60px 120px
Other Values 36px
  • {{{open}}}: Sets the left quotation mark text, default value is ".
  • {{{close}}}: Sets the right quotation mark text, default value is ".

Example Usage

{{Cquote|This is a quote}}
" This is a quote "
{{Cquote|Quote|Author}}
" Quote "
—Author
{{Cquote|Quote|Author|Source}}
" Quote "
—Author, Source
{{Cquote|This is a quote containing sixteen characters|Author|Source|bgcolor=#66ccff|width=200px|size=30px|open=「|close=』}}
This is a quote containing sixteen characters
—Author, Source

Notes

  1. Please do not add a colon for indentation before this template, as it will cause layout issues on the entire page!
    • Solution: Replace the colon : with <dl><dd>{{Cquote|Indented quote content}}</dd></dl>, and so on. For example, ::: should be replaced with <dl><dd><dl><dd><dl><dd>{{Cquote|Indented quote content}}</dd></dl></dd></dl></dd></dl>.
  2. Using HTML tags directly within this template may result in errors because the equals sign = in HTML tags may be misinterpreted.
    • Solution: Use {{=}} to replace the = in HTML tags; or use ordinal variable names such as 1=<Quote>, 2=<Author>; or use the HTML entity &#61; for the equals sign.
  3. When this template is used at the top of the page, it should be placed below {{info}}.

Template:Formatting template

[ View | Edit | History | Purge ]The above documentation is transcluded from Template:Cquote/doc.