mirror of
https://github.com/catdevnull/transicion-desordenada-diablo
synced 2024-11-15 10:31:38 +00:00
linkear a portal y mejorar wording
This commit is contained in:
parent
3bc4b89548
commit
0b7ec33c12
2 changed files with 21 additions and 4 deletions
|
@ -5,7 +5,6 @@
|
||||||
import NotFound from "./NotFound.svelte";
|
import NotFound from "./NotFound.svelte";
|
||||||
import { inject } from "regexparam";
|
import { inject } from "regexparam";
|
||||||
import { routes } from "../router";
|
import { routes } from "../router";
|
||||||
import DumpIndex from "./DumpIndex.svelte";
|
|
||||||
|
|
||||||
export let params: { dumpUrl: string; id: string };
|
export let params: { dumpUrl: string; id: string };
|
||||||
const url = decodeURIComponent(params.dumpUrl);
|
const url = decodeURIComponent(params.dumpUrl);
|
||||||
|
@ -26,7 +25,7 @@
|
||||||
{:else}
|
{:else}
|
||||||
<header class="py-5 px-6 border-b border-b-gray-200">
|
<header class="py-5 px-6 border-b border-b-gray-200">
|
||||||
<small>
|
<small>
|
||||||
Viendo dataset de
|
Viendo portal archivado de
|
||||||
<a
|
<a
|
||||||
class="underline text-blue-500"
|
class="underline text-blue-500"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { inject } from "regexparam";
|
import { inject } from "regexparam";
|
||||||
import ArrowForward from "eva-icons/outline/svg/arrow-forward-outline.svg?component";
|
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";
|
import { routes } from "../router";
|
||||||
|
|
||||||
export let params: { dumpUrl: string };
|
export let params: { dumpUrl: string };
|
||||||
|
@ -10,6 +11,12 @@
|
||||||
const data = Promise.all([fetchData(url), fetchErrors(url)]).then(
|
const data = Promise.all([fetchData(url), fetchErrors(url)]).then(
|
||||||
([data, errors]) => ({ data, errors }),
|
([data, errors]) => ({ data, errors }),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function arreglarHomepageUrl(url: string): string {
|
||||||
|
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||||
|
return `https://${url}`;
|
||||||
|
return url;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main class="mx-auto max-w-3xl">
|
<main class="mx-auto max-w-3xl">
|
||||||
|
@ -19,7 +26,7 @@
|
||||||
{:then { data, errors }}
|
{:then { data, errors }}
|
||||||
<header class="py-5 px-6 border-b border-b-gray-200">
|
<header class="py-5 px-6 border-b border-b-gray-200">
|
||||||
<small>
|
<small>
|
||||||
Viendo dataset de
|
Viendo portal archivado de
|
||||||
<a
|
<a
|
||||||
class="underline text-blue-500"
|
class="underline text-blue-500"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -29,6 +36,17 @@
|
||||||
</small>
|
</small>
|
||||||
<h1 class="font-bold text-3xl">{data.title}</h1>
|
<h1 class="font-bold text-3xl">{data.title}</h1>
|
||||||
<p class="text-xl">{data.description}</p>
|
<p class="text-xl">{data.description}</p>
|
||||||
|
{#if data.homepage}
|
||||||
|
<a
|
||||||
|
class="flex items-center leading-none text-gray-600 gap-1 pt-2"
|
||||||
|
href={arreglarHomepageUrl(data.homepage)}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
|
<ExternalLink fill="currentColor" class="h-4" />
|
||||||
|
Fuente
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
</header>
|
</header>
|
||||||
<ul class="divide-y divide-gray-100">
|
<ul class="divide-y divide-gray-100">
|
||||||
{#each data.dataset as dataset}
|
{#each data.dataset as dataset}
|
||||||
|
|
Loading…
Reference in a new issue