aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-09-12 19:39:06 +0300
committerValentin Popov <valentin@popov.link>2024-09-12 19:39:06 +0300
commita93400f0902027c094bbd76fd50ea6f31e489d12 (patch)
treef611de8f5ab97b083b7122cc383296b974d3acdc /src
parent3376c53b2ee91041d5eaa0f9274da0affd7d4a9d (diff)
downloadpopov.link-a93400f0902027c094bbd76fd50ea6f31e489d12.tar.xz
popov.link-a93400f0902027c094bbd76fd50ea6f31e489d12.zip
Refactor Astro components and layouts
Diffstat (limited to 'src')
-rw-r--r--src/components/Header.astro46
-rw-r--r--src/scss/_navbar.scss41
-rw-r--r--src/scss/global.scss4
3 files changed, 46 insertions, 45 deletions
diff --git a/src/components/Header.astro b/src/components/Header.astro
index 0fd9269..5b163c8 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -2,6 +2,52 @@
---
+<style lang="scss">
+ @import "../scss/_variables.scss";
+
+ header {
+ background-color: $colorBg;
+ border-bottom: 1px solid $colorHeader;
+ box-shadow: 0 5px 5px $colorBg;
+ left: 0;
+ line-height: 3.5em;
+ opacity: 0.975;
+ position: fixed;
+ right: 0;
+ top: 0;
+ }
+
+ nav {
+ margin: auto;
+ max-width: 60em;
+ padding: 0 4em;
+ text-align: right;
+
+ a {
+ color: $colorText;
+ padding: 0 1em;
+
+ &:visited {
+ color: $colorText;
+ }
+ }
+ }
+
+ @media (width <=684px) {
+ header {
+ box-shadow: none;
+ }
+
+ nav {
+ padding: 0 2em;
+
+ span {
+ display: none;
+ }
+ }
+ }
+</style>
+
<header>
<nav>
<a href="/feed.xml">RSS</a>
diff --git a/src/scss/_navbar.scss b/src/scss/_navbar.scss
deleted file mode 100644
index 9dea596..0000000
--- a/src/scss/_navbar.scss
+++ /dev/null
@@ -1,41 +0,0 @@
-header {
- background-color: $colorBg;
- border-bottom: 1px solid $colorHeader;
- box-shadow: 0 5px 5px $colorBg;
- left: 0;
- line-height: 3.5em;
- opacity: 0.975;
- position: fixed;
- right: 0;
- top: 0;
-}
-
-nav {
- margin: auto;
- max-width: 60em;
- padding: 0 4em;
- text-align: right;
-
- a {
- color: $colorText;
- padding: 0 1em;
-
- &:visited {
- color: $colorText;
- }
- }
-}
-
-@media (width <=684px) {
- header {
- box-shadow: none;
- }
-
- nav {
- padding: 0 2em;
-
- span {
- display: none;
- }
- }
-}
diff --git a/src/scss/global.scss b/src/scss/global.scss
index 831aa25..0e660b1 100644
--- a/src/scss/global.scss
+++ b/src/scss/global.scss
@@ -1,7 +1,3 @@
-// Base
@import "variables";
@import "framework";
@import "print";
-
-// Modules
-@import "navbar";