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(() => { ...@@ -14,29 +14,58 @@ const showNavBar = computed(() => {
route.path.startsWith('/konfigurasjon') route.path.startsWith('/konfigurasjon')
) )
}) })
</script>
<template>
<NavBarComponent v-if="showNavBar" />
<main class="mb-10"> const showSti = computed(() => {
<RouterView /> return !(
</main> route.path == '/' ||
</template> route.path == '/registrer' ||
route.path == '/logginn' ||
route.path == '/forgotPassword' ||
route.path.startsWith('/konfigurasjon') ||
route.path == '/hjem' ||
route.path == '/profil'
)
})
<style> const backgroundImageStyle = computed(() => {
nav { if (showSti.value) {
display: flex; return {
justify-content: center; backgroundImage: "url('src/assets/sti.png')"
gap: 1rem; }
margin: 1rem 0; } else {
} return {
backgroundImage: "none"
}
}
})
nav a.router-link-exact-active { </script>
color: var(--color-text);
}
nav a.router-link-exact-active:hover { <template>
background-color: transparent; <div
} class="min-h-screen bg-left-bottom bg-phone md:bg-pc bg-no-repeat"
</style> :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