added lightmode option

This commit is contained in:
2023-11-22 13:41:53 +01:00
parent 8a4ced29ac
commit 3fd31bcc43
22 changed files with 1501 additions and 816 deletions

View File

@ -1,12 +1,10 @@
<template>
<header>
<img id="header-logo"
loading="lazy" src="../tüit-logo.svg.png" />
<header :class="[darkMode ? 'header-darkmode' : 'header-lightmode']">
<img id="header-logo" loading="lazy" src="../tüit-logo.svg.png" />
<div class="profile">
<div class="username">username</div>
<div class="picture">
<img id="picture"
loading="lazy" src="" />
<div :class="['username', darkMode ? 'username-darkmode' : 'username-lightmode']">username</div>
<div :class="['picture', darkMode ? 'picture-darkmode' : 'picture-lightmode']">
<img id="picture" loading="lazy" src="" />
</div>
</div>
</header>
@ -17,62 +15,90 @@
export default {
name: "PageHeader",
data() {
return {
darkMode: true,
};
},
}
</script>
<style scoped>
* {
box-sizing: border-box;
}
* {
box-sizing: border-box;
}
header {
display: flex;
flex-direction: row;
position: sticky;
top: 0;
width: 100%;
height: 4.375rem;
align-self: stretch;
justify-content: space-between;
align-items: center;
padding: 0.625rem 1.25rem;
}
header {
display: flex;
flex-direction: row;
position: sticky;
top: 0;
width: 100%;
height: 4.375rem;
align-self: stretch;
justify-content: space-between;
align-items: center;
padding: 0.625rem 1.25rem;
background-color: #2c2c2c;
}
#header-logo {
object-fit: contain;
object-position: center;
width: 5rem;
height: 2.5rem;
justify-content: center;
align-items: center;
overflow: hidden;
}
.header-darkmode {
background-color: #212121;
border-bottom: 0.125em solid #000;
}
.profile {
display: flex;
flex-direction: row;
align-items: flex-end;
gap: 0.625rem;
padding: 0 0.625rem;
}
.username {
align-self: center;
margin: auto 0;
color: #fff;
text-align: right;
font: 200 0.875rem Overpass, sans-serif;
letter-spacing: 5%;
}
.picture {
display: flex;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background-color: #fff;
}
.header-lightmode {
background-color: #EBEBEB;
border-bottom: 0.125em solid #8e8e8e61;
}
#header-logo {
object-fit: contain;
object-position: center;
width: 5rem;
height: 2.5rem;
justify-content: center;
align-items: center;
overflow: hidden;
}
.profile {
display: flex;
flex-direction: row;
align-items: flex-end;
gap: 0.625rem;
padding: 0 0.625rem;
}
.username {
align-self: center;
margin: auto 0;
text-align: right;
font: 200 0.875rem Overpass, sans-serif;
letter-spacing: 5%;
}
.username-darkmode {
color: #fff;
}
.username-lightmode {
color: #000;
}
.picture {
display: flex;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
}
.picture-darkmode {
background-color: #fff;
}
.picture-lightmode {
background-color: #000;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<PageHeader />
<main>
<main :class="[darkMode ? 'main-darkmode' : 'main-lightmode']">
<Navigationbar />
<slot />
<Actionbar />
@ -14,12 +14,17 @@ import Navigationbar from "./Navigationbar.vue";
import Actionbar from "./Actionbar.vue";
export default {
name: "Page",
components: {
PageHeader,
Navigationbar,
Actionbar,
}
name: "Page",
components: {
PageHeader,
Navigationbar,
Actionbar,
},
data() {
return {
darkMode: true,
};
},
}
</script>
@ -27,20 +32,27 @@ export default {
<style scoped>
* {
box-sizing: border-box;
}
* {
box-sizing: border-box;
}
main {
display: flex;
flex-direction: row;
width: 100%;
padding: 0.625rem;
gap: 0.625rem;
height: 100vh;
width: 100vw;
height: 100%;
width: 100%;
}
main {
display: flex;
flex-direction: row;
width: 100%;
padding: 0.625rem;
gap: 0.625rem;
background-color: #212121;
}
.main-darkmode {
background-color: #212121;
}
.main-lightmode {
background-color: #EBEBEB;
}
</style>

View File

@ -1,40 +1,52 @@
<template>
<PageHeader />
<main>
<slot />
</main>
<PageHeader />
<main :class="[darkMode ? 'main-darkmode' : 'main-lightmode']">
<slot />
</main>
</template>
<script>
import PageHeader from "../layouts/PageHeader.vue";
export default {
name: "Page",
components: {
PageHeader,
}
}
</script>
<script>
import PageHeader from "../layouts/PageHeader.vue";
export default {
name: "Page",
components: {
PageHeader,
},
data() {
return {
darkMode: true,
};
},
}
</script>
<style scoped>
* {
box-sizing: border-box;
}
main {
display: flex;
flex-direction: row;
gap: 0.625rem;
padding: 0.625rem 1.5625rem 0.625rem 0.625rem;
background-color: #212121;
}
</style>
<style scoped>
* {
box-sizing: border-box;
}
main {
display: flex;
flex-direction: row;
gap: 0.625rem;
padding: 0.625rem 1.5625rem 0.625rem 0.625rem;
height: 100vh;
width: 100vw;
height: 100%;
width: 100%;
}
.main-darkmode {
background-color: #212121;
}
.main-lightmode {
background-color: #EBEBEB;
}
</style>