Skip to content

Commit 5274f91

Browse files
authored
Merge pull request #46 from CodeandoMexico/feat/detalles
Feat/detalles
2 parents 9983166 + 87e4e89 commit 5274f91

7 files changed

Lines changed: 61 additions & 1 deletion

File tree

src/components/Cards/CommunityCard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="border border-cmxyellow p-5 h-[150px] flex justify-between flex-col hover:bg-zinc-100 transition-colors duration-200">
99
<h3 class="text-lg font-bold">{text}</h3>
1010
<img src="/flecha-amarilla.png" class="inline h-[20px] w-[20px]
11-
self-end">
11+
self-end" alt="flecha amarilla">
1212
</div>
1313
</a>
1414
</div>

src/routes/+error.svelte

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script>
2+
import { page } from '$app/stores';
3+
</script>
4+
5+
<div class="container mx-auto py-20">
6+
<div class="w-1/2 p-20 mx-auto w-1/2 mx-auto bg-[url('/grid-bg.png')] bg-cmxyellow text-center" style={`box-shadow: 7px 7px 1px black;`}>
7+
<h1 class="text-5xl font-bold">Error {$page.status}</h1>
8+
<p class="text-lg">{$page.error.message}</p>
9+
</div>
10+
</div>

src/routes/+layout.svelte

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,21 @@
22
import Footer from '@/components/Footer.svelte';
33
import Navbar from '@/components/Navbar.svelte';
44
import '../app.css';
5+
6+
let title = "Codeando México"
7+
let description = "Tecnología cívica y datos para mejorar lo público"
8+
let meta_description = "Generamos nuevas formas de participación ciudadana, abrimos conocimiento e innovamos en el espacio público a través de la tecnología."
9+
let image = "/metaimage.png"
510
</script>
611

12+
<svelte:head>
13+
<title>{title}</title>
14+
<meta name="description" content={meta_description} />
15+
<meta property="og:title" content={title} />
16+
<meta property="og:description" content={meta_description} />
17+
<meta property="og:image" content={image} />
18+
</svelte:head>
19+
720
<Navbar />
821

922
<slot />
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import client from '$lib/apiClient'
2+
import { readSingleton } from '@directus/sdk'
3+
4+
export async function load() {
5+
const aviso = await client.request(readSingleton('aviso_privacidad', {
6+
fields: ['*']
7+
}))
8+
9+
return { aviso }
10+
}
11+
export const prerender = true;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<script>
2+
export let data
3+
const { aviso } = data
4+
const date_updated = processDate(aviso.date_updated)
5+
function processDate(dateObject, locale) {
6+
locale ??= 'es-mx'
7+
console.log(locale)
8+
let formattedDate = new Date(dateObject)
9+
let finalDate = formattedDate.toLocaleString(locale, { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' })
10+
return finalDate
11+
}
12+
console.log(aviso)
13+
</script>
14+
<style>
15+
#aviso ul {
16+
list-style-type: disc !important;
17+
}
18+
</style>
19+
20+
<div id="aviso" class="container mx-auto py-20">
21+
<div class="w-10/12 p-5 mx-auto w-1/2 mx-auto bg-[url('/grid-bg.png')] bg-slate-200 prose" style={`box-shadow: 7px 7px 1px black;`}>
22+
{@html aviso.content}
23+
<p>Ultima actualización: {date_updated}</p>
24+
</div>
25+
</div>
26+

static/favicon.png

16.2 KB
Loading

static/metaimage.png

243 KB
Loading

0 commit comments

Comments
 (0)