Template:Cquote: Difference between revisions

From EarthMC
Jump to navigation Jump to search
(fix)
m (add document)
 
Line 19: Line 19:
<tr><td colspan="3" style="font-size: smaller; text-align: right; padding-right: 4%;"><cite style="font-style:normal;">——{{{2}}}{{#if:{{{3|}}}|,{{{3}}}|}}</cite>
<tr><td colspan="3" style="font-size: smaller; text-align: right; padding-right: 4%;"><cite style="font-style:normal;">——{{{2}}}{{#if:{{{3|}}}|,{{{3}}}|}}</cite>
</td></tr>}}
</td></tr>}}
</table>
</table><noinclude>
This template is used to display quoted comments.
== Usage ==
=== parameter list ===
*'''{{{1}}}''':'''Required'''. Quoted comments text.
*'''{{{2}}}''':Author.
*'''{{{3}}}''':Source.
*'''{{{width}}}''':Width, default is<code>auto</code>。
*'''{{{bgcolor}}}''':Background color, default is<code>transparent</code>, When this parameter is not empty, add a border with the style of <code>1px solid #AAAAAA</code> to the template。
*'''{{{4}}}'''、'''{{{size}}}'''、'''{{{quotewidth}}}''':Set <code>font-size</code> of quotation marks.
**<code>font-size</code> of quotation marks, default is <code>36px</code>。
**If only the parameter<code>width</code>is set but no one of the three parameters is set, the<code>font size</code>of quotation marks is set according to the value of<code>width</code>. Otherwise, the setting is made according to the value set in the three parameters. The relationship between the setting value and the<code>font size</code>of quotation marks is shown in the following table.
{| class="wikitable"
! Set value
! <code>font-size</code>of quotation marks.
|- style="color: #000; background-color: #f8f9fa; font-family: monospace;"
| 10px
| 20px
|- style="color: #000; background-color: #f8f9fa; font-family: monospace;"
| 30px
| 60px
|- style="color: #000; background-color: #f8f9fa; font-family: monospace;"
| 40px
| 80px
|- style="color: #000; background-color: #f8f9fa; font-family: monospace;"
| 50px
| 100px
|- style="color: #000; background-color: #f8f9fa; font-family: monospace;"
| 60px
| 120px
|- style="color: #000; background-color: #f8f9fa; font-family: monospace;"
| Other values
| 36px
|}
*'''{{{open}}}''':Set the text used as the opening quotation mark. The default value is<code>-{“}-</code>。
*'''{{{close}}}''':Set the text used as the closing quotation mark. The default value is<code>-{”}-</code>。
 
=== Examples of use ===
<pre>{{Cquote|This is an introduction}}</pre>
{{Cquote|This is an introduction}}
 
<pre>{{Cquote|introduction|Fix}}</pre>
{{Cquote|introduction|Fix}}
 
<pre>{{Cquote|introduction|Fix|user 's manual}}</pre>
{{Cquote|introduction|Fix|user 's manual}}
 
<pre>{{Cquote|Here is a six word introduction|sb.|The book|bgcolor=#66ccff|width=200px|size=30px|open=「|close=』}}</pre>
{{Cquote|Here is a six word introduction|sb.|The book|bgcolor=#66ccff|width=300px|size=30px|open=「|close=』}}
 
== Be careful ==
 
#{{color|red|Please do not add a semicolon for indenting in front of this template, which will cause errors in the layout of the whole page!}}
#*Solution: replace the half colon<code><nowiki>:</nowiki></code>with<code><nowiki><dl><dd>{{Cquote|indent the introduction content}}</dd></dl></nowiki></code>, and so on. For example, if<code><nowiki>:::</nowiki></code>, it needs to be replaced with<code><nowiki><dl><dd><dl><dd><dd>{Cquote|The introduction of indented part}}</dd></dl></dd></dl></dl></nowiki></code>
#Errors may occur when using HTML tags directly in this template. The reason for the error is that the equal sign<code>=</code>in the HTML tag will be incorrectly identified.
#*Solution: Please use<code>{&#123;=&#125;}</code>instead of<code>=</code>in the HTML tag; Or use the ordinal variable name<code>1=<Citation></code>,<code>2=<Author></code>in the template parameters; Or HTML entities using the equal sign<code>&amp# 61;</code>。
#When this template is used at the top of the page, it should be below {{tl|info}}.
</noinclude>

Latest revision as of 21:53, 6 January 2023

This template is used to display quoted comments.

Usage

parameter list

  • {{{1}}}Required. Quoted comments text.
  • {{{2}}}:Author.
  • {{{3}}}:Source.
  • {{{width}}}:Width, default isauto
  • {{{bgcolor}}}:Background color, default istransparent, When this parameter is not empty, add a border with the style of 1px solid #AAAAAA to the template。
  • {{{4}}}{{{size}}}{{{quotewidth}}}:Set font-size of quotation marks.
    • font-size of quotation marks, default is 36px
    • If only the parameterwidthis set but no one of the three parameters is set, thefont sizeof quotation marks is set according to the value ofwidth. Otherwise, the setting is made according to the value set in the three parameters. The relationship between the setting value and thefont sizeof quotation marks is shown in the following table.
Set value font-sizeof quotation marks.
10px 20px
30px 60px
40px 80px
50px 100px
60px 120px
Other values 36px
  • {{{open}}}:Set the text used as the opening quotation mark. The default value is-{“}-
  • {{{close}}}:Set the text used as the closing quotation mark. The default value is-{”}-

Examples of use

{{Cquote|This is an introduction}}
This is an introduction
{{Cquote|introduction|Fix}}
introduction
——Fix
{{Cquote|introduction|Fix|user 's manual}}
introduction
——Fix,user 's manual
{{Cquote|Here is a six word introduction|sb.|The book|bgcolor=#66ccff|width=200px|size=30px|open=「|close=』}}
Here is a six word introduction
——sb.,The book

Be careful

  1. Please do not add a semicolon for indenting in front of this template, which will cause errors in the layout of the whole page!
    • Solution: replace the half colon:with<dl><dd>{{Cquote|indent the introduction content}}</dd></dl>, and so on. For example, if:::, it needs to be replaced with<dl><dd><dl><dd><dd>{Cquote|The introduction of indented part}}</dd></dl></dd></dl></dl>
  2. Errors may occur when using HTML tags directly in this template. The reason for the error is that the equal sign=in the HTML tag will be incorrectly identified.
    • Solution: Please use{{=}}instead of=in the HTML tag; Or use the ordinal variable name1=<Citation>,2=<Author>in the template parameters; Or HTML entities using the equal sign&amp# 61;
  3. When this template is used at the top of the page, it should be below {{info}}.