upend/ui/src/App.vue

105 lines
1.8 KiB
Vue

<template>
<div id="app" :class="{ 'sl-theme-dark': prefersDark }">
<header>
<h1><a href="/">UpEnd</a></h1>
</header>
<main>
<router-view />
</main>
<footer>
<Jobs />
</footer>
</div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import Jobs from "@/components/Jobs.vue";
export default defineComponent({
name: "App",
data() {
return {
prefersDark: false,
};
},
components: { Jobs },
mounted() {
this.prefersDark =
window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
},
});
</script>
<style lang="scss">
@import "../node_modules/normalize.css/normalize.css";
@import "../node_modules/@shoelace-style/shoelace/dist/shoelace/shoelace.css";
@import "../node_modules/@shoelace-style/shoelace/themes/dark.css";
html {
--foreground: #2c3e50;
--background: white;
}
@media (prefers-color-scheme: dark) {
html {
--foreground: white;
--background: #2c3e50;
}
}
html,
body,
#app {
height: calc(100% - 1rem);
color: var(--foreground);
background: var(--background);
}
#app {
font-family: Helvetica, Arial, sans-serif;
color: var(--foreground);
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 1rem;
--monospace-font: "Fira Code", "Consolas", "JetBrains Mono", "Inconsolata", monospace;
}
header {
box-shadow: var(--sl-shadow-large);
margin-bottom: 1rem;
padding: 1rem;
display: block;
background: var(--background);
h1,
h2 {
font-size: 14pt;
font-weight: normal;
margin: 0;
}
h1 a {
color: var(--foreground);
text-decoration: none;
font-weight: bold;
}
}
main {
flex-grow: 1;
}
a {
color: var(--foreground);
}
a:visited {
color: var(--foreground);
}
</style>