• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Change chevron-up icon to thumbs-up icon in votes

Scheduled Pinned Locked Moved General Discussion
11 Posts 5 Posters 293 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • vijay kumavatV Offline
    vijay kumavatV Offline
    vijay kumavat
    wrote on last edited by vijay kumavat
    #1

    Hi

    How can i able to change this chevron-up/chevron-down icons to thumbs-up/thumbs-down icons in votes.

    I am using Harmony theme.

    1 Reply Last reply
    0
  • dave1904D Offline
    dave1904D Offline
    dave1904
    wrote on last edited by
    #2
    <a component="post/upvote" href="#" class="btn-ghost-sm {{{ if posts.upvoted }}}upvoted{{{ end }}}">
       <i class="fa fa-fw fa-thumbs-up text-primary"></i>
    </a>
    

    That's how I've done it. The code is in /node_modules/nodebb-theme-harmony/templates/partials/topic/post.tpl

    1 Reply Last reply
    1
  • vijay kumavatV Offline
    vijay kumavatV Offline
    vijay kumavat
    wrote on last edited by
    #3

    Thank you @dave1904

    phenomlabP 1 Reply Last reply
    0
  • phenomlabP Offline
    phenomlabP Offline
    phenomlab
    replied to vijay kumavat on last edited by
    #4

    @vijay-kumavat @dave1904 you are better off targeting the icon itself and using CSS to override it. This way, your changes won't be overwritten on the next upgrade.

    vijay kumavatV dave1904D 2 Replies Last reply
    1
  • vijay kumavatV Offline
    vijay kumavatV Offline
    vijay kumavat
    replied to phenomlab on last edited by
    #5

    @phenomlab

    I did this too, its not refelected.
    https://community.nodebb.org/topic/15746/how-to-change-the-icons/3

    phenomlabP 1 Reply Last reply
    0
  • phenomlabP Offline
    phenomlabP Offline
    phenomlab
    replied to vijay kumavat on last edited by
    #6

    @vijay-kumavat Can you show me the code you used ?

    1 Reply Last reply
    0
  • vijay kumavatV Offline
    vijay kumavatV Offline
    vijay kumavat
    wrote on last edited by
    #7
    // Change the icon for votes
    span.votes {
        // not voted is outline heart
        .fa-chevron-up:before {
            content: "\f08a";        
        }
        // upvoted is solid heart
        .upvoted .fa-chevron-up:before {
            content: "\f004";
        }
    }
    
    phenomlabP 1 Reply Last reply
    0
  • phenomlabP Offline
    phenomlabP Offline
    phenomlab
    replied to vijay kumavat on last edited by
    #8

    @vijay-kumavat You might need !important for it to take effect.

    omegaO 1 Reply Last reply
    1
  • dave1904D Offline
    dave1904D Offline
    dave1904
    replied to phenomlab on last edited by
    #9

    @phenomlab

    Good point, you are right. Will do it the same way because it already got overwritten a few times hehe.

    1 Reply Last reply
    1
  • omegaO Offline
    omegaO Offline
    omega Community Rep
    replied to phenomlab on last edited by omega
    #10

    @phenomlab said in

    You might need !important for it to take effect.

    A good tip and point because I'm finding I have to use that a lot more in the live customisation to force targeted CSS changes to take hold.

    julianJ 1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    replied to omega on last edited by
    #11

    @omega when everything is !important what truly is important?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development