-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to fix the site header when scrolling #29
Comments
When does the header scroll? On which device (dimensions) does the scrolling occur? |
there's no error here, it's just a request for en improvement.
when the page is scrolled vertically; the header scrolls vertically with the page which is a normal behaviour.
any device (well, i only checked on a notebook (2048x) and a smartphone (720x). it would be great to have an option though to fix the header in place and not scroll it with the rest of the contents. |
Ah okay, now I understand. |
Now I thought about this option a lot ... I don't think that this would be a feature the most users would ask for, and I would never use this because I love the integrated algolia search and for me, the So I think I would not implement this in the theme directly. But I can help you, for your site:
&.permanentTopNav {
display: block;
position: fixed;
width: 100%;
z-index: 60;
}
header {
background-color: $base-color;
color: $header-text-color;
height: 20rem;
display: flex;
align-items: center;
padding-top: 65px; // add this line
...
That should do the trick ;-) Note: When you're upgrading my original theme ( |
I would like this feature as well 😁 Maybe like beautiful jekyll that the navbar actually shrinks and just leaves the home button there. I find it hard to scroll up especially on mobile. |
Sticky navbar should be the default behavior. |
@LITUATUI, the |
An option somewhere in config.toml or CSS to fix the site header to prevent it from scrolling would be great.
The text was updated successfully, but these errors were encountered: