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

  • @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; 
        }
     }
    
  • 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
  • External Links - New Window

    Solved Customisation nodebb links settings
    8
    2 Votes
    8 Posts
    137 Views
    @Sampo2910 search the forum here for ogproxy which is the client side version of that plugin I wrote. It’s in use here on this forum.
  • Planned sunset of NTFY plugin

    Pinned Announcements push nodebb ntfy
    7
    1
    8 Votes
    7 Posts
    1k Views
    I’ve noticed that I’m the only one subscribed to the push notifications on this site. If you were using NTFY previously, and have noticed that you’ve not had any alerts for a while, it’s because this feature has been disabled. You’ll now need to use the push notification to replace NTFY as mentioned in the first post.
  • Bug Report

    Solved Bugs nodebb bugs
    47
    1
    26 Votes
    47 Posts
    9k Views
    @crazycells Good points, thanks. I completely forgot that classes are added - makes life much simpler! EDIT - seems this is pretty straightforward, and only needs the below CSS .upvoted i { color: var(--bs-user-level) !important; } This then yields [image: 1718028529465-3f072f8a-ebfa-4910-8723-73c493b8e4eb-image.png] However, the caveat here is that the .upvoted class will only show for your upvotes, and nobody else’s. However, this does satisfy the original request however I would love to see my upvoted posts more clearly, because currently, when I upvote, nothing on the post tool is changing, it would be nicer if there is an indication that I have upvoted (like a filled or colored triangle?)
  • 14 Votes
    69 Posts
    28k Views
    @phenomlab Seems to be better with some scaling fix for redis on redis.conf. I haven’t seen the message yet since the changes I made # I increase it to the value of /proc/sys/net/core/somaxconn tcp-backlog 4096 # I'm uncommenting because it can slow down Redis. Uncommented by default !!!!!!!!!!!!!!!!!!! #save 900 1 #save 300 10 #save 60 10000 If you have other Redis optimizations. I take all your advice https://severalnines.com/blog/performance-tuning-redis/
  • who is read NodeBB

    Customisation read post nodebb
    6
    0 Votes
    6 Posts
    1k Views
    @cagatay You should ask in the NodeBB forums. Perhaps reference this post https://discuss.flarum.org/d/23066-who-read
  • NodeBB inline videoplayer

    Solved Customisation nodebb
    12
    3 Votes
    12 Posts
    2k Views
    @phenomlab YAY! It works Thanks so much
  • Title on homepage of nodebb forum

    Solved Customisation nodebb
    2
    1 Votes
    2 Posts
    1k Views
    @eveh Welcome board The code you are referring to is custom written as no such functionality exists under NodeBB. However, adding the functionality is relatively trivial. Below are the required steps Navigate to /admin/appearance/customise#custom-header Add the below code to your header, and save once completed <ol id="mainbanner" class="breadcrumb"><li id="addtext">Your Title Goes Here</li></ol> Navigate to /admin/appearance/customise#custom-js and add the below code, then save $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { // Initialise mainbanner ID, but hide it from view $('#mainbanner').hide(); var pathname = window.location.pathname; if (pathname === "/") { $("#addtext").text("Your Title"); $('#mainbanner').show(); } else {} // If we want to add a title to a sub page, uncomment the below and adjust accordingly //if (pathname === "/yourpath") { //$("#addtext").text("Your Title"); //$('#mainbanner').show(); //} }); }); Navigate to /admin/appearance/customise#custom-css and add the below CSS block .breadcrumb { right: 0; margin-right: auto; text-align: center; background: #0086c4; color: #ffffff; width: 100vw; position: relative; margin-left: -50vw; left: 50%; top: 50px; position: fixed; z-index: 1020; } Note, that you will need to adjust your CSS code to suit your own site / requirements.
  • Nvidia shield & router

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