frontend: añadir home linkeando a dump 2023-12-08

This commit is contained in:
Cat /dev/Nulo 2023-12-08 18:59:21 -03:00
parent 1f198d73c8
commit 4f90c7c812
6 changed files with 86 additions and 3 deletions

View file

@ -11,9 +11,11 @@
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tailwindcss/typography": "^0.5.10",
"@tsconfig/svelte": "^5.0.2",
"@types/streamsaver": "^2.0.4",
"autoprefixer": "^10.4.16",
"common": "workspace:",
"postcss": "^8.4.32",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.9",
@ -23,8 +25,7 @@
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^5.0.0",
"vite-plugin-svelte-svg": "^2.3.0",
"common": "workspace:"
"vite-plugin-svelte-svg": "^2.3.0"
},
"dependencies": {
"eva-icons": "^1.1.3",

View file

@ -2,12 +2,14 @@
import { currentRoute, type ComponentType } from "./lib/router";
import NotFound from "./lib/routes/NotFound.svelte";
import Home from "./lib/routes/Home.svelte";
import Dump from "./lib/routes/Dump.svelte";
import Portal from "./lib/routes/Portal.svelte";
import Dataset from "./lib/routes/Dataset.svelte";
function chooseComponent(route: ComponentType) {
if (route === "NotFound") return NotFound;
else if (route === "Home") return Home;
else if (route === "Dataset") return Dataset;
else if (route === "Portal") return Portal;
else if (route === "Dump") return Dump;

View file

@ -2,6 +2,7 @@ import navaid, { type Params } from "navaid";
import { writable } from "svelte/store";
export const routes = {
Home: "/",
Dump: "/dump/:dumpUrl",
Portal: "/portal/:portalUrl",
Dataset: "/portal/:portalUrl/dataset/:id",

View file

@ -0,0 +1,44 @@
<script lang="ts">
import { inject } from "regexparam";
import { routes } from "../router";
</script>
<main class="p-2">
<div class="mx-auto rounded-lg border bg-white py-5 px-6 prose">
<h1>Archivo de portales de datos abiertos</h1>
<p>
Esta herramienta permite ver datos en archivos de portales de datos
abiertos de <a
href="https://github.com/catdevnull/transicion-desordenada-diablo/"
rel="noopener">transicion-desordenada-diablo</a
>
(un mejor nombre sería genial), creada en el marco de
<a href="https://bit.ly/CartaDatosAbiertos">un pedido hecho</a> al gobierno
entrante el 10 de diciembre de 2023 por garantizar el mantenimiento de las
políticas de datos públicos en Argentina.
</p>
<div class="not-prose flex place-content-center">
<a
href={inject(routes.Dump, {
dumpUrl: encodeURIComponent(
"https://archivos.nulo.ar/dump-2023-12-08/",
),
})}
class="flex items-center justify-center px-4 py-2 text-xl font-medium text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none text-center"
>
Acceder al archivo creado el 8 de diciembre de 2023
</a>
</div>
<p>
Los archivos y las herramientas fueron creados por
<a href="https://nulo.ar">Nulo</a> con ayuda de varias personas. El código
está disponible
<a
href="https://github.com/catdevnull/transicion-desordenada-diablo/"
rel="noopener">en GitHub</a
>.
</p>
</div>
</main>

View file

@ -4,5 +4,5 @@ export default {
theme: {
extend: {},
},
plugins: [],
plugins: [require("@tailwindcss/typography")],
};

View file

@ -52,6 +52,9 @@ importers:
'@sveltejs/vite-plugin-svelte':
specifier: ^3.0.0
version: 3.0.1(svelte@4.2.8)(vite@5.0.7)
'@tailwindcss/typography':
specifier: ^0.5.10
version: 0.5.10(tailwindcss@3.3.6)
'@tsconfig/svelte':
specifier: ^5.0.2
version: 5.0.2
@ -504,6 +507,18 @@ packages:
- supports-color
dev: true
/@tailwindcss/typography@0.5.10(tailwindcss@3.3.6):
resolution: {integrity: sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==}
peerDependencies:
tailwindcss: '>=3.0.0 || insiders'
dependencies:
lodash.castarray: 4.4.0
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
postcss-selector-parser: 6.0.10
tailwindcss: 3.3.6
dev: true
/@trysound/sax@0.2.0:
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
engines: {node: '>=10.13.0'}
@ -1018,6 +1033,18 @@ packages:
resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==}
dev: true
/lodash.castarray@4.4.0:
resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==}
dev: true
/lodash.isplainobject@4.0.6:
resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}
dev: true
/lodash.merge@4.6.2:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
dev: true
/magic-string@0.27.0:
resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==}
engines: {node: '>=12'}
@ -1240,6 +1267,14 @@ packages:
postcss-selector-parser: 6.0.13
dev: true
/postcss-selector-parser@6.0.10:
resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==}
engines: {node: '>=4'}
dependencies:
cssesc: 3.0.0
util-deprecate: 1.0.2
dev: true
/postcss-selector-parser@6.0.13:
resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==}
engines: {node: '>=4'}