Skip to content

Commit

Permalink
Add kmedias to distdata. Fix layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinszy committed Aug 28, 2024
1 parent a94a561 commit 976b0ca
Show file tree
Hide file tree
Showing 2 changed files with 309 additions and 306 deletions.
13 changes: 8 additions & 5 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,19 @@ let pintar = Promise.all([datap,datae,distdata]).then(function(data) {

for (let d in datos) {
if (datos[d].PHOTO_URL) {
listado += `<div style="display: inline-block; width: 300px; float: left;">
<img width="250" src="photos/${datos[d].PHOTO_URL}">
<div style='display: inline-block; background-color: ${datos[d].SKIN_TONE}; width: 70px; height: 100px;'>perla</div>
<div style='display: inline-block; background-color: ${datos[d].DOMINANT}; width: 70px; height: 100px;'>dominante</div>
<div style='display: inline-block; background-color: ${datos[d].TONO_PIEL_KMEDIAS}; width: 70px; height: 100px;'>kmedias</div>
listado += `<div style="display: inline-block; width: 300px; float: left; border: 1px solid #ccc; font-size: 10px">
<div>
<img src="photos/${datos[d].PHOTO_URL}" style="max-height: 250px; max-width: 280px; height: 250px;">
</div>
<div style='display: inline-block; background-color: ${datos[d].SKIN_TONE}; width: 90px; height: 100px;'>perla</div>
<div style='display: inline-block; background-color: ${datos[d].DOMINANT}; width: 90px; height: 100px;'>dominante</div>
<div style='display: inline-block; background-color: ${datos[d].TONO_PIEL_KMEDIAS}; width: 90px; height: 100px;'>kmedias</div>
Distrito ${datos[d].CVEDIS} -
<b>Estado ${datos[d].NOMBRE_ENTIDAD}</b><br>
${datos[d].NOMBRE_DISTRITO_FEDERAL}<br>
[${datos[d].PARTIDO_2024}]
${datos[d].NOMBRE_DIPUTADO_ELECTO_2024}
<br>
<a href="https://www.gobernantes.info/mx/person/${datos[d].ID_PERSON_GOBERNANTES}">Ver en gobernantes</a>
</div>
`
Expand Down
Loading

0 comments on commit 976b0ca

Please sign in to comment.