Jump to content

Custom navigation header

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Yes...well almost! I am working on developing a solution similar to this for a client at the moment, it'll need the bar coding in HTML and a piece of javascript and CSS to make it work.

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment
19 hours ago, Ziggy said:

Yes...well almost! I am working on developing a solution similar to this for a client at the moment, it'll need the bar coding in HTML and a piece of javascript and CSS to make it work.

Oh nice! I'd be interested to know how you achieved it once you're done if that would be okay! 

Link to comment

Well, I'm using this and tweaked it:

http://jsfiddle.net/smc8ofgg/

This is adaptation, placed in Header Code injection:

<script>
myID = document.getElementById("myID");

var myScrollFunc = function () {
    var y = window.scrollY;
    if (y >= 5) {
        myID.className = "bottomMenu show"
    } else {
        myID.className = "bottomMenu hide"
    }
};

window.addEventListener("scroll", myScrollFunc);
</script>
<style>	
.bottomMenu {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    border-top: 1px solid #000;
    background: red;
    z-index: 99;
    transition: all 1s;
}
.hide {
    opacity:0;
    top:-60px;
    left:0;
}
.show {
    opacity:1;
    top:0;
    left:0;
}
</style>
<div id="myID" class="bottomMenu hide">
  <span>build your header here</span>
</div>

Obviously this just does the appearing after scroll, but it's a start, you just need to add links in a flexbox...or similar table layout.

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.