• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Template:Tooltip/doc"

From Kancolle Wiki
Jump to navigation Jump to search
m (Fix example)
 
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--
 
    PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE
 
    YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT
 
-->
 
 
This template is to provide tooltip function to the words.
 
This template is to provide tooltip function to the words.
 
 
==Usage==
 
==Usage==
 
To use this template, simply follow the examples:
 
To use this template, simply follow the examples:
 
+
<pre>{{Tooltip|text}}</pre>
<code><nowiki>{{Tooltip|<text displayed>|<text shown as tooltip>}}</nowiki></code>
+
{{Tooltip|text}}
:{{Tooltip|<text displayed>|<text shown as tooltip>}}
+
<pre>{{Tooltip|text|tooltip}}</pre>
 
+
{{Tooltip|text|tooltip}}
<code><nowiki>{{Tooltip|Kongou class|Kongou, Hiei, Kirishima and Haruna}}</nowiki></code>
+
<pre>{{Tooltip|text|tooltip|style=color:red}}</pre>
:{{Tooltip|Kongou class|Kongou, Hiei, Kirishima and Haruna}}
+
{{Tooltip|text|tooltip|style=color:red}}
 
+
<pre>{{Tooltip|金剛|Kongō|lang=ja}}</pre>
<code><nowiki>{{Tooltip|{{lang|ja|金剛}}|こんごう}}</nowiki></code>
+
{{Tooltip|金剛|Kongō|lang=ja}}
:{{Tooltip|{{lang|ja|金剛}}|こんごう}}
+
==Tests==
'''NOTE:''' For displaying japanese kanjis with furiganas, you're recommended to use [[Template:Ruby-ja|this template]] instead.
+
===Escaping===
<includeonly>
+
<pre>{{Tooltip|double quotation mark|"}}</pre>
<!--PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS.-->
+
{{Tooltip|double quotation mark|"}}
 
+
<pre>{{Tooltip|single quotation mark|'}}</pre>
<!--PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS.-->
+
{{Tooltip|single quotation mark|'}}
 
+
<pre>{{Tooltip|ampersand|&}}</pre>
</includeonly>
+
{{Tooltip|ampersand|&}}
 +
<pre>{{Tooltip|less-than sign|<}}</pre>
 +
{{Tooltip|less-than sign|<}}
 +
<pre>{{Tooltip|greater-than sign|>}}</pre>
 +
{{Tooltip|greater-than sign|>}}
 +
===Line breaks===
 +
<pre>{{Tooltip|...|1\n2}}</pre>
 +
{{Tooltip|...|1\n2}}
 +
===Tables===
 +
{|class="wikitable"
 +
{{Tooltip/Test
 +
|1
 +
|2
 +
|3
 +
|arg={{Tooltip|1|1}}<br/>{{Tooltip|2|2}}<br/>{{Tooltip|3|3}}
 +
}}
 +
|}
 +
__NOTOC__

Latest revision as of 13:14, 6 June 2019

This template is to provide tooltip function to the words.

Usage

To use this template, simply follow the examples:

{{Tooltip|text}}

text

{{Tooltip|text|tooltip}}

text

{{Tooltip|text|tooltip|style=color:red}}

text

{{Tooltip|金剛|Kongō|lang=ja}}

金剛

Tests

Escaping

{{Tooltip|double quotation mark|"}}

double quotation mark

{{Tooltip|single quotation mark|'}}

single quotation mark

{{Tooltip|ampersand|&}}

ampersand

{{Tooltip|less-than sign|<}}

less-than sign

{{Tooltip|greater-than sign|>}}

greater-than sign

Line breaks

{{Tooltip|...|1\n2}}

...

Tables

1
2
3
1
2
3