Template:Hint: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:Hint/styles.css" /><span class="wiki-hint {{# | <includeonly><!-- | ||
--><templatestyles src="Template:Hint/styles.css" /><!-- | |||
--><span class="wiki-hint <!-- | |||
-->wiki-hint-{{{side|top}}} <!-- | |||
-->{{#iferror: {{#ifexpr: {{#pos: {{{1|}}} | File }} >= 0 | wiki-hint-no-border }}|}} <!-- | |||
-->"<!-- | |||
-->><!-- | |||
-->{{{1}}}<span class="wiki-hint-floating">{{{2}}}</span><!-- | |||
--></span><!-- | |||
################################################################################ | |||
--></includeonly><noinclude> | |||
A minor tooltip for short descriptions. As opposed to the "title" attribute, it has the following advantages: | A minor tooltip for short descriptions. As opposed to the "title" attribute, it has the following advantages: | ||
* It's instant upon hover (has no delay) | * It's instant upon hover (has no delay) | ||
* It uses a skin customized for Olden Era | * It uses a skin customized for Olden Era | ||
* Wraps the text if too long | |||
* Can be placed top/left/right/bottom. Defaults to "top". | |||
== Usage == | == Usage == | ||
1. | 1. Basic: | ||
< | |||
{{Color|yellow|Input:}} <code><nowiki>{{Hint | Hello | World}}</nowiki></code> | |||
{{Color|lime|Output:}} {{Hint | Hello | World}} | |||
---- | |||
2. With images. In such cases, the subtle underline is automatically removed. | |||
{{Color|yellow|Input:}} <code><nowiki>{{Hint | [[File:Icon_Resource_Wood.png]] | Wood}}</nowiki></code> | |||
{{Color|lime|Output:}} {{Hint | [[File:Icon_Resource_Wood.png]] | Wood}} | |||
---- | |||
3. With a lot of text | |||
{{Color|yellow|Input:}} <code><nowiki>{{Hint | Lorem | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}</nowiki></code> | |||
{{Color|lime|Output:}} {{Hint | Lorem | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}} | |||
---- | |||
4. Placed at the "bottom": | |||
{{Color|yellow|Input:}} <code><nowiki>{{Hint | Hello | World | side=bottom}}</nowiki></code> | |||
{{Color|lime|Output:}} {{Hint | Hello | World | side=bottom}} | |||
---- | ---- | ||
5. Placed to the "left": | |||
< | |||
{{Color|yellow|Input:}} <code><nowiki>{{Hint | Hello | World | side=left}}</nowiki></code> | |||
{{Color|lime|Output:}} {{Hint | Hello | World | side=left}} | |||
---- | |||
6. Placed to the "right": | |||
{{Color|yellow|Input:}} <code><nowiki>{{Hint | Hello | World | side=right}}</nowiki></code> | |||
{{Color|lime|Output:}} {{Hint | Hello | World | side=right}} | |||
</noinclude> | |||
Revision as of 11:21, 23 June 2026
A minor tooltip for short descriptions. As opposed to the "title" attribute, it has the following advantages:
- It's instant upon hover (has no delay)
- It uses a skin customized for Olden Era
- Wraps the text if too long
- Can be placed top/left/right/bottom. Defaults to "top".
Usage
1. Basic:
Input: {{Hint | Hello | World}}
Output: Hello World
2. With images. In such cases, the subtle underline is automatically removed.
Input: {{Hint | [[File:Icon_Resource_Wood.png]] | Wood}}
3. With a lot of text
Input: {{Hint | Lorem | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}
Output: Lorem Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
4. Placed at the "bottom":
Input: {{Hint | Hello | World | side=bottom}}
Output: Hello World
5. Placed to the "left":
Input: {{Hint | Hello | World | side=left}}
Output: Hello World
6. Placed to the "right":
Input: {{Hint | Hello | World | side=right}}
Output: Hello World


