From 0b7ec33c126597d3629fcf577c656541bacb5e95 Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 8 Dec 2023 00:43:15 -0300 Subject: [PATCH] linkear a portal y mejorar wording --- frontend/src/lib/routes/Dataset.svelte | 3 +-- frontend/src/lib/routes/DumpIndex.svelte | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) 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}