more easily visible navbar
This commit is contained in:
parent
a7099ee6cc
commit
df67f55ad9
@ -1,15 +1,26 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import {page} from '$app/stores';
|
||||||
export let link = '';
|
export let link = '';
|
||||||
export let text = '';
|
export let text = '';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a href="{link}">
|
<a href="{link}">
|
||||||
<button class="text-slate-50 py-2 px-4 font-montserrat font-light link-underline">
|
<button class="{$page.url.pathname == link ? "active-now" : ""} text-violet-50 py-2 px-4 font-montserrat font-light link-underline">
|
||||||
{text}
|
{text}
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.active-now:before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
transform: scaleX(1);
|
||||||
|
height: 2px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: #638CF6;
|
||||||
|
}
|
||||||
.link-underline {
|
.link-underline {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
Loading…
Reference in New Issue
Block a user