svelte and nx rewrite

This commit is contained in:
2025-08-03 18:24:31 +02:00
parent e0a743056f
commit cb47cbc620
85 changed files with 1769 additions and 5202 deletions

View File

@@ -0,0 +1,17 @@
<script lang="ts">
import { getFileAsset } from '@sanity/asset-utils';
import { Download } from '@lucide/svelte';
import { client } from '$lib/sanity';
let { portableText } = $props();
const { value } = portableText;
const { projectId, dataset } = client.config();
</script>
{#if value?.asset}
{@const file = getFileAsset(value, { projectId, dataset })}
<a href={file.url} download class="inline-flex items-center gap-2 text-primary hover:underline">
<Download size={16} />
{value.title || 'Download file'}
</a>
{/if}