0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-04 00:20:26 +03:00

Refactor Footer and Header components, update layout styles, and adjust Analytics placement

This commit is contained in:
2024-09-18 00:35:18 +00:00
parent 9ff6f2cd0e
commit 61e7f5d5b4
5 changed files with 38 additions and 32 deletions

View File

@ -1,14 +1,18 @@
---
import { Icon } from "astro-icon/components";
const { pathname } = Astro.url;
---
<style lang="scss">
@import "../scss/_variables.scss";
[data-icon] {
vertical-align: middle;
}
header {
background-color: $colorBg;
border-bottom: 1px solid $colorHeader;
box-shadow: 0 5px 5px $colorBg;
left: 0;
line-height: 3.5em;
opacity: 0.975;
@ -19,38 +23,42 @@
nav {
margin: auto;
max-width: 60em;
max-width: 52em;
padding: 0 4em;
text-align: right;
}
a {
a {
color: $colorText;
&:visited {
color: $colorText;
padding: 0 1em;
&:visited {
color: $colorText;
}
}
}
@media (width <=684px) {
header {
box-shadow: none;
position: fixed;
}
nav {
padding: 0 2em;
span {
display: none;
}
text-align: center;
}
}
</style>
<header>
<nav>
<a href="/">Home</a>
<a href="/">
{
pathname !== "/" ? (
<>
<Icon name="hugeicons:arrow-left-01" />
<span>{import.meta.env.DEFAULT_TITLE}</span>
</>
) : (
<>
<Icon name="hugeicons:source-code" />
<span>{import.meta.env.DEFAULT_TITLE}</span>
</>
)
}
</a>
</nav>
</header>