45026831 / hh-plus-plus

12 stars 15 forks source link

[vusual edit] Villian list #30

Closed cossname closed 2 years ago

cossname commented 3 years ago
trollsMenu += '<div><a class="' + type + '" href="/troll-pre-battle.html?id_opponent=' + (i + 1) + '">' + trollName + trollNameTiers+
         ' <a class="worlds" href="/world/' + (i + 2) + '">WL '+(i + 2)+'</a></div>';
         //CSS
    sheet.insertRule('a.worlds {'
        + 'float:right;}');
   sheet.insertRule('a.regular,a.eventTroll {'
        + 'float:left;}');

image

45026831 commented 3 years ago

This snippet looks like an edit to the Tom208 version of the script (https://gist.github.com/Tom-208/a5c7065866fe1de5032aabbbd1ed9eff), and wouldn't work in the way shown in the screenshot in this version due to the display: grid; layout used here.

For this version, consider wrapping both anchors in a div, remove the br, and have the div be display: flex; instead of using float: left/right;

cossname commented 3 years ago

@45026831 yeah, my bad. Posted this code for old version, in process edited local code for new version, but dont updated here. fixed now.

45026831 commented 2 years ago

Done in 1.1.0 (ea0620f), but in a rather different way to how it was originally proposed. Link to the world is the scroll/comic icon in the top right of the villain card.