Skip to content

How to style tool tip of nodebb-plugin-user-level

Solved Customisation
  • Hi,

    I would like to ask how to style the tool tip in nodebb-plugin-user-level, that appears when you click on the user level icon. I just want to change some text styling. I’m trying to target it with the dev tools but can’t see any changes to the DOM.

    Btw it seems that on your site you removed the level in form of text, it looks nice and minimalistic but the tool tip information doesn’t make much sense to me.

    edit: I think I got it, after the stars there come different medals right? I like the star system 🙂

    Screenshot 2023-10-09 211928.png

  • @dave1904 said in How to style tool tip of nodebb-plugin-user-level:

    I’m trying to target it with the dev tools but can’t see any changes to the DOM.

    That’s a common issue in the sense that it will disappear from the DOM on lost focus, and this post will certainly help with that

    https://sudonix.org/topic/483/targeting-a-disappearing-element-for-its-css

    @dave1904 said in How to style tool tip of nodebb-plugin-user-level:

    edit: I think I got it, after the stars there come different medals right? I like the star system

    Exactly that. Thanks.

  • See here for icon :

    https://sudonix.org/post/6686

    Here my CSS for user level :

    /*----------------------------------------------------------------------------*/
    /*--------------           nodebb-plugin-user-level          -----------------*/
    /*----------------------------------------------------------------------------*/
    
    /* style */
    .user-level-topic {
      vertical-align: middle;
      border-radius: 0.25rem !important;
      border: 2px solid var(--bs-user-level-border);
      margin-left: 8px;
      margin-right: 5px;
      margin-top: -2px;
      color: var(--bs-body-color-primary) !important;
      background: var(--bs-user-level-bg) !important;
      float: right;
      font-size: 12px;
      padding: 0px 10px !important;
      font-weight: 600;
      height: 23px !important;
    }
    
    /* Style on Profile page */
    .level-index>div:first-child {
        padding: 6px 15px 3px 15px;
        border: 2px solid var(--bs-user-level-border);
        border-radius: var(--bs-border-radius);
        margin: 5px 28px 5px 0px;
        color: var(--bs-link-color);
      
    }
    
    .level-index > div:first-child:before {
        font-family: var(--bs-shoutbox-header-font-family) !important;
        content: var(--bs-shoutbox-header-icon) !important;
        margin-right: 8px;
    }
    
    /* icon, font */
    .user-level-topic:before {
      /* content: "\f521";   */
      /* font-family: "Font Awesome 6 pro "; */
      content: var(--bs-user-level-icon);
      font-family: "Font Awesome 6 Pro"; 
      margin-right: 5px;
      font-weight: 600;
    }
    
    /* Popover Style */
    .popover-body {
        background: var(--bs-body-bg) !important;
        color: var(--bs-body-color) !important;
        border: 1px solid var(--bs-border-color);
        border-radius: 0 0 0.375rem 0.375rem;
        margin: 0px;
    }
    .popover-header {
        border-top: 1px solid var(--bs-border-color);
        border-left: 1px solid var(--bs-border-color);
        border-right: 1px solid var(--bs-border-color);
        background-color: var(--bs-alert-info-bg);
        color: var(--bs-link-color);
        border-top-left-radius: 0.375rem;
        border-top-right-radius: 0.375rem;
        margin: 0px;
    }
    .bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after, .bs-popover-top>.popover-arrow::after,{
        border-top-color: var(--bs-border-color);
    }
    .bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after, .bs-popover-bottom>.popover-arrow::after,{
        border-bottom-color: var(--bs-border-color);
    }
    .bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after, .bs-popover-end>.popover-arrow::after {
        border-left-color: var(--bs-border-color);
    }
    .bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after, .bs-popover-end>.popover-arrow::after {
        border-right-color: var(--bs-border-color);
    }
    

    and hack for user level on Account profile :

    10b383aa-8e0b-4b45-87c8-d206053a9b7f-image.png

  • @DownPW thanks. I forgot about that.

  • dave1904undefined dave1904 has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • 3 Votes
    4 Posts
    182 Views

    @crazycells said in CSS code customization for the link preview plugin:

    does OGProxy show the pdf previews as well?

    Not yet, but it could with a bit of additional code.

  • 50 Votes
    107 Posts
    3k Views

    @crazycells

    image.png

    image.png

  • hover link effect

    Solved Customisation
    18
    6 Votes
    18 Posts
    614 Views

    @DownPW Looking at the underlying code, class start is being added on hover by jQuery in this function

    document.querySelectorAll(".button-gradient, .button-transparent").forEach((button) => { const style = getComputedStyle(button); const lines = document.createElement("div"); lines.classList.add("lines"); const groupTop = document.createElement("div"); const groupBottom = document.createElement("div"); const svg = createSVG( button.offsetWidth, button.offsetHeight, parseInt(style.borderRadius, 10) ); groupTop.appendChild(svg); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); lines.appendChild(groupTop); lines.appendChild(groupBottom); button.appendChild(lines); button.addEventListener("pointerenter", () => { button.classList.add("start"); }); svg.addEventListener("animationend", () => { button.classList.remove("start"); }); }); })

    The CSS for start is below

    .button-gradient.start .lines svg, .button-transparent.start .lines svg { animation: stroke 0.3s linear; }

    And this is the corresponding keyframe

    @keyframes stroke { 30%, 55% { opacity: 1; } 100% { stroke-dashoffset: 5; opacity: 0; } }

    It’s using both CSS and SVG, so might not be a simple affair to replicate without the SVG files.

  • 2 Votes
    1 Posts
    170 Views
    No one has replied
  • Tenor GIF Plugin

    Solved Customisation
    19
    5 Votes
    19 Posts
    770 Views

    @phenomlab Also for me now 🙂 Upgraded in ACP and all good . Thx.

  • Quote design CSS

    Solved Customisation
    15
    4 Votes
    15 Posts
    693 Views

    @DownPW yes, that does make sense actually. I forgot to mention the layout of Sudonix is custom so that would have an impact on the positioning.

    Good spot 🙂

  • Reading Meter Progress bar

    Locked Solved Customisation
    15
    9 Votes
    15 Posts
    823 Views

    For anyone else following this thread, please see
    https://sudonix.com/topic/467/issues-with-progress-bar-on-v3

  • Bug Navbar CSS

    Solved Customisation
    3
    1 Votes
    3 Posts
    302 Views

    Not better way.

    Thanks.