add the visitor API endpoint
This commit is contained in:
@@ -5,10 +5,13 @@
|
||||
const default_color = "white-1";
|
||||
|
||||
export let active = false;
|
||||
export let highlight = true;
|
||||
export let link = "";
|
||||
export let icon = "";
|
||||
|
||||
let style = `text-decoration-color: var(--${color()});`;
|
||||
let style = "";
|
||||
|
||||
if (highlight) style = `text-decoration-color: var(--${color()});`;
|
||||
|
||||
if (active) style += `color: var(--${color()});`;
|
||||
else style += `color: var(--${default_color});`;
|
||||
@@ -17,6 +20,18 @@
|
||||
{#if icon != ""}
|
||||
<Icon {icon} />
|
||||
{/if}
|
||||
<a {style} href={link}>
|
||||
<slot></slot>
|
||||
</a>
|
||||
{#if highlight}
|
||||
<a {style} href={link}>
|
||||
<slot></slot>
|
||||
</a>
|
||||
{:else}
|
||||
<a {style} class="no-highlight" href={link}>
|
||||
<slot></slot>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.no-highlight:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user