Template:Cquote: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<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:#B2B7F2; 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-weight:bold;...") |
m (add document) |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
|50px=100px | |50px=100px | ||
|60px=120px | |60px=120px | ||
|#default=36px}}; font-family:'Times New Roman',serif; font-weight:bold; text-align:left; padding:10px 10px; line-height:100%">{{{open| | |#default=36px}}; font-family:'Times New Roman',serif; font-weight:bold; text-align:left; padding:10px 10px; line-height:100%">{{{open|“}}}</td> | ||
<td style="text-align: left; padding: 1em; vertical-align: middle;">{{{1|}}}</td> | <td style="text-align: left; padding: 1em; vertical-align: middle;">{{{1|}}}</td> | ||
<td style="vertical-align: bottom; color:#B2B7F2; font-size:{{#switch:{{{size|{{{4|{{{quotewidth|{{{width|20px}}}}}}}}}}}} | <td style="vertical-align: bottom; color:#B2B7F2; font-size:{{#switch:{{{size|{{{4|{{{quotewidth|{{{width|20px}}}}}}}}}}}} | ||
Line 15: | Line 15: | ||
|50px=100px | |50px=100px | ||
|60px=120px | |60px=120px | ||
|#default=36px}}; font-family:'Times New Roman',serif; font-weight:bold; text-align:left; padding:10px 10px; line-height:100%">{{{close| | |#default=36px}}; font-family:'Times New Roman',serif; font-weight:bold; text-align:left; padding:10px 10px; line-height:100%">{{{close|”}}}</td> | ||
</tr>{{#if:{{{2|}}}| | </tr>{{#if:{{{2|}}}| | ||
<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>{{=}}</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>&# 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 is
auto
。 - {{{bgcolor}}}:Background color, default is
transparent
, When this parameter is not empty, add a border with the style of1px solid #AAAAAA
to the template。 - {{{4}}}、{{{size}}}、{{{quotewidth}}}:Set
font-size
of quotation marks.font-size
of quotation marks, default is36px
。- If only the parameter
width
is set but no one of the three parameters is set, thefont size
of 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 size
of quotation marks is shown in the following table.
Set value | font-size of 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
- 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>
- Solution: replace the half colon
- 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&# 61;
。
- Solution: Please use
- When this template is used at the top of the page, it should be below {{info}}.