Template:AdvancedTooltip: Difference between revisions

From MalveraWiki
Kuba445 (talk | contribs)
Created page with "<noinclude> {{Documentation}} </noinclude> <div class="tooltip-wrapper"> <span class="tooltip-title">{{{title}}}</span> <div class="custom-tooltip"> <div style="display: flex; justify-content: space-between;"> <table style="width: 48%;"> <tr> <th>Attribute</th> <th>Chance</th> </tr> <tr> <td>Value 1</td> <td>{{{chance..."
 
Kuba445 (talk | contribs)
No edit summary
Line 1: Line 1:
<noinclude>
{{Documentation}}
</noinclude>
<div class="tooltip-wrapper">
<div class="tooltip-wrapper">
    <span class="tooltip-title">{{{title}}}</span>
  <span style="border-bottom: 1px dotted #e2d8ff; cursor: help;">{{{1|Hover Me}}}</span>
    <div class="custom-tooltip">
 
        <div style="display: flex; justify-content: space-between;">
  <div class="custom-tooltip" style="width: auto; max-width: 600px; min-width: 300px;">
            <table style="width: 48%;">
   
                <tr>
    {{#if:{{{name|}}}|<div style="text-align: center; font-weight: bold; font-size: 1.2em; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 5px;">{{{name}}}</div>}}
                    <th>Attribute</th>
 
                    <th>Chance</th>
    <div style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;">
                </tr>
 
                <tr>
      {{#if:{{{attr1|}}}|
                    <td>Value 1</td>
      <div style="flex: 1 1 140px; min-width: 140px;">
                    <td>{{{chance1_1}}}</td>
        <table class="wikitable" style="margin: 0; width: 100%; text-align: center;">
                </tr>
          <tr>
                <tr>
            <th style="text-align: center; color: #cbb4ff;">{{{attr1}}}</th>
                    <td>Value 2</td>
            <th style="text-align: center; width: 40%; font-size: 0.85em; color: #a89ad1;">Chance</th>
                    <td>{{{chance1_2}}}</td>
          </tr>
                </tr>
          <tr>
                <tr>
            <td style="text-align: center; vertical-align: top;">{{{val1}}}</td>
                    <td>Value 3</td>
            <td style="text-align: center; vertical-align: top; color: #ccc;">{{{chance1}}}</td>
                    <td>{{{chance1_3}}}</td>
          </tr>
                </tr>
        </table>
            </table>
      </div>
            <table style="width: 48%;">
      }}
                <tr>
 
                    <th>Attribute 2</th>
      {{#if:{{{attr2|}}}|
                    <th>Chance</th>
      <div style="flex: 1 1 140px; min-width: 140px;">
                </tr>
        <table class="wikitable" style="margin: 0; width: 100%; text-align: center;">
                <tr>
          <tr>
                    <td>Value 1</td>
            <th style="text-align: center; color: #cbb4ff;">{{{attr2}}}</th>
                    <td>{{{chance2_1}}}</td>
            <th style="text-align: center; width: 40%; font-size: 0.85em; color: #a89ad1;">Chance</th>
                </tr>
          </tr>
                <tr>
          <tr>
                    <td>Value 2</td>
            <td style="text-align: center; vertical-align: top;">{{{val2}}}</td>
                    <td>{{{chance2_2}}}</td>
            <td style="text-align: center; vertical-align: top; color: #ccc;">{{{chance2}}}</td>
                </tr>
          </tr>
                <tr>
        </table>
                    <td>Value 3</td>
      </div>
                    <td>{{{chance2_3}}}</td>
      }}
                </tr>
 
            </table>
      {{#if:{{{attr3|}}}|
        </div>
      <div style="flex: 1 1 140px; min-width: 140px;">
    </div>
        <table class="wikitable" style="margin: 0; width: 100%; text-align: center;">
          <tr>
            <th style="text-align: center; color: #cbb4ff;">{{{attr3}}}</th>
            <th style="text-align: center; width: 40%; font-size: 0.85em; color: #a89ad1;">Chance</th>
          </tr>
          <tr>
            <td style="text-align: center; vertical-align: top;">{{{val3}}}</td>
            <td style="text-align: center; vertical-align: top; color: #ccc;">{{{chance3}}}</td>
          </tr>
        </table>
      </div>
      }}
 
      {{#if:{{{attr4|}}}|
      <div style="flex: 1 1 140px; min-width: 140px;">
        <table class="wikitable" style="margin: 0; width: 100%; text-align: center;">
          <tr>
            <th style="text-align: center; color: #cbb4ff;">{{{attr4}}}</th>
            <th style="text-align: center; width: 40%; font-size: 0.85em; color: #a89ad1;">Chance</th>
          </tr>
          <tr>
            <td style="text-align: center; vertical-align: top;">{{{val4}}}</td>
            <td style="text-align: center; vertical-align: top; color: #ccc;">{{{chance4}}}</td>
          </tr>
        </table>
      </div>
      }}
 
      </div>
  </div>
</div>
</div>

Revision as of 19:43, 2 February 2026

 Hover Me
{{#if:|
{{{name}}}
}}
     {{#if:|
{{{attr1}}} Chance
{{{val1}}} {{{chance1}}}
     }}
     {{#if:|
{{{attr2}}} Chance
{{{val2}}} {{{chance2}}}
     }}
     {{#if:|
{{{attr3}}} Chance
{{{val3}}} {{{chance3}}}
     }}
     {{#if:|
{{{attr4}}} Chance
{{{val4}}} {{{chance4}}}
     }}