added lightmode option
This commit is contained in:
147
pages/index.vue
147
pages/index.vue
@ -1,83 +1,102 @@
|
||||
<template>
|
||||
<section id="content">
|
||||
<div id="content-header">
|
||||
<h1 id="page-name">Pagename</h1>
|
||||
</div>
|
||||
<div id="content-body">
|
||||
<section id="stuff"></section>
|
||||
</div>
|
||||
</section>
|
||||
<section id="content">
|
||||
<div id="content-header">
|
||||
<h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="page-name">Pagename</h1>
|
||||
</div>
|
||||
<div id="content-body">
|
||||
<section :class="[darkMode ? 'stuff-darkmode' : 'stuff-lightmode']" id="stuff"></section>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Testpage",
|
||||
components: {
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "Testpage",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
darkMode: true,
|
||||
};
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
#content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
float: left;
|
||||
justify-content: stretch;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
gap: 0.625rem;
|
||||
padding: 0 1.25rem;
|
||||
}
|
||||
|
||||
#content-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 3.125rem;
|
||||
}
|
||||
#page-name {
|
||||
color: #fff;
|
||||
letter-spacing: 5%;
|
||||
font: 400 1.5rem/125% Overpass, -apple-system, Roboto, Helvetica,
|
||||
sans-serif;
|
||||
}
|
||||
#content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
float: left;
|
||||
justify-content: stretch;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
gap: 0.625rem;
|
||||
padding: 0 1.25rem;
|
||||
}
|
||||
|
||||
#content-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 1.25rem;
|
||||
margin-bottom: 0.625rem;
|
||||
border-radius: 0.625rem;
|
||||
}
|
||||
.h1-darkmode {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#stuff {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 1.25rem;
|
||||
padding: 1.25rem 1.875rem;
|
||||
box-shadow: 0.25rem 0.25rem 0.25rem 0rem rgba(0, 0, 0, 0.25);
|
||||
background-color: #2C2C2C;
|
||||
}
|
||||
|
||||
.h1-lightmode {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#content-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 3.125rem;
|
||||
}
|
||||
|
||||
#page-name {
|
||||
letter-spacing: 5%;
|
||||
font: 400 1.5rem/125% Overpass, -apple-system, Roboto, Helvetica,
|
||||
sans-serif;
|
||||
}
|
||||
|
||||
#content-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 1.25rem;
|
||||
margin-bottom: 0.625rem;
|
||||
border-radius: 0.625rem;
|
||||
}
|
||||
|
||||
#stuff {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 1.25rem;
|
||||
padding: 1.25rem 1.875rem;
|
||||
box-shadow: 0.25rem 0.25rem 0.25rem 0rem rgba(0, 0, 0, 0.25);
|
||||
border-radius: 0.625em;
|
||||
}
|
||||
|
||||
.stuff-darkmode {
|
||||
background-color: #2C2C2C;
|
||||
}
|
||||
|
||||
.stuff-lightmode {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user