feat: reintroduce header and footer components

This commit is contained in:
Sebin Nyshkim 2022-01-28 23:46:24 +01:00
parent f92043e106
commit 3eddad19c9
2 changed files with 87 additions and 0 deletions

22
src/components/Footer.vue Normal file
View file

@ -0,0 +1,22 @@
<template>
<footer class="footer">
<slot></slot>
</footer>
</template>
<script></script>
<style lang="scss">
@import "@/scss/_variables.scss";
@import "@/scss/_mixins.scss";
.footer {
background: url("/subtle-prism.svg") $bg-color-dark;
background-blend-mode: multiply;
padding: max(1em, env(safe-area-inset-top)) 0
max(1em, env(safe-area-inset-bottom)) 0;
text-align: center;
}
</style>

65
src/components/Header.vue Normal file
View file

@ -0,0 +1,65 @@
<template>
<header class="header">
<slot></slot>
</header>
</template>
<script></script>
<style lang="scss">
@import "@/scss/_variables.scss";
@import "@/scss/_mixins.scss";
.header {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
position: sticky;
top: max(1em, env(safe-area-inset-top));
right: max(1em, env(safe-area-inset-right));
left: max(1em, env(safe-area-inset-left));
z-index: 2;
max-width: 70em;
margin: 1em max(1em, env(safe-area-inset-right)) 1em
max(1em, env(safe-area-inset-left));
padding: 0.5em;
border-radius: 0.5em;
box-shadow: 0.125em 0.125em 0.5em rgba(#000, 0.7);
background: radial-gradient(
circle at bottom right,
darken($bg-color-lighter, 30%) 20%,
transparent 80%
),
radial-gradient(
circle at top left,
darken($sebin-secondary, 20%) 5%,
darken($sebin-primary, 20%) 100%
);
@include theme(dark) {
background: radial-gradient(
circle at bottom right,
darken($bg-color-lighter, 35%) 20%,
transparent 80%
),
radial-gradient(
circle at top left,
darken($sebin-secondary, 35%) 5%,
darken($sebin-primary, 35%) 100%
);
}
@include theme(dark) {
background-color: $bg-color-dark;
}
@media (min-width: 90em) {
margin: 0 auto;
}
}
</style>