diff --git a/src/lib/components/documents/Header.svelte b/src/lib/components/documents/Header.svelte index c654105b..cfe152fd 100644 --- a/src/lib/components/documents/Header.svelte +++ b/src/lib/components/documents/Header.svelte @@ -11,8 +11,9 @@ import { _ } from "svelte-i18n"; import { ALLOWED_TAGS, ALLOWED_ATTR } from "@/config/config.js"; - import { remToPx } from "@/lib/utils/layout"; - import Access, { getLevel } from "../common/Access.svelte"; + import Access, { getLevel } from "$lib/components/common/Access.svelte"; + import { remToPx } from "$lib/utils/layout"; + import SignedIn from "../common/SignedIn.svelte"; export let document: Document; @@ -33,11 +34,13 @@
- {#if access} -
- -
- {/if} + + {#if access} +
+ +
+ {/if} +

{document.title}

{#if description}
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 @@ + + + + + diff --git a/src/lib/components/layouts/DocumentLayout.svelte b/src/lib/components/layouts/DocumentLayout.svelte index 79ceaac1..56248a6e 100644 --- a/src/lib/components/layouts/DocumentLayout.svelte +++ b/src/lib/components/layouts/DocumentLayout.svelte @@ -22,6 +22,7 @@ Assumes it's a child of a ViewerContext import { getCurrentUser } from "$lib/utils/permissions"; import { isOrg } from "$lib/api/accounts"; import { getDocument, getText } from "../viewer/ViewerContext.svelte"; + import SignedIn from "../common/SignedIn.svelte"; const me = getCurrentUser(); @@ -33,7 +34,7 @@ Assumes it's a child of a ViewerContext $: projects = (document.projects ?? []) as Project[]; - +