generated from enflujo/enflujo-plantilla-astro
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from enflujo/mostrar-proyctos
😵 Mostrar proyectos
- Loading branch information
Showing
20 changed files
with
9,594 additions
and
315 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+764 Bytes
(100%)
procesador/Listado de proyectos - 60 años dpto antropología0802.xlsx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+165 Bytes
procesador/~$Listado de proyectos - 60 años dpto antropología0802.xlsx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
import ListaNodos from '@/componentes/ListaNodos.astro'; | ||
import listas from '../../estaticos/listas.json'; | ||
--- | ||
|
||
<div id="contenedorListas" class="todoVisible"> | ||
<ListaNodos id="regiones" titulo="Regiones" lista={listas.regiones} /> | ||
<ListaNodos id="tipos" titulo="Categorías" lista={listas.tipos} /> | ||
<ListaNodos id="lideres" titulo="Líderes de Proyectos" lista={listas.lideres} /> | ||
<ListaNodos id="roles" titulo="Roles" lista={listas.roles} /> | ||
<ListaNodos id="participantes" titulo="Participantes" lista={listas.participantes} /> | ||
<ListaNodos id="ramas" titulo="Ramas" lista={listas.ramas} /> | ||
<ListaNodos id="temas" titulo="Temas" lista={listas.temas} /> | ||
<ListaNodos id="objetos" titulo="Objetos" lista={listas.objetos} /> | ||
<ListaNodos id="municipios" titulo="Municipios" lista={listas.municipios} /> | ||
<ListaNodos id="decadas" titulo="Decadas" lista={listas.decadas} /> | ||
</div> | ||
|
||
<script> | ||
const nodos = document.querySelectorAll<HTMLLIElement>('.nodo'); | ||
import { datosFicha } from '@/utilidades/cerebro'; | ||
|
||
nodos.forEach((nodo) => { | ||
const nodosConectados: HTMLLIElement[] = []; | ||
const proyectosConectados: HTMLLIElement[] = []; | ||
const conexiones = nodo.dataset.con?.split(','); | ||
const proyectos = nodo.dataset.proyectos?.split(','); | ||
const contenedor = nodo.parentElement; | ||
|
||
if (proyectos) { | ||
proyectos.forEach((idProyecto) => { | ||
const proyecto = document.getElementById(`proyecto_${idProyecto}`) as HTMLLIElement; | ||
|
||
if (proyecto) { | ||
proyectosConectados.push(proyecto); | ||
} | ||
}); | ||
} | ||
|
||
if (conexiones) { | ||
conexiones.forEach((id) => { | ||
const elemento = document.getElementById(id) as HTMLLIElement; | ||
|
||
//Guardar elementos en lista correspondiente a categoria. | ||
if (elemento) { | ||
nodosConectados.push(elemento); | ||
} | ||
}); | ||
} | ||
|
||
nodo.onmouseenter = () => { | ||
nodosConectados.forEach((nodo) => { | ||
nodo.classList.add('visible', 'explotado'); | ||
}); | ||
|
||
proyectosConectados.forEach((nodo) => { | ||
nodo.classList.add('resaltado'); | ||
}); | ||
|
||
contenedor?.classList.add('mantener'); | ||
nodo.classList.add('visible'); | ||
}; | ||
|
||
nodo.onmouseleave = () => { | ||
nodosConectados.forEach((nodo) => { | ||
nodo.classList.remove('visible', 'explotado'); | ||
}); | ||
|
||
proyectosConectados.forEach((nodo) => { | ||
nodo.classList.remove('resaltado'); | ||
}); | ||
|
||
contenedor?.classList.remove('mantener'); | ||
nodo.classList.remove('visible'); | ||
}; | ||
|
||
nodo.onclick = () => { | ||
const listaElegida = nodo.parentElement; | ||
const titulo = nodo.querySelector<HTMLTitleElement>('.nombre'); | ||
const conteo = nodo.querySelector<HTMLSpanElement>('.conteo'); | ||
|
||
datosFicha.set({ | ||
visible: true, | ||
lista: listaElegida ? listaElegida.dataset.lista : '', | ||
titulo: titulo?.innerText, | ||
conteo: conteo ? conteo.innerText : '' | ||
}); | ||
}; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
import proyectos from '../../estaticos/proyectos.json'; | ||
--- | ||
|
||
<div id="listaProyectos"> | ||
<h2 id="titulo">Proyectos</h2> | ||
|
||
<ul> | ||
{ | ||
proyectos.map((proyecto) => ( | ||
<li id={`proyecto_${proyecto.id}`} class="nodoProyecto" data-id={proyecto.id}> | ||
{proyecto.nombre.nombre} | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
</div> | ||
|
||
<script> | ||
import { datosProyectos, datosFicha } from '@/utilidades/cerebro'; | ||
const nodosProyectos = document.querySelectorAll<HTMLLIElement>('.nodoProyecto'); | ||
const conteoFicha = document.getElementById('conteoFicha') as HTMLDivElement; | ||
|
||
datosProyectos.subscribe((datos) => { | ||
if (!datos.length) return; | ||
|
||
nodosProyectos.forEach((nodoProyecto) => { | ||
// Está muy feito pero por ahora... | ||
// Poner título de proyecto en ficha | ||
|
||
nodoProyecto.onclick = () => { | ||
const contenedorTitulo = document.getElementById('contenedorTitulo') as HTMLDivElement; | ||
contenedorTitulo.style.flexBasis = '100%'; | ||
conteoFicha.style.display = 'none'; | ||
|
||
const id = nodoProyecto.dataset.id; | ||
if (!id) return; | ||
const datosProyecto = datos.find((proyecto) => `${proyecto.id}` === id); | ||
|
||
if (!datosProyecto) return; | ||
|
||
datosFicha.set({ | ||
visible: true, | ||
lista: 'Proyecto', | ||
titulo: datosProyecto.nombre.nombre | ||
}); | ||
}; | ||
}); | ||
}); | ||
</script> |
Oops, something went wrong.