Skip to content

"Glass" (shine) effect on Sudonix logo

Let's Build It
7 4 5.1k 1
  • wrote on last edited by phenomlab
    #1

    A few users have commented on the new shiny logo that appears at the top of the navbar here

    Want to know how I created that? Of course you do!

    The logo itself makes use of a few techniques such as webkit-background-clip and -webkit-text-stroke to make the font look like it has an outline only with no fill. This technique won’t appeal to everyone, so if you’re just looking for the shine code, you can skip this, and go straight to the jQuery code and CSS.

    Firstly, I actually hide the <img> so no actual logo is being displayed

    [component="brand/logo"] {
        display: none;
    }
    

    I then use a jQuery function to create my own Brand Logo

    $(document).ready(function() {
        $('[component="brand/wrapper"]').append('<a component="siteTitle" href="/" title="Brand Logo"><h1 class="fs-6 fw-bold text-body mb-0 shine">sudonix</h1></a>');
    });
    

    And then apply the below CSS to achieve the style I want. Note, that the :root values must be set on your site, or at the very least, alternatives if you are not using variables.

    :root {
          --bs-body-navbar: #E5E6E6;
          --bs-logo-bg: linear-gradient(45deg, #ff5733, #f73d45, #e54f6d, #c85e9e, #a874c0, #748bda, #4691f1, #0099f7);
          --bs-node-shine: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
    }
    
    @keyframes shine {
        0% {
          left: -100%;
          opacity: 0;
        }
        5% {
          opacity: 1;
        }
        25% {
          left: 100%;
          opacity: 1;
        }
        26% {
          opacity: 0;
        }
        100% {
          left: 100%;
          opacity: 0;
        }
      }
    
    a[component=siteTitle] h1 {
        font-size: 2.2rem !important;
        top: -1px;
        position: fixed;
        font-family: "Bruno Ace SC";
        font-weight: 600 !important;
        letter-spacing: 0.05rem;
        -webkit-background-clip: text !important;
        color: var(--bs-body-navbar) !important;
        -webkit-text-stroke: 4px transparent;
        background: var(--bs-logo-bg);
        width: 172px;
        padding-left: 5px;
    }
    
    .shine::before {
        content: "";
        position: absolute;
        top: 10px;
        width: 60px;
        height: 25px;
        background: var(--bs-node-shine);
        transform: skewX(-45deg);
        animation: shine 10s linear infinite;
        pointer-events: none;
        mix-blend-mode: screen;
        z-index: 1;
    }
      
      .shine {
        position: relative;
        display: inline-block;
        color: transparent;
        background-clip: text;
        -webkit-background-clip: text;
        overflow: hidden;
      }
    

    I’ve also included a CodePen so you can see this working in realtime

    https://codepen.io/phenomlab/pen/gbbYWrZ?editors=1100

  • phenomlab phenomlab referenced this topic on
  • wrote on last edited by
    #2

    Looking great Mark!

  • wrote on last edited by
    #3

    Many thnaks.

    I’ll have to take a look because for now, the result is meh 🙂
    2 tittles

    image.png

  • Many thnaks.

    I’ll have to take a look because for now, the result is meh 🙂
    2 tittles

    image.png

    wrote on last edited by
    #4

    @DownPW Is this on your DEV server?

  • wrote on last edited by
    #5

    @phenomlab i cant do it why i dont understand. 😞 something added wrong think so.

  • @DownPW Is this on your DEV server?

    wrote on last edited by DownPW
    #6

    @phenomlab said in "Glass" (shine) effect on Sudonix logo:

    @DownPW Is this on your DEV server?

    Nope. Prod Server

    Seems to be better after some CSS modification : police position, etc…
    Or display: none on CSS title class if needed

    Perfect with White background theme but much less with black themes backgrounds (we see the edges of the shine effect)

    white.gif black.gif

  • @phenomlab said in "Glass" (shine) effect on Sudonix logo:

    @DownPW Is this on your DEV server?

    Nope. Prod Server

    Seems to be better after some CSS modification : police position, etc…
    Or display: none on CSS title class if needed

    Perfect with White background theme but much less with black themes backgrounds (we see the edges of the shine effect)

    white.gif black.gif

    wrote on last edited by
    #7

    @DownPW said in "Glass" (shine) effect on Sudonix logo:

    Perfect with White background theme but much less with black themes backgrounds (we see the edges of the shine effect)

    Yes, you will need to modify the CSS according. For example, on Sudonix, I use

        --bs-node-shine: linear-gradient(90deg, rgba(28, 38, 44, 0) 0%, rgba(74, 100, 116, 0.5) 50%, rgba(28, 38, 44, 0) 100%);
    

    Essentially, you choose the base background, the shine colour, and then the base background again.


Related Topics
  • 3 Votes
    2 Posts
    2k Views
    DownPW
    Very great
  • Switch between list and card view function

    Moved Let's Build It cards layout css
    107
    1
    50 Votes
    107 Posts
    59k Views
    phenomlab
    @crazycells [image: image.png] [image: image.png]
  • What's your go to product for site stats?

    Let's Build It umami stats
    27
    2
    15 Votes
    27 Posts
    10k Views
    phenomlab
    For anyone else coming here and is struggling to get pm2 to work with Umami (as I did - it started, but never seemed to work after a reboot which is pretty useless), you can use the below. Obviously, change the parts noted inside the [brackets]. Follow the below instructions: Instructions Open a terminal and create a new systemd service file: sudo nano /etc/systemd/system/umami.service Add the following content to the file: [Unit] Description=Umami Analytics Server After=network.target [Service] Type=simple User=[umami user] WorkingDirectory=[path to umami] ExecStart=/usr/local/bin/node [path to umami]/node_modules/.bin/next start Restart=on-failure [Install] WantedBy=multi-user.target Replace [umami user] with the username of the user that should run the Umami service, and [path to umami] with the actual path to your Umami installation. Save the file and exit the editor. Reload the systemd manager configuration: sudo systemctl daemon-reload Enable the Umami service to start on boot: sudo systemctl enable umami.service Start the Umami service: sudo systemctl start umami.service You can check the status of the service with: sudo systemctl status umami.service This systemd service file will ensure that Umami starts automatically when the system boots, and it will restart the service if it fails. Remember to adjust the WorkingDirectory and ExecStart paths according to where Umami is installed on your system, and ensure that Node.js is installed and accessible at /usr/bin/node (or adjust the path to Node.js as necessary).
  • Setup OGProxy for use in NodeBB

    Moved Let's Build It ogproxy opengraph npm node
    110
    2
    21 Votes
    110 Posts
    57k Views
    phenomlab
    @crazycells said in Setup OGProxy for use in NodeBB: are they cached for each user separately? No. It’s a shared cache @crazycells said in Setup OGProxy for use in NodeBB: additionally, this is also handling youtube videos etc, right? No. This is handled by nodebb-plugin-ns-embed
  • Rebranding / other changes

    Announcements branding domain
    42
    33 Votes
    42 Posts
    19k Views
    phenomlab
    @crazycells said in Rebranding / other changes: thanks for the info you gave, I need to transfer this info to our dev team No problems - let me know if you need any other info.
  • Create a dynamic category list

    Moved Let's Build It dynamic categories api
    16
    3
    14 Votes
    16 Posts
    7k Views
    phenomlab
    Hmm - seems I never committed this code. I’ll do that now… EDIT - here it is https://github.com/phenomlab/category-list/tree/main
  • Corporate Bullshit Generator

    Moved Let's Build It cbg coding
    17
    9 Votes
    17 Posts
    7k Views
    Madchatthew
    @phenomlab said in Corporate Bullshit Generator: Yes, absolutely. Either those buzzwords get cheesier or I’m just getting older and less tolerant. I think it is both LOL
  • Sudonix Branding

    Announcements branding
    2
    2
    5 Votes
    2 Posts
    2k Views
    DownPW
    Thank you mark @phenomlab for sharing And good job for the new logo