Template:Cquote: Difference between revisions
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>{{=}}</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> | |||