Skip to content

Commit

Permalink
making the navbar sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhipawar5 committed Jan 17, 2024
1 parent 2f91efc commit 7938c96
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 44 deletions.
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
{% assign lang_dir = page.lang | prepend: "/" %}
{% endif %}

<body class="f4">
<div class="py-4 border-bottom px-3">
<body class="f4" >
<div class="py-4 border-bottom px-3" id="header">
<div class="container-lg p-responsive">
<div class="d-md-flex mx-auto flex-justify-between flex-items-center">
<h1 class="alt-h4 text-center mb-4 mb-md-0">
Expand Down
11 changes: 11 additions & 0 deletions assets/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,14 @@ img.pquote-avatar {
.form-select {
-webkit-appearance: none;
}

//Sicky Navbar contibution by nidhi
//inside this container id >> navbar is made sticky
#header {
position: sticky;
top: 0;
z-index: 1000;
background-color: rgba(255, 255, 255, 0.95); //slight background color is added to avoid text overlap during scrolling
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1); //slight box shadow
backdrop-filter: blur(5px); //slight glassmorphism
}
195 changes: 195 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7938c96

Please sign in to comment.