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
  • 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.
  • Custom html in nodebb to prevent cache

    Unsolved Configure nodebb
    18
    2 Votes
    18 Posts
    3k Views
    @Panda You’ll need to do that with js. With some quick CSS changes, it looks like this [image: 1690796279348-d619844f-fbfe-4cf1-a283-6b7364f6bf18-image.png] The colour choice is still really hard on the eye, but at least you can now read the text
  • restarting nodebb on boot

    Unsolved Configure nodebb
    3
    1 Votes
    3 Posts
    1k Views
    @eeeee said in restarting nodebb on boot: can I just run nodebb under nodemon for auto restarts? It’s a better method. Nodemon just looks for file system changes and would effectively die if the server was rebooted meaning you’d have to start it again anyway. Systemd is the defacto standard which is how the operating system interacts in terms of services, scheduled tasks etc.
  • How to fix size of photos & videos NodeBB

    Solved Customisation nodebb nodebb size
    7
    3 Votes
    7 Posts
    1k Views
    @crazycells pleasure. Using percentages makes much more sense in this case. It’s the same argument with px vs pt vs em with fonts, margins, padding, etc., in the sense that em is generally preferred over px and pt https://stackoverflow.com/questions/609517/why-em-instead-of-px
  • Rotating homepage icons, gifs?

    Solved Configure nodebb
    2
    3 Votes
    2 Posts
    714 Views
    @eveh It’s not a GIF, no. It’s actually a webp file so made much smaller, and uses keyframes to control the rotation on hover. You can easily make your own though The CSS for that is as below @keyframes rotate180 { from { transform: rotate(0deg); } to { transform: rotate(180deg); } } @keyframes rotate0 { from { transform: rotate(180deg); } to { transform: rotate(0deg); } } Your milage may vary on the CSS below, as it’s custom for Sudonix, but this is the class that is used to control the rotate .header .forum-logo, img.forum-logo.head { max-height: 50px; width: auto; height: 30px; margin-top: 9px; max-width: 150px; min-width: 32px; display: inline-block; animation-name: rotate180, rotate0; animation-duration: 1000ms; animation-delay: 0s, 1000ms; animation-iteration-count: 1; animation-timing-function: linear; transition: transform 1000ms ease-in-out; }
  • IRC Server/Client - Chat App with NodeBB

    Linux nodebb irc server client
    6
    1 Votes
    6 Posts
    2k Views
    @Hari not sure from the consumer perspective, but Skype has been all but completely consumed by Microsoft Teams when it comes to business usage.
  • Nvidia shield & router

    Solved Configure router nvidia shield
    7
    1 Votes
    7 Posts
    1k Views
    @jac yes, the network cable
  • nodebb-plugin-customize error

    Solved Customisation
    25
    2 Votes
    25 Posts
    8k Views
    @phenomlab it work, thanks