Skip to content

Chevron up before & after

Solved Configure
11 3 1.6k 1
  • Hi,
    How to colored red one of when user up or down rapped?

    8c5d9503-978a-4b63-b946-2a7be433ef09-image.png

    @cagatay this will be a simple state change based on CSS. Do you want a different colour for downvote and upvote ?

  • @cagatay this will be a simple state change based on CSS. Do you want a different colour for downvote and upvote ?

    @phenomlab i want that for example the heart will red color mean all inside when uptoved.

  • @phenomlab i want that for example the heart will red color mean all inside when uptoved.

    @cagatay you want the heart to become red filled when someone upvotes ? CSS on its own won’t be enough for this. It’ll require a js based trigger to accomplish this.

  • @cagatay you want the heart to become red filled when someone upvotes ? CSS on its own won’t be enough for this. It’ll require a js based trigger to accomplish this.

    @phenomlab said in Chevron up before & after:

    @cagatay you want the heart to become red filled when someone upvotes ? CSS on its own won’t be enough for this. It’ll require a js based trigger to accomplish this.

    maybe something like this might work?

    This is what we use for “thumbs up” and “thumbs down” icons…

    span.votes {
        .fa-chevron-up:before {
            content: "\f164";
            font-weight: 400;
            padding-right: 5px;
            margin-left: 20px;
    
        }
        .upvoted .fa-chevron-up:before {
            content: "\f164";
            font-weight: 900;
            padding-right: 5px;
            margin-left: 20px;
        }
        
        .fa-chevron-down:before {
            content: "\f165";
            font-weight: 400;
            padding-left: 5px;
        }
        .downvoted .fa-chevron-down:before {
            content: "\f165";
            font-weight: 900;
            padding-left: 5px;
        }
    }
    
  • @phenomlab i want that for example the heart will red color mean all inside when uptoved.

    @cagatay actually, I just realised you’re using the heart icon for upvote - apologies - I thought that this was the reactions plugin.

    In this case, CSS would in fact work.

  • @phenomlab said in Chevron up before & after:

    @cagatay you want the heart to become red filled when someone upvotes ? CSS on its own won’t be enough for this. It’ll require a js based trigger to accomplish this.

    maybe something like this might work?

    This is what we use for “thumbs up” and “thumbs down” icons…

    span.votes {
        .fa-chevron-up:before {
            content: "\f164";
            font-weight: 400;
            padding-right: 5px;
            margin-left: 20px;
    
        }
        .upvoted .fa-chevron-up:before {
            content: "\f164";
            font-weight: 900;
            padding-right: 5px;
            margin-left: 20px;
        }
        
        .fa-chevron-down:before {
            content: "\f165";
            font-weight: 400;
            padding-left: 5px;
        }
        .downvoted .fa-chevron-down:before {
            content: "\f165";
            font-weight: 900;
            padding-left: 5px;
        }
    }
    

    @crazycells i use them (I want the heart and hand sign to have a red color inside after they are empty, with a hollow red edge before being pressed, and a full red when pressed)

    [Mod change - please post in English - translated]

    span.tag:before {
        content: "\f02c";
        font-family: "Font Awesome 5 Free";
        margin-right: 3px;
        margin-left: 2px;
        font-weight: 600;
    	font-size: 9px;
    	vertical-align: 0;
    }
    .fa-chevron-up:before {
        font-family: 'Font Awesome 5 Free';
    	font-weight: 300;
    	font-size: 16px;
    	content: '\f004';
    	margin-right: 4px;
    	vertical-align: -1px;
    	color: red;
    }
    
    .topic [component="post/upvote"].upvoted i::before {
        content: "\f004";
        color: red;
    }
    
    .fa-chevron-down:before  {
        font-family: 'Font Awesome 5 Free';
    	font-weight: 300;
    	font-size: 16px;
    	content: '\f165';
    	margin-right: 4px;
    	vertical-align: -1px;
    	color: red;
    }
    
  • @crazycells i use them (I want the heart and hand sign to have a red color inside after they are empty, with a hollow red edge before being pressed, and a full red when pressed)

    [Mod change - please post in English - translated]

    span.tag:before {
        content: "\f02c";
        font-family: "Font Awesome 5 Free";
        margin-right: 3px;
        margin-left: 2px;
        font-weight: 600;
    	font-size: 9px;
    	vertical-align: 0;
    }
    .fa-chevron-up:before {
        font-family: 'Font Awesome 5 Free';
    	font-weight: 300;
    	font-size: 16px;
    	content: '\f004';
    	margin-right: 4px;
    	vertical-align: -1px;
    	color: red;
    }
    
    .topic [component="post/upvote"].upvoted i::before {
        content: "\f004";
        color: red;
    }
    
    .fa-chevron-down:before  {
        font-family: 'Font Awesome 5 Free';
    	font-weight: 300;
    	font-size: 16px;
    	content: '\f165';
    	margin-right: 4px;
    	vertical-align: -1px;
    	color: red;
    }
    

    @cagatay please try this:

    span.votes {
        .fa-chevron-up:before {
            content: "\f004";
            font-weight: 400;
        }
        .upvoted .fa-chevron-up:before {
            content: "\f004";
            font-weight: 900;
            color: red; 
        }
     }
    
  • @cagatay please try this:

    span.votes {
        .fa-chevron-up:before {
            content: "\f004";
            font-weight: 400;
        }
        .upvoted .fa-chevron-up:before {
            content: "\f004";
            font-weight: 900;
            color: red; 
        }
     }
    

    @crazycells up is working but i used same code changed as down type but the image is hidden while voted.

    span.votes {
        .fa-chevron-down:before {
            content: "\f165";
            font-weight: 400;
        }
        .upvoted .fa-chevron-down:before {
            content: "\f165";
            font-weight: 900;
            color: red; 
        }
     }
    
  • @crazycells up is working but i used same code changed as down type but the image is hidden while voted.

    span.votes {
        .fa-chevron-down:before {
            content: "\f165";
            font-weight: 400;
        }
        .upvoted .fa-chevron-down:before {
            content: "\f165";
            font-weight: 900;
            color: red; 
        }
     }
    

    @cagatay I believe the bottom .upvoted should be .downvoted

  • @cagatay I believe the bottom .upvoted should be .downvoted

    @crazycells you are right 🙂 thank you.

  • cagatayundefined cagatay has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Page control arrows for PWA

    Solved Customisation nodebb
    27
    25 Votes
    27 Posts
    8k Views
    @crazycells it is, yes - I think I’ll leave it as there is no specific PWA CSS classes I know of. Well, you could use something like the below, but this means multiple CSS files for different operating systems. /** * Determine the mobile operating system. * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'. * * @returns {String} */ function getMobileOperatingSystem() { var userAgent = navigator.userAgent || navigator.vendor || window.opera; // Windows Phone must come first because its UA also contains "Android" if (/windows phone/i.test(userAgent)) { return "Windows Phone"; } if (/android/i.test(userAgent)) { return "Android"; } if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return "iOS"; } return "unknown"; // return “Android” - one should either handle the unknown or fallback to a specific platform, let’s say Android } Once you’re in that rabbit hole, it’s impossible to get out of it.
  • Upgrade issues

    Solved Configure nodebb
    2
    1
    2 Votes
    2 Posts
    786 Views
    Use this code git fetch # Grab the latest code from the NodeBB repository git checkout v3.x git reset --hard origin/v3.x And you will have the latest version without specifying it https://docs.nodebb.org/configuring/upgrade/
  • Email validation NodeBB

    Bugs nodebb
    21
    3 Votes
    21 Posts
    5k Views
    @Panda said in Email validation NodeBB: Did you configure that as a custom change to the usual quote icon. How do you do that? I notice on NodeBB site its a solid blue quotes Yes, I changed it. NodeBB by default users the free font awesome library whereas I use the pro (paid) version SDK have access to a wider set of icons, and at different thicknesses etc. The change of colour is just simple CSS.
  • NodeBB v3 Chat Very Slow

    Moved Performance nodebb v3 nodebb chat
    47
    11 Votes
    47 Posts
    11k Views
    @DownPW Seems fine.
  • NodeBB: Privileges for the Announcement channel

    Solved Configure nodebb
    6
    1
    1 Votes
    6 Posts
    1k Views
    Up to you really
  • 1 Votes
    5 Posts
    1k Views
    @DownPW very useful tip. Thanks
  • [NodeBB] Import custom Font

    Solved Customisation custom fonts nodebb css
    12
    3 Votes
    12 Posts
    3k Views
    @cagatay you’ll need to define this in the body tag (or another element if you want greater or more granular targets) - for example body { font-family: "Poppins"; font-size: 16px; } Essentially, you use the font-size CSS directive.
  • Nvidia shield & router

    Solved Configure router nvidia shield
    7
    1 Votes
    7 Posts
    1k Views
    @jac yes, the network cable