diff --git a/frontend/src/lib/routes/Dataset.svelte b/frontend/src/lib/routes/Dataset.svelte index 23e01f5..05ec18d 100644 --- a/frontend/src/lib/routes/Dataset.svelte +++ b/frontend/src/lib/routes/Dataset.svelte @@ -5,7 +5,6 @@ import NotFound from "./NotFound.svelte"; import { inject } from "regexparam"; import { routes } from "../router"; - import DumpIndex from "./DumpIndex.svelte"; export let params: { dumpUrl: string; id: string }; const url = decodeURIComponent(params.dumpUrl); @@ -26,7 +25,7 @@ {:else}
- Viendo dataset de + Viendo portal archivado de import { inject } from "regexparam"; import ArrowForward from "eva-icons/outline/svg/arrow-forward-outline.svg?component"; - import { downloadFile, fetchData, fetchErrors } from "../dump"; + import ExternalLink from "eva-icons/outline/svg/external-link-outline.svg?component"; + import { fetchData, fetchErrors } from "../dump"; import { routes } from "../router"; export let params: { dumpUrl: string }; @@ -10,6 +11,12 @@ const data = Promise.all([fetchData(url), fetchErrors(url)]).then( ([data, errors]) => ({ data, errors }), ); + + function arreglarHomepageUrl(url: string): string { + if (!url.startsWith("http://") && !url.startsWith("https://")) + return `https://${url}`; + return url; + }
@@ -19,7 +26,7 @@ {:then { data, errors }}
- Viendo dataset de + Viendo portal archivado de

{data.title}

{data.description}

+ {#if data.homepage} +
+ + Fuente + + {/if}
    {#each data.dataset as dataset}