Template talk:UnitIcon

From Wargroove Wiki
Jump to navigation Jump to search
This talk page is for discussing Template:UnitIcon.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text under old text.
  • Be polite
  • Assume good faith
  • Don't delete discussions

Upgrading the UnitIcon display[edit]

Hey there

As part of my changes to improve the wiki structure, I intend to re-design this template with the following features:

1) Tiered coloured

Currently it only allows Red and Blue for Effective/Vulnerable, and Green as default. I intend to expand this to include all of the in-game 'tiers' for effective/vulnerable displays: Vulnerable: Red, Orange, Yellow Effective: Green, Aqua, Blue

2) Rounded borders

In-game these symbols have rounded borders. More precisely, I intend to put "border-radius" properties onto the Unit Icons to give them rounded edges.

3) Gradient borders

In-game the borders have a colourful gradiant, giving them a golden-like sheen. This is very easy to implement in HTML with the use of gradients.

How do you plan to do this?[edit]

This will make a few major changes to the template design:

#1 Remove CSS classes

Currently the template is built to add a CSS ID (could be a class, but functionally the same) to the element it outputs. This is problematic, as it requires a lot of CSS Classes (or IDs) to be made and this can't be easily edited without access to the protected CSS files, which might not need this anyway. Instead, I intend to make them in-line styled using the Style="" attribute, implementing background-colour, border-radius, and linear-gradient.

#2 Expand accepted parameter inputs

Currently Parameter 2 can accept eff or vul. This will be modified to allow eff1, eff2, eff3, vul1, vul2, and vul3. The old eff and vul inputs will be retained for backwards-compatibility, of course.


As an aside, I will also re-structure the template to make it more neatly formatted, and include comments for readability :)

Any opinions regarding these changes? I want to make sure this is not going to cause a major disruption, and that anyone making edits is okay with these changes.

You can view a current test copy of the update on Template:TestUnitIcon. When finished, that version will be copied over to Template:UnitIcon.

Emo Tarquin (talk) 17:52, 26 May 2020 (UTC)