-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(navbar): port logo, submenus, button
add `header.navbar.fixed_to_top` bool option make biography blox compatible with dark section class center views in Collections and List tpl add features and feature_icon options to cta-image-paragraph view
- Loading branch information
Showing
22 changed files
with
3,905 additions
and
1,649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
**/vendor/ | ||
**/_vendor/ | ||
**/libs/ | ||
**/dist/ | ||
public/ | ||
|
||
blox-bootstrap/assets/scss/main.scss | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* Navigation Styles */ | ||
|
||
.navbar { | ||
@apply relative flex flex-wrap items-center justify-between; | ||
} | ||
|
||
.navbar-brand { | ||
@apply text-black dark:text-white text-xl font-semibold; | ||
} | ||
|
||
.navbar-brand svg { | ||
@apply max-h-full max-w-full h-[1em] w-auto inline-block; | ||
} | ||
|
||
.navbar-brand img { | ||
/* To shrink to line height, add: h-[1em] */ | ||
@apply max-h-full w-auto inline-block; | ||
} | ||
|
||
/* navbar toggler */ | ||
input#nav-toggle:checked + label #show-button { | ||
@apply hidden; | ||
} | ||
|
||
input#nav-toggle:checked + label #hide-button { | ||
@apply block; | ||
} | ||
|
||
input#nav-toggle:checked ~ #nav-menu { | ||
@apply block; | ||
} | ||
|
||
#site-header.header { | ||
@apply bg-white dark:bg-slate-900 py-3 shadow; | ||
} | ||
|
||
/* navbar items */ | ||
|
||
.navbar-nav { | ||
@apply text-center lg:text-left; | ||
} | ||
|
||
.nav-link { | ||
@apply hover:text-primary-700 dark:hover:text-primary-300 dark:text-white block p-3 font-semibold transition lg:px-2 lg:py-3; | ||
} | ||
|
||
.nav-dropdown { | ||
@apply mr-0; | ||
|
||
& > svg { | ||
@apply pointer-events-none; | ||
} | ||
|
||
&.active { | ||
.nav-dropdown-list { | ||
@apply block; | ||
} | ||
} | ||
} | ||
|
||
.nav-dropdown-list { | ||
@apply bg-white dark:bg-slate-900 z-10 min-w-[180px] rounded py-4 shadow hidden lg:invisible lg:absolute lg:block lg:opacity-0; | ||
} | ||
|
||
.nav-dropdown-item { | ||
@apply px-4 [&:not(:last-child)]:mb-2 dark:hover:bg-primary-500; | ||
} | ||
|
||
.nav-dropdown-link { | ||
@apply hover:text-primary-700 dark:text-white dark:hover:text-white block py-1 font-semibold transition; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Navigation | ||
|
||
const applyScrollPadding = () => { | ||
const header = document.querySelector('.page-header'); | ||
let position = header.getBoundingClientRect(); | ||
document.documentElement.style.scrollPaddingTop = position.height.toString() + 'px'; | ||
}; | ||
|
||
window.addEventListener("DOMContentLoaded", () => { | ||
const dropdownMenus = document.querySelectorAll( | ||
".nav-dropdown > .nav-link", | ||
); | ||
|
||
dropdownMenus.forEach((toggler) => { | ||
toggler?.addEventListener("click", (e) => { | ||
e.target.parentElement.classList.toggle("active"); | ||
}); | ||
}); | ||
|
||
applyScrollPadding() | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Hugo Blox metadata | ||
|
||
version: "0.1.0" |
Oops, something went wrong.