Is there a way to make the different sized tags a different random colour as the image below? I tried css by changing 'one_tag' but this changes all the colour and I want random colours.
Is there a way to make the different sized tags a different random colour as the image below? I tried css by changing 'one_tag' but this changes all the colour and I want random colours. |
good idea |
Can the colors be random that change on every page load? ... because that's really easy to do. Otherwise, you need a much more complex function that applies a color based on tag size My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
I was thinking different colours per tag size. |
I still really want different coloured tags, come on Modzzz make us a new mod to play with :) |
I still really want different coloured tags, come on Modzzz make us a new mod to play with :) Add this JS code in footer, you will see a different color for each tag. <script> $$('.one_tag').length && [].forEach.call($$('.one_tag > a'), function(e){ e.style.color = '#' + Math.random().toString().slice(-6); }) </script> Looking for Help? http://www.boonex.com/kevinmitnick |
I tried this but it didn't seem to work for me |
If you want a specific color for each tag size then do this. color: #000000; } .tag_color20 { color: #0066FF; } .tag_color30 { color: #CCCC00; }
https://www.deanbassett.com |
Excellent and simple solution Deano.
Another way to do the same thing, would be to move a copy of view_tags.html from /templates/base to whatever template you are using, and apply your changes in that file.... maybe directly to the <a> tag.
<span class="one_tag" style="font-size:__tagSize__px;"><a class="tag_color__tagSize__" href="__tagHref__" title="__countCapt__: __countNum__">__tag__</a></span>
Then add the css to common.css
EX: .one_tag a.tag_color30 { My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
awesome thankyou guys i'll get fixin stuff now |