#Issue causing template parameter to not work

21 messages · Page 1 of 1 (latest)

trim arrow
#

wiki: https://wiki.stinkysmp.net
<h3><span style="color:#AA0000">'''RED'''</span> {{Badge|RED40|You move at 2.5x speed and your hunger won't deplete while your body is running on <span style="color:#AA0000">'''RED'''</span>, but you will lose your access to <span style="color:#AA0000">'''RED'''</span> while your arm is wound.}} {{Badge|Red Bed|You will be granted red dye upon waking up.}}</h3>

glass hearth
#

Look likes it's working properly

trim arrow
#

hover your mouse on the red dye badge

#

you'll see that it only shows {{{2}}}

#

I believe this is because I added coloured text in it

glass hearth
#

I guess the reason is that html tags are used as arguments.
I think I found a solution. But I don't remember.

#

I don't know which tooltip-gadget your wiki uses, but if it is an implementation like the css div:pre{contents:“<message>”}, it would be impossible to include the html tags to begin with.

#

I have a similar gadget installed on my wiki, but like you, I cannot use html tags and use a special method.

glass hearth
# trim arrow what do you use?

Sorry. I do not recommend the gadget I am using. Because the one I use in my wiki does not allow to specify the color, and the way to fix the color of negative, positive, common, uncommon. rare. rare. epic per line is by css.

trim arrow
#

ah ok

#

hmm

#

so what do i do then

glass hearth
#
<span 
  data-mine-tooltip='{"text": "{{{2}}}"}'
  title=""
>
{{{1}}}
</span>

This is a slightly modified version of my Wiki gadget. Perhaps this will work.

#
.minetext-font {
    font-family: var(--minecraft-fontfamily);
}

#mine-tooltip, .minetext {
    font-family: var(--minecraft-fontfamily);
    font-size: 20px;
    white-space: nowrap;
    line-height: 1.1em;
    color: #FFF;
    text-shadow: 0.12em 0.1em 0 #3f3f3f;
    -webkit-font-smoothing: none;
    font-weight: 100;
}

#mine-tooltip, .minebox {
    background-color: #100010;
    background-color: rgba(16,0,16,0.94);
    padding: 0.375em;
    margin: 0.125em 0.25em;
}

.minebox {
    position: relative;
    display: inline-block;
}

#mine-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

#mine-tooltip::before, .minebox::before {
    content: "";
    position: absolute;
    top: 0.125em;
    right: -0.12em;
    bottom: 0.125em;
    left: -0.125em;
    border: 0.2em solid #100010;
    border-style: none solid;
    border-color: rgba(16,0,16,0.94);
}

#mine-tooltip::after, .minebox::after {
    content: "";
    position: absolute;
    top: 0.125em;
    right: 0em;
    bottom: 0.125em;
    left: 0em;
    border: 0.125em solid #2D0A63;
    border-image: -webkit-linear-gradient(rgba(80,0,255,0.31),rgba(40,0,127,0.31)) 1;
    border-image: linear-gradient(rgba(80,0,255,0.31),rgba(40,0,127,0.31)) 1;
    pointer-events: none;
}

#mine-tooltip > .description {
    display: block;
    margin-top: 0.25em;
    color: #a8a8a8;
    text-shadow: 0.12em 0.1em 0 #292929;
}

and css

glass hearth
#

I installed MediaWiki locally to check again, but the plain template still breaks the HTML of the arguments.
Therefore, it seems that the only way is to receive the argument in lua module and have it output html like <spam data-mine-tooltip data-tooltip-text=“<font color=‘red’>RED</font>">Target Text</span>.

wind harbor
#

Btw you can escape = with {{=}}. Not sure if it's the root cause, though

trim arrow
#

how would I do that?

#

similar to how collapsible text works, but the expand button is an image