Spaces:
Running
Running
feat: share feedback link
Browse files
src/lib/components/sidebar/Menu.svelte
CHANGED
|
@@ -1,14 +1,30 @@
|
|
| 1 |
<script lang="ts">
|
| 2 |
import { page } from '$app/stores';
|
|
|
|
| 3 |
|
| 4 |
export let href: string;
|
|
|
|
| 5 |
export let target: string = '_self';
|
| 6 |
|
| 7 |
$: active_class = $page.url.pathname === href ? 'bg-neutral-900 !border-neutral-800' : '';
|
| 8 |
</script>
|
| 9 |
|
| 10 |
<li>
|
| 11 |
-
|
| 12 |
-
<
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
</li>
|
|
|
|
| 1 |
<script lang="ts">
|
| 2 |
import { page } from '$app/stores';
|
| 3 |
+
import Banner from "$lib/assets/banner.webp";
|
| 4 |
|
| 5 |
export let href: string;
|
| 6 |
+
export let colorful: boolean = false;
|
| 7 |
export let target: string = '_self';
|
| 8 |
|
| 9 |
$: active_class = $page.url.pathname === href ? 'bg-neutral-900 !border-neutral-800' : '';
|
| 10 |
</script>
|
| 11 |
|
| 12 |
<li>
|
| 13 |
+
{#if colorful}
|
| 14 |
+
<a
|
| 15 |
+
href={href}
|
| 16 |
+
{target}
|
| 17 |
+
class="transition-all duration-200 w-full flex items-center justify-start text-white font-bold rounded-xl text-base font-regular px-5 py-3.5 gap-2.5 border border-transparent relative z-[1] overflow-hidden"
|
| 18 |
+
>
|
| 19 |
+
<div
|
| 20 |
+
class="absolute top-0 left-0 w-full h-full bg-black brightness-75 rounded-xl z-[-1] transition-all duration-200 bg-cover hover:brightness-100"
|
| 21 |
+
style="background-image: url({Banner}); background-position: 0% 0%;"
|
| 22 |
+
/>
|
| 23 |
+
<slot />
|
| 24 |
+
</a>
|
| 25 |
+
{:else}
|
| 26 |
+
<a href={href} {target} class="transition-all duration-200 w-full flex items-center justify-start text-neutral-200 rounded-xl text-base font-regular px-5 py-3.5 gap-2.5 border border-transparent {active_class}">
|
| 27 |
+
<slot />
|
| 28 |
+
</a>
|
| 29 |
+
{/if}
|
| 30 |
</li>
|
src/lib/components/sidebar/Sidebar.svelte
CHANGED
|
@@ -69,7 +69,7 @@
|
|
| 69 |
<Icon icon="ph:question-fill" class="w-5 h-5" />
|
| 70 |
Help
|
| 71 |
</Menu>
|
| 72 |
-
<Menu href="https://huggingface.co/spaces/enzostvs/loras-studio/discussions/1" target="_blank">
|
| 73 |
<Icon icon="ooui:feedback-ltr" class="w-5 h-5" />
|
| 74 |
Feedback
|
| 75 |
</Menu>
|
|
|
|
| 69 |
<Icon icon="ph:question-fill" class="w-5 h-5" />
|
| 70 |
Help
|
| 71 |
</Menu>
|
| 72 |
+
<Menu href="https://huggingface.co/spaces/enzostvs/loras-studio/discussions/1" target="_blank" colorful={true}>
|
| 73 |
<Icon icon="ooui:feedback-ltr" class="w-5 h-5" />
|
| 74 |
Feedback
|
| 75 |
</Menu>
|