Skip to content

Bottom footer navbar button extend

Solved Customisation
32 2 15.4k 1
  • @DownPW Right. I’m on it (well, tomorrow now)

    wrote on last edited by
    #5

    @phenomlab hé hé 🙂

  • @phenomlab said in Bottom footer navbar button extend:

    @DownPW said in Bottom footer navbar button extend:

    We could imagine that it is active by default and if the user does not want it, he hides it. It will simply remain the button on the left or right side

    So are you looking for a button on the footer that when clicked will remove from the screen with an animation, but leave just enough so that it can be clicked to make it reappear again with the same animation ?

    Exactly 😉

    wrote on last edited by phenomlab
    #6

    @DownPW said in Bottom footer navbar button extend:

    Exactly

    Something like this ?

  • wrote on last edited by
    #7

    @phenomlab

    clearly that ^^

  • @phenomlab

    clearly that ^^

    wrote on last edited by
    #8

    @DownPW ok, good. Let me write the code to record the session state (in the same way that the theme engine works) and I’ll release the code, plus CSS.

  • wrote on last edited by DownPW
    #9

    hell yeah 😉
    Simple to modify ?

    Example: put the button on the left or right

  • hell yeah 😉
    Simple to modify ?

    Example: put the button on the left or right

    wrote on last edited by
    #10

    @DownPW yes, that will be a simple CSS modification

  • hell yeah 😉
    Simple to modify ?

    Example: put the button on the left or right

    wrote on last edited by
    #11

    @DownPW said in Bottom footer navbar button extend:

    Example: put the button on the left or right

    Looks better on the left I think - more natural

    6ab4dc12-17f0-4c64-b3c3-af2ba7e6cf6d-image.png

  • @DownPW said in Bottom footer navbar button extend:

    Example: put the button on the left or right

    Looks better on the left I think - more natural

    6ab4dc12-17f0-4c64-b3c3-af2ba7e6cf6d-image.png

    wrote on last edited by
    #12
  • wrote on last edited by
    #13

    @DownPW I’ll make some small adjustments to the final code to accommodate this. Just need to write the session cookie data, then I’ll release the code.

  • wrote on last edited by
    #14

    @DownPW Can you let me know if you used the same code for the footer as what is here ? I think this is the case, but want to check. There needs to be some modifications to this code to support the footer toggle.

  • wrote on last edited by
    #15

    Updated position of collapse/expand so it’s on the left for a more natural feel

  • wrote on last edited by
    #16

    Very great 😉

  • @DownPW Can you let me know if you used the same code for the footer as what is here ? I think this is the case, but want to check. There needs to be some modifications to this code to support the footer toggle.

    wrote on last edited by
    #17

    @phenomlab said in Bottom footer navbar button extend:

    Can you let me know if you used the same code for the footer as what is here ?

    yes Mark, with minor adjustement.

  • wrote on last edited by phenomlab
    #18

    Instructions

    1. Go to /admin/extend/widgets and locate the “Global Footer” widget
    2. At the very top of the existing code you have in that widget, add

    <div id="console-nav-tab"><i class="fa-solid fa-angles-left"></i></div>

    1. Add this CSS
    div#console-nav-tab {
    position: fixed;
        bottom: 0px;
        z-index: 900;
        height: 30px;
        left: 0px;
    }
    div#console-nav-tab i {
        font-size: 16px;
        margin-left: 10px;
        line-height: 2.0 !important;
    }
    .toBottom {
       bottom: 0px !important;
    }
    

    Note, that you probably need to modify the existing CSS ID floatleft to accommodate the additional DIV and icon. For example

    #floatleft {
        float: left;
        padding-left: 30px; /*additional left padding to support additional DIV and icon */
        font-size: 80%;
        line-height: 2.0;
        font-weight: 600;
        display: flex;
    }
    
    1. Go to /admin/appearance/customise#custom-js and add this block of code (bottom is fine, or wherever you want to place it)
    $(document).ready(function() {
        $(window).on('action:ajaxify.end', function(data) {
            var getState = localStorage.getItem("footer");
            if (getState === "hidden") {
                $("#console-nav-footer").hide();
                $("#console-nav-tab i").addClass("fa-solid fa-angles-right");
                $('.pagination-block').addClass("toBottom");
            } else {
                $("#console-nav-tab i").addClass("fa-solid fa-angles-left");
                $('.pagination-block').removeClass("toBottom");
            }
            $("#console-nav-tab").click(function() {
                $("#console-nav-footer").toggle(250, function() {
                    if ($("#console-nav-footer").is(":hidden")) {
                        localStorage.setItem("footer", "hidden");
                        $("#console-nav-tab i").addClass("fa-solid fa-angles-right");
                        $('.pagination-block').addClass("toBottom");
                    } else {
                        localStorage.setItem("footer", "shown");
                        $("#console-nav-tab i").addClass("fa-solid fa-angles-left");
                        $('.pagination-block').removeClass("toBottom");
                    }
                });
                $("i", this).toggleClass("fa-solid fa-angles-left fa-solid fa-angles-right");
            });
        });
    });
    
    1. Test, and make necessary modifications to suit your own environment
  • wrote on last edited by
    #19

    why deleted ?

  • why deleted ?

    wrote on last edited by
    #20

    @DownPW Because it’s not finished. I forgot the session state…

  • wrote on last edited by DownPW
    #21

    ha oki lol 😉

    another request but if it’s not possible, it does not matter 🙂

    Can we imagine when the footerbar is reduced, we descend the pagination block automatically ?

    ee0d46da-1589-4b66-8dd5-68fe63f80b82-image.png

    it would be cleaner. what do you think ?

  • ha oki lol 😉

    another request but if it’s not possible, it does not matter 🙂

    Can we imagine when the footerbar is reduced, we descend the pagination block automatically ?

    ee0d46da-1589-4b66-8dd5-68fe63f80b82-image.png

    it would be cleaner. what do you think ?

    wrote on last edited by phenomlab
    #22

    @DownPW that should be possible, yes. Leave it with me

  • wrote on last edited by phenomlab
    #23

    @DownPW instructions restored

    Fixed:

    • Footer does not collapse correctly on reload
    • Record session state in session, and not cookies (mostly because cookies can be disabled)
    • Pagination bar drops to fill missing footer on collapse
    • Correct icon direction displayed when expanding and collapsing

    Let me know how you get on.

    Note that there may be some cosmetic issues on mobile devices, which I will work through if necessary. In some cases it’s actually better to hide the footer altogether on mobile because of the screen estate.

    Here’s what it looks like

  • phenomlab phenomlab has marked this topic as solved on
  • wrote on last edited by
    #24

    @phenomlab

    Very good job Mark 😉

    –> I may have done something wrong but everything is ok except the pagination block which does not go down automatically.

    An idea ?


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
  • The theme came with space on left side

    Solved WordPress css
    7
    3 Votes
    7 Posts
    2k Views
    Sala
    @phenomlab yes it’s a different theme. The other one was not offering much on editable sidebar. It was like flarum hahah
  • Changing H2 color

    Solved WordPress customisation
    5
    3 Votes
    5 Posts
    2k Views
    phenomlab
    @Sala Just checked your site. This should work .bs-blog-post .title, .bs-blog-post .title a { color: #ffffff; } It’s worth noting the existing CSS, which uses variables like the below color: var(--head-color); These come under the :root section as below :root { --head-color: #212121; --stext-color: #000; --text-color: #718096; --wtext-color: #fff; --bg-color: #fff; --box-color: #fff; --border-color: #e2e8f0; --wrap-color: #eff2f7; } You can easily override these by using the CSS I provided at the top of this post, or you can change the underlying colours defined in the variables. However, taking this route may mean other objects are styled in the same way, which may not be the desired result.
  • The best css to customize our logo?

    Solved Customisation css
    2
    1 Votes
    2 Posts
    3k Views
    phenomlab
    @Sala This should look better .sidenav .navbar-brand { padding-top: 0.5rem; padding-bottom: 0.5rem; } [image: e5cec20e-be36-4ee8-9129-fd11ad4656ac-image.png] You can increase the top and bottom padding by increasing the values above.
  • Changing the look of recent cards

    Announcements cards css
    1
    1
    2 Votes
    1 Posts
    893 Views
    No one has replied
  • what does sound/mute button do?

    Solved Customisation nodebb
    20
    1
    9 Votes
    20 Posts
    6k Views
    phenomlab
    @crazycells Yeah, looking at the plugin itself, that’s a hard coded limit [image: 3d6dbc10-185b-4102-9470-0c2731a10750-image.png] I’ll probably remove that… eventually…
  • [NODEBB] Scroll Button

    Solved Customisation css javascript html scroll button
    7
    1
    0 Votes
    7 Posts
    3k Views
    phenomlab
    @downpw ooops. Forgot that. Thanks for adding.
  • NodeBB Footer

    Solved Customisation footer nodebb
    10
    1 Votes
    10 Posts
    4k Views
    JAC
    @phenomlab said in NodeBB Footer: @jac and you. Hope all is well and you recover quickly Thanks pal
  • Bug Navbar CSS

    Solved Customisation navbar css
    3
    1 Votes
    3 Posts
    2k Views
    DownPW
    Not better way. Thanks.