enh: citations link

This commit is contained in:
Timothy J. Baek 2024-07-15 11:54:56 +02:00
parent 69083b6485
commit d4d7c3d8b6

View File

@ -1,6 +1,5 @@
<script lang="ts">
import { getContext, onMount, tick } from 'svelte';
import Modal from '$lib/components/common/Modal.svelte';
const i18n = getContext('i18n');
@ -54,9 +53,23 @@
<div class="text-sm font-medium dark:text-gray-300">
{$i18n.t('Source')}
</div>
<div class="text-sm dark:text-gray-400">
{document.source?.name ?? $i18n.t('No source available')}
</div>
{#if document.source?.name}
<div class="text-sm dark:text-gray-400">
<a
href={document?.source?.url
? `${document?.source?.url}/content`
: document.source.name}
target="_blank"
>
{document.source.name}
</a>
</div>
{:else}
<div class="text-sm dark:text-gray-400">
{$i18n.t('No source available')}
</div>
{/if}
</div>
<div class="flex flex-col w-full">
<div class=" text-sm font-medium dark:text-gray-300">