some minor updates
This commit is contained in:
24
src/App.vue
24
src/App.vue
@@ -3,7 +3,7 @@
|
||||
<Nav/>
|
||||
</header>
|
||||
<main>
|
||||
<div class="spacer"></div>
|
||||
<div :style="{height: offset + 'px'}"/>
|
||||
<router-view name="main"/>
|
||||
</main>
|
||||
<footer class="mt-auto">
|
||||
@@ -16,9 +16,27 @@
|
||||
import Nav from "@/components/Nav";
|
||||
import Footer from "@/components/Footer";
|
||||
import CookieConsentBtn from "@/components/CookieConsentBtn";
|
||||
import {onMounted, ref} from "vue";
|
||||
|
||||
export default {
|
||||
components: {Footer, Nav, CookieConsentBtn},
|
||||
setup() {
|
||||
const offset = ref(0)
|
||||
|
||||
const setOffset = () => {
|
||||
return document.getElementsByTagName('nav')[0].clientHeight
|
||||
}
|
||||
|
||||
window.onresize = () => {
|
||||
offset.value = setOffset()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
offset.value = setOffset()
|
||||
})
|
||||
|
||||
return {offset}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -28,10 +46,6 @@ export default {
|
||||
src: local("Obitron"), url("assets/fonts/Orbitron-VariableFont_wght.ttf") format("truetype");
|
||||
}
|
||||
|
||||
.spacer {
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
#cookie-btn {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
|
||||
Reference in New Issue
Block a user