add the visitor API endpoint

This commit is contained in:
ngn
2025-01-08 00:20:11 +03:00
parent fc11748e57
commit dee3ef4d85
26 changed files with 444 additions and 163 deletions

View File

@@ -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>