-The Dream Cancel Wiki has successfully upgraded it's wiki software and editing has returned. Tables for data have returned.

Template:Hover/Alt: Difference between revisions

From Dream Cancel Wiki
Jump to navigation Jump to search
Franck Frost (talk | contribs)
m Franck Frost moved page Template:Hover/Alternate to Template:Hover/Alt without leaving a redirect
Franck Frost (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if:{{{1|}}}|
{{#if:{{{1|}}}|{{#if:{{{style|}}}|<div style="{{{style|}}}">}}<div class="hoverbox">
{{#if:{{{style|}}}|<span style="{{{style}}}">}}
<div class="hoveritem selected">
<span class="hoverbox">
{{{1}}}</div>
<span class="hoveritem selected">
<div class="hoveritem">
{{{1}}}</span>
{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}{{#if:{{{style|}}}|</div>}}</div></div>}}<noinclude>
<span class="hoveritem">
{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}</span></span>{{#if:{{{style|}}}|</span>}}}}<noinclude>
==Usage==
==Usage==
Alternate version of the palette using span instead of div tags. That means there's no need for a tag to implement it in text :
Alternate version of the palette using div instead of span tags. This means it's necessary to use a div tag to implement it in text without unwanted indentation :
Kula's {{Hover/Alt|dp+C|623C}} is trash.
<code><nowiki>Kula's {{Hover/Alt|dp+C|623C}} is trash.</nowiki></code> '''results in''' Kula's {{Hover/Alt|dp+C|623C}} is trash.<br>
<pre>Kula's {{Hover/Alt|dp+C|623C}} is trash.</pre>
<div><code><nowiki><div>Kula's {{Hover/Alt|dp+C|623C}} is trash.</nowiki></code> '''results in''' Kula's {{Hover/Alt|dp+C|623C}} is trash.


But in turn it doesn't fit with common wikitext formatting (: , # , ; ,etc) :
: Kula's {{Hover/Alt|dp+C|623C}} is trash.
<pre>: Kula's {{Hover/Alt|dp+C|623C}} is trash.</pre>


: <div>Kula's {{Hover/Alt|dp+C|623C}} is trash.
Note that you only need a single div tag for every following usage. For instance, the div tag written for the previous example to work means that now
<pre>: <div>Kula's {{Hover/Alt|dp+C|623C}} is trash.</pre>
<code><nowiki>Kula's {{Hover/Alt|dp+C|623C}} is trash.</nowiki></code> '''does result in''' Kula's {{Hover/Alt|dp+C|623C}} is trash.
This effect lasts '''until the template breaks'''.


'''FURTHER WORK NEEDED.'''
==Limitations==
It has the same limitation towards wikitext markups as [[Template:Hover|Hover]]. A further limitation coming from its need of a div tag means each time the template breaks, another div tag has to be written. That is ultimately the reason this version isn't preferred for text.<br>
It however is compatible with div tags, making it usable for cargo tables for example.
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 15:08, 27 August 2022

Usage

Alternate version of the palette using div instead of span tags. This means it's necessary to use a div tag to implement it in text without unwanted indentation :

Kula's {{Hover/Alt|dp+C|623C}} is trash. results in Kula's

dp+C
623C

is trash.

<div>Kula's {{Hover/Alt|dp+C|623C}} is trash. results in Kula's
dp+C
623C
is trash.


Note that you only need a single div tag for every following usage. For instance, the div tag written for the previous example to work means that now

Kula's {{Hover/Alt|dp+C|623C}} is trash. does result in Kula's
dp+C
623C
is trash.

This effect lasts until the template breaks.

Limitations

It has the same limitation towards wikitext markups as Hover. A further limitation coming from its need of a div tag means each time the template breaks, another div tag has to be written. That is ultimately the reason this version isn't preferred for text.
It however is compatible with div tags, making it usable for cargo tables for example.