Skip to content

Commit 87e4e89

Browse files
committed
added aviso de privacidad
1 parent 88fdfc8 commit 87e4e89

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

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+

0 commit comments

Comments
 (0)