Skip to content

Commit

Permalink
✨ SEO y arreglos semánticos
Browse files Browse the repository at this point in the history
  • Loading branch information
1cgonza committed Mar 6, 2024
1 parent 75c804c commit 5a4a517
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
3 changes: 2 additions & 1 deletion components/Icono/Descarga.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" id="iconoDescarga" alt="Icono descargar archivo" viewBox="0 0 20 15">
<svg xmlns="http://www.w3.org/2000/svg" id="iconoDescarga" viewBox="0 0 20 15">
<title>Icono descargar archivo</title>
<g transform="matrix(0.029296875 0 0 0.029296875 -4.9941406 -7.5)">
<path
d="M512 666.5L367.2 521.7L403.40002 485.5L486.40002 568.5L486.40002 256L537.60004 256L537.60004 568.5L620.60004 485.5L656.80005 521.7L512 666.5zM307.2 716.8L307.2 768L716.80005 768L716.80005 716.8L307.2 716.8z"
Expand Down
3 changes: 2 additions & 1 deletion components/Icono/Lupa.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<svg viewBox="0 0 32 32" id="lupaImagen" alt="Icono de zoom sobre imagen" stroke="none">
<svg viewBox="0 0 32 32" id="lupaImagen" stroke="none">
<title>Icono de zoom sobre imagen</title>
<polygon points="24 19 21 19 21 16 19 16 19 19 16 19 16 21 19 21 19 24 21 24 21 21 24 21 24 19" />
<path
d="M31,29.5859l-4.6885-4.6884a8.028,8.028,0,1,0-1.414,1.414L29.5859,31ZM20,26a6,6,0,1,1,6-6A6.0066,6.0066,0,0,1,20,26Z"
Expand Down
3 changes: 2 additions & 1 deletion components/Icono/Zoom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ defineProps<Props>();
</script>

<template>
<svg class="iconoZoom" alt="Icono para cambiar el tamaño de la imagen" viewBox="0 0 20 20" stroke="none">
<svg class="iconoZoom" viewBox="0 0 20 20" stroke="none">
<title>Icono para cambiar el tamaño de la imagen</title>
<g transform="matrix(0.8333334 0 0 0.8333334 0 0)">
<path
v-if="vistaCompleta"
Expand Down
15 changes: 14 additions & 1 deletion components/PaginaGeneral.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface Esquema {
const props = defineProps<Props>();
const datos: Ref<DatosPagina | null> = ref(null);
const ruta = useRoute();
const Pagina = gql`
query {
Expand All @@ -37,7 +38,19 @@ query {
const { paginas } = await obtenerDatos<Esquema>(`pagina${props.slug}`, Pagina);
if (paginas.length) {
datos.value = paginas[0];
const datosPagina = paginas[0];
datos.value = datosPagina;
useHead(
elementosCabeza(
{
titulo: datosPagina.titulo,
descripcion: datosPagina.descripcion,
banner: datosPagina.banner,
},
ruta.path
)
);
} else {
throw createError({ statusCode: 404, message: 'Arca en problemas', fatal: true });
}
Expand Down
5 changes: 1 addition & 4 deletions paginas/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ if (esPaginaGeneral) {
}
`;
const { paginas_archivo } = (await obtenerDatos<EsquemaPaginaArchivo>(
`indice${indice}`,
Indice
)) as EsquemaPaginaArchivo;
const { paginas_archivo } = await obtenerDatos<EsquemaPaginaArchivo>(`indice${indice}`, Indice);
const { descripcion, banner, contenido } = paginas_archivo[0];
datos.value = { ...esPaginaArchivo, ...paginas_archivo[0] };
Expand Down

0 comments on commit 5a4a517

Please sign in to comment.