Skip to content
Snippets Groups Projects
Commit c3b5aa5b authored by Malin Haugland Høli's avatar Malin Haugland Høli
Browse files

refactor: :sparkles: Add sti decoration to certain pages

parent 9dbe1ade
No related branches found
No related tags found
3 merge requests!66Final merge,!50fix(styling):,!4Pipeline fix
......@@ -14,29 +14,58 @@ const showNavBar = computed(() => {
route.path.startsWith('/konfigurasjon')
)
})
</script>
<template>
<NavBarComponent v-if="showNavBar" />
<main class="mb-10">
<RouterView />
</main>
</template>
const showSti = computed(() => {
return !(
route.path == '/' ||
route.path == '/registrer' ||
route.path == '/logginn' ||
route.path == '/forgotPassword' ||
route.path.startsWith('/konfigurasjon') ||
route.path == '/hjem' ||
route.path == '/profil'
)
})
<style>
nav {
display: flex;
justify-content: center;
gap: 1rem;
margin: 1rem 0;
}
const backgroundImageStyle = computed(() => {
if (showSti.value) {
return {
backgroundImage: "url('src/assets/sti.png')"
}
} else {
return {
backgroundImage: "none"
}
}
})
nav a.router-link-exact-active {
color: var(--color-text);
}
</script>
nav a.router-link-exact-active:hover {
background-color: transparent;
}
</style>
<template>
<div
class="min-h-screen bg-left-bottom bg-phone md:bg-pc bg-no-repeat"
:style="backgroundImageStyle">
<NavBarComponent v-if="showNavBar" />
<main class="mb-10 ">
<RouterView />
</main>
</div>
</template>
<style>
nav {
display: flex;
justify-content: center;
gap: 1rem;
margin: 1rem 0;
}
nav a.router-link-exact-active {
color: var(--color-text);
}
nav a.router-link-exact-active:hover {
background-color: transparent;
}
</style>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment