From 9f15e40d6e8e23d5a721ed70b3dde903ab433c85 Mon Sep 17 00:00:00 2001 From: aleidk Date: Thu, 14 Mar 2024 14:43:46 -0300 Subject: [PATCH] feat(Navbar): apply sticky style to the main navbar --- src/assets/style/_animations.scss | 0 src/assets/style/_utils.scss | 18 ++++++++++++++++++ src/assets/style/style.scss | 1 + src/components/Navbar.astro | 8 ++++++-- src/layouts/Layout.astro | 15 +++++++-------- 5 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 src/assets/style/_animations.scss diff --git a/src/assets/style/_animations.scss b/src/assets/style/_animations.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/assets/style/_utils.scss b/src/assets/style/_utils.scss index 5f256be..3ac2f32 100644 --- a/src/assets/style/_utils.scss +++ b/src/assets/style/_utils.scss @@ -1,6 +1,20 @@ @use './variables' as *; @use './mixins'; +.position-fixed { + position: fixed; + left: 0; + top: 0; + z-index: 2; +} + +.position-sticky { + position: sticky; + left: 0; + top: 0; + z-index: 2; +} + .d-none { display: none; } @@ -285,6 +299,10 @@ box-shadow: none; } +.shadow-1 { + box-shadow: 10px 10px 5px 0px var(--prj-shadow); +} + .border-radius { border-radius: var(--prj-border-radius); } diff --git a/src/assets/style/style.scss b/src/assets/style/style.scss index 00d105a..0372ce5 100644 --- a/src/assets/style/style.scss +++ b/src/assets/style/style.scss @@ -1,5 +1,6 @@ @use './variables.scss' as *; @use './utils.scss'; +@use './animations.scss'; // SASS variables are imported without namespace, but try to always use native // CSS variables when possible so they can be overrwritten by custom styles diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 57669dd..fd4686e 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -12,7 +12,7 @@ const links = [ ---