added header

This commit is contained in:
Fedor Katurov 2022-11-10 13:20:04 +06:00
parent aae9af8e62
commit a8dd169087
8 changed files with 130 additions and 50 deletions

View file

@ -0,0 +1,43 @@
<template>
<div :class="$style.header">
<NuxtLink to="/" :activeClass="$style.active">Home</NuxtLink>
<NuxtLink to="/bio" :activeClass="$style.active">About me</NuxtLink>
</div>
</template>
<script lang="ts" setup></script>
<style lang="scss" module>
.header {
text-align: left;
padding: 22px 0;
a {
color: var(--color-text);
text-decoration: none;
padding: 0 25px 0 0;
position: relative;
&.active {
color: var(--color-link);
&::after {
right: 28px;
left: 3px;
background: var(--color-link);
}
}
&::after {
content: "";
background: var(--color-text);
position: absolute;
height: 2px;
bottom: -6px;
left: 50%;
right: 50%;
transition: all 0.25s;
}
}
}
</style>