diff --git a/src/lib/components/documents/Metadata.svelte b/src/lib/components/documents/Metadata.svelte index 69983a0f..1d2f357e 100644 --- a/src/lib/components/documents/Metadata.svelte +++ b/src/lib/components/documents/Metadata.svelte @@ -15,6 +15,7 @@ import { LANGUAGE_MAP } from "@/config/config.js"; import { userOrgString } from "$lib/api/documents"; import Metadata from "../common/Metadata.svelte"; + import { LinkExternal16 } from "svelte-octicons"; export let document: Document; export let text: Maybe; @@ -44,6 +45,19 @@
+ {#if document.published_url} + + + {new URL(document.published_url).hostname} + + + + {/if} + {#if document.source} + + {document.source} + + {/if} {userOrgString(document)} @@ -70,4 +84,10 @@ gap: 1rem; padding: 0 0.5rem 1rem 0; } + .publishedUrl { + display: flex; + align-items: center; + fill: var(--blue-3); + gap: 0.25rem; + } diff --git a/src/lib/components/documents/stories/Metadata.stories.svelte b/src/lib/components/documents/stories/Metadata.stories.svelte new file mode 100644 index 00000000..2eee9eeb --- /dev/null +++ b/src/lib/components/documents/stories/Metadata.stories.svelte @@ -0,0 +1,31 @@ + + + + +