@@ -12,9 +12,10 @@ image: /assets/img/posts/Discord_ICPC.png
1212
1313
1414## Mapa de clubes de programación competitiva y Algoritmia de México
15+
1516<div id =" map-container " >
16- <div id =" tooltip " ></div >
17- <object type =" image/svg+xml " data =" /assets/img/posts/Comunidades/mexico-map.svg " id =" mexico-map " ></object >
17+ <div id =" tooltip " ></div >
18+ <object type =" image/svg+xml " data =" /assets/img/posts/Comunidades/mexico-map.svg " id =" mexico-map " ></object >
1819</div >
1920
2021<div id =" info-box " class =" hidden " ></div >
@@ -69,13 +70,11 @@ image: /assets/img/posts/Discord_ICPC.png
6970 margin : 0 auto ;
7071 overflow : hidden ;
7172 }
72-
7373 #map-container object {
7474 width : 100% ;
7575 height : auto ;
7676 display : block ;
7777 }
78-
7978 #info-box {
8079 position : relative ;
8180 /* Change from absolute to relative */
@@ -89,15 +88,12 @@ image: /assets/img/posts/Discord_ICPC.png
8988 box-shadow : 0 2px 5px var (--sidebar-hover-bg );
9089 display : none ;
9190 }
92-
9391 #info-box .hidden {
9492 display : none ;
9593 }
96-
9794 #info-box :not (.hidden ) {
9895 display : block ;
9996 }
100-
10197 #tooltip {
10298 position : fixed ;
10399 background-color : rgba (0 , 0 , 0 , 0.5 );
@@ -106,7 +102,6 @@ image: /assets/img/posts/Discord_ICPC.png
106102 border-radius : 3px ;
107103 font-size : 16px ;
108104 pointer-events : none ;
109- /* Prevent interfering mouse events */
110105 display : none ;
111106 }
112107</style >
@@ -399,7 +394,6 @@ image: /assets/img/posts/Discord_ICPC.png
399394 contacto: [{ email: " mailto:clubpumasmas@gmail.com" , discord: " https://discord.com/invite/bAgCEr4" }],
400395 concurso: [{ concurso_de_la_facultad_de_ciencias: " https://sistemas.fciencias.unam.mx/~acm2014/concursos.html" }]
401396 }
402-
403397 ]
404398 },
405399 " path7327" : { name: " Durango" , clubs: null },
@@ -419,7 +413,6 @@ image: /assets/img/posts/Discord_ICPC.png
419413 Coding_Cup_ITSUR: " https://www.facebook.com/CodingCupITSUR"
420414 }
421415 ]
422-
423416 }
424417 ]
425418 },
@@ -448,7 +441,6 @@ image: /assets/img/posts/Discord_ICPC.png
448441 Campamento_de_Otoño: " https://www.facebook.com/ICBIUAEHOficial/photos/-el-club-de-programaci%C3%B3n-competitiva-te-invita-a-su-campamentolugar-sala-de-usos/1029207925675719/"
449442 }
450443 ]
451-
452444 },
453445 {
454446 club: " Algoritmia Avanzada Y Programación Competitiva (Algoritmia-Acatlan GUAPA)" ,
@@ -510,7 +502,6 @@ image: /assets/img/posts/Discord_ICPC.png
510502 youtube: " https://www.youtube.com/@clubalgoritmiacuceicac6204" ,
511503 google_drive_2023: " https://drive.google.com/drive/folders/19O2Cykuk5HtxvbHT1Ixf1uOR8H3QdS0_" ,
512504 google_drive_2024: " https://drive.google.com/drive/folders/1iV_VFbMpodIqZWTOoqZYBhbsbimjyFtg"
513-
514505 }
515506 ],
516507 contacto: [
@@ -558,7 +549,6 @@ image: /assets/img/posts/Discord_ICPC.png
558549 }
559550 ],
560551 contacto: [{ contactos_notion: " https://sheer-cloudberry-f14.notion.site/e3e3d13bfee74ef8b999077624cebfa3?v=2074c565fca24775adad8ef1ec4603fb" }]
561-
562552 }]
563553 },
564554 " path7387" : {
@@ -570,7 +560,6 @@ image: /assets/img/posts/Discord_ICPC.png
570560 redes: [{ facebook: " https://www.facebook.com/ACMITLAC" }],
571561 contacto: [{ email: " mailto:programacionmichoacan@gmail.com" }],
572562 concurso: [{ Coding_Cup_Michoacán: " https://codingcupmichoacan.org/" }]
573-
574563 }
575564 ]
576565 },
@@ -658,7 +647,6 @@ image: /assets/img/posts/Discord_ICPC.png
658647 estatus: " inactivo" ,
659648 redes: [{ pagina: " https://fic.uas.edu.mx/?page_id=44218" }],
660649 contacto: [{ email: " mailto:club.programacion@info.uas.edu.mx" }]
661-
662650 }
663651 ]
664652 },
@@ -731,7 +719,6 @@ image: /assets/img/posts/Discord_ICPC.png
731719 if (state !== selectedState) {
732720 state .style .fill = hoverColor;
733721 }
734- // Show the tooltip near the cursor
735722 const stateInfo = stateData[state .id ];
736723 if (stateInfo) {
737724 tooltip .textContent = stateInfo .name ;
@@ -740,7 +727,6 @@ image: /assets/img/posts/Discord_ICPC.png
740727 });
741728 state .addEventListener (" mousemove" , (e ) => {
742729 const containerRect = document .getElementById (" map-container" ).getBoundingClientRect ();
743- // Calculate the position relative to the container
744730 const relativeX = e .clientX + containerRect .left ;
745731 const relativeY = e .clientY + containerRect .top ;
746732 tooltip .style .left = ` ${ relativeX + tooltipXoffset} px` ;
@@ -755,7 +741,6 @@ image: /assets/img/posts/Discord_ICPC.png
755741 const selectedStateInfo = stateData[selectedState .id ];
756742 if (selectedStateInfo) {
757743 let clubInfo = " " ;
758-
759744 if (selectedStateInfo .clubs && selectedStateInfo .clubs .length > 0 ) {
760745 selectedStateInfo .clubs .forEach ((club , index ) => {
761746 let redesHTML = club .redes
@@ -764,35 +749,30 @@ image: /assets/img/posts/Discord_ICPC.png
764749 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
765750 ).join (" <br>" )} <br>`
766751 : " " ;
767-
768752 let contactoHTML = club .contacto
769753 ? ` <strong>Contacto:</strong> ${ club .contacto .map (c =>
770754 Object .entries (c).map (([k , v ]) =>
771755 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
772756 ).join (" <br>" )} <br>`
773757 : " " ;
774-
775758 let recursosHTML = club .recursos
776759 ? ` <strong>Recursos:</strong> ${ club .recursos .map (r =>
777760 Object .entries (r).map (([k , v ]) =>
778761 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
779762 ).join (" <br>" )} <br>`
780763 : " " ;
781-
782764 let concursoHTML = club .concurso
783765 ? ` <strong>Concurso:</strong> ${ club .concurso .map (c =>
784766 Object .entries (c).map (([k , v ]) =>
785767 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
786768 ).join (" <br>" )} <br>`
787769 : " " ;
788-
789770 let trainingHTML = club .training_camp
790771 ? ` <strong>Training Camp:</strong> ${ club .training_camp .map (t =>
791772 Object .entries (t).map (([k , v ]) =>
792773 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
793774 ).join (" <br>" )} <br>`
794775 : " " ;
795-
796776 clubInfo += `
797777 <div style="margin-bottom: 1em; border: 1px solid #ddd; padding: 10px; border-radius: 8px;">
798778 <strong>Club ${ index + 1 } :</strong> ${ club .club } <br>
@@ -809,7 +789,6 @@ image: /assets/img/posts/Discord_ICPC.png
809789 } else {
810790 clubInfo = ` <em>Sin clubes conocidos</em>` ;
811791 }
812-
813792 infoBox .innerHTML = `
814793 <strong >Estado:</strong > ${ selectedStateInfo .name } <br ><br >
815794 ${ clubInfo}
@@ -829,7 +808,6 @@ image: /assets/img/posts/Discord_ICPC.png
829808 const stateInfo = stateData[state .id ];
830809 if (stateInfo) {
831810 let clubInfo = " " ;
832-
833811 if (stateInfo .clubs && stateInfo .clubs .length > 0 ) {
834812 stateInfo .clubs .forEach ((club , index ) => {
835813 let redesHTML = club .redes
@@ -838,35 +816,30 @@ image: /assets/img/posts/Discord_ICPC.png
838816 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
839817 ).join (" <br>" )} <br>`
840818 : " " ;
841-
842819 let contactoHTML = club .contacto
843820 ? ` <strong>Contacto:</strong> ${ club .contacto .map (c =>
844821 Object .entries (c).map (([k , v ]) =>
845822 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
846823 ).join (" <br>" )} <br>`
847824 : " " ;
848-
849825 let recursosHTML = club .recursos
850826 ? ` <strong>Recursos:</strong> ${ club .recursos .map (r =>
851827 Object .entries (r).map (([k , v ]) =>
852828 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
853829 ).join (" <br>" )} <br>`
854830 : " " ;
855-
856831 let concursoHTML = club .concurso
857832 ? ` <strong>Concurso:</strong> ${ club .concurso .map (c =>
858833 Object .entries (c).map (([k , v ]) =>
859834 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
860835 ).join (" <br>" )} <br>`
861836 : " " ;
862-
863837 let trainingHTML = club .training_camp
864838 ? ` <strong>Training Camp:</strong> ${ club .training_camp .map (t =>
865839 Object .entries (t).map (([k , v ]) =>
866840 ` <a href="${ v} " target="_blank">${ k} </a>` ).join (" , " )
867841 ).join (" <br>" )} <br>`
868842 : " " ;
869-
870843 clubInfo += `
871844<div style="margin-bottom: 1em; border: 1px solid #ddd; padding: 10px; border-radius: 8px;">
872845<strong>Club ${ index + 1 } :</strong> ${ club .club } <br>
@@ -883,32 +856,28 @@ ${trainingHTML}
883856 } else {
884857 clubInfo = ` <em>Sin clubes conocidos</em>` ;
885858 }
886-
887859 infoBox .innerHTML = `
888860<strong >Estado:</strong > ${ stateInfo .name } <br ><br >
889861${ clubInfo}
890862` ;
891863 }
892-
893864 infoBox .classList .add (" clicked" );
894865 infoBox .classList .remove (" hidden" );
895866 });
896867 });
897868 document .addEventListener (" click" , (e ) => {
898869 const mapContainer = document .getElementById (" map-container" );
899870 const infoBox = document .getElementById (" info-box" );
900-
901871 if (! mapContainer .contains (e .target ) && ! infoBox .contains (e .target )) {
902872 infoBox .classList .add (" hidden" );
903873 infoBox .classList .remove (" clicked" );
904-
905874 if (selectedState) {
906875 selectedState .style .fill = " #b9b9b9" ;
907876 selectedState = null ;
908877 }
909878 }
910879 });
911-
912880 });
913881 });
914882</script >
883+
0 commit comments