Template:Sandbox/Aurelain/Hint: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><templatestyles src="Template:Sandbox/Aurelain/Hint/styles.css" /><!--
--><templatestyles src="Template:Sandbox/Aurelain/Hint/styles.css" /><!--
--><span class="wiki-hint {{#if:{{{3|}}}|wiki-hint-no-border}}"><!--
--><span class="
     -->{{{1}}}<span class="wiki-hint-floating">{{{2}}}</span><!--
        <wiki-hint
        {{#if:{{{3|}}}|wiki-hint-no-border}}
        {{#if:{{{side|top}}}|wiki-hint-{{{side}}}}}
  "><!--
     -->{{{1}}}<div class="wiki-hint-floating">{{{2}}}</div><!--
--></span><!--
--></span><!--
################################################################################
################################################################################
Line 10: Line 14:
* 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
* Can be placed top/left/right/bottom


== Usage ==
== Usage ==
Line 24: Line 29:


{{Color|lime|Output:}} {{Sandbox/Aurelain/Hint | [[File:Icon_Resource_Wood.png]] | Wood | 0}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/Hint | [[File:Icon_Resource_Wood.png]] | Wood | 0}}
----
3. With custom placement (instead of the "top" default):
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/Hint | Hello | World | side=bottom}}</nowiki></code>
{{Color|lime|Output:}} {{Sandbox/Aurelain/Hint | Hello | World | side=bottom}}


</noinclude>
</noinclude>

Revision as of 09:49, 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
  • Can be placed top/left/right/bottom

Usage

1. For texts:

Input: {{Sandbox/Aurelain/Hint | Hello | World}}

Output: <span class="

       <wiki-hint
       
       wiki-hint-{{{side}}}

"> Hello

World

2. For icons, pass a third parameter to disable the subtle border:

Input: {{Sandbox/Aurelain/Hint | [[File:Icon_Resource_Wood.png]] | Wood | 0}}

Output: <span class="

       <wiki-hint
       wiki-hint-no-border
       wiki-hint-{{{side}}}

">

Wood

3. With custom placement (instead of the "top" default):

Input: {{Sandbox/Aurelain/Hint | Hello | World | side=bottom}}

Output: <span class="

       <wiki-hint
       
       wiki-hint-bottom

"> Hello

World