-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
207 lines (178 loc) · 7.72 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exploración Artística</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap">
<style>
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: #f4f4f4;
overflow: hidden;
font-family: 'Open Sans', sans-serif;
}
.container {
position: relative;
width: 100vw;
height: 100vh;
}
img#base-diagram {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: contain;
}
.floating-box {
position: absolute;
padding: 10px;
border-radius: 8px;
transition: opacity 0.3s ease, transform 0.3s ease;
cursor: pointer;
opacity: 0.7;
z-index: 10;
color: #000;
font-size: 16px;
font-weight: 400;
background-color: rgba(255, 255, 255, 0.8);
}
.floating-box:hover {
opacity: 1;
background-color: rgba(255, 255, 255, 0.9);
}
.floating-box img {
width: 500px;
height: auto;
position: absolute;
display: none;
z-index: 100;
max-width: 50vw;
max-height: 50vh;
object-fit: contain;
transition: transform 0.3s ease;
}
.floating-box:hover img {
display: block;
transform: scale(2.5);
box-shadow: 2px 2px 20px 2px rgba(0, 0, 0, 0.6);
}
.line {
stroke: #ff0000;
stroke-width: 2;
fill: none;
}
.intersection {
fill: rgba(255, 0, 0, 0.5); /* Color de relleno con transparencia */
}
</style>
</head>
<body onclick="logCoordinates(event)">
<div class="container">
<img src="mapa.png" id="base-diagram" alt="Diagrama de ML">
<!-- SVG container for the connecting lines -->
<svg class="lines-container" width="100%" height="100%" style="position: absolute; top: 0; left: 0; pointer-events: none;"></svg>
<!-- Floating labels with adjusted positions from the original image -->
<div class="floating-box" style="top: 40%; left: 20%; background-color: #f0f8ff;" data-box="1" onclick="openLink('https://www.youtube.com/watch?v=1xyeEIL5i_0')">
Borges
<img src="thumbnails/borges.png" alt="Borges Image">
</div>
<div class="floating-box" style="top: 35%; left: 65%; background-color: #ffebcd;" data-box="2" onclick="openLink('https://www.youtube.com/watch?v=gA_lfIddqiA')">
Lenguaje Frontera
<img src="thumbnails/lenguajefrontera.png" alt="Lenguaje Frontera Image">
</div>
<div class="floating-box" style="top: 60%; left: 70%; background-color: #e6e6fa;" data-box="3" onclick="openLink('https://karen-pal.github.io/condor_loop/about/')">
Cóndor Loop
<img src="thumbnails/condorloop.png" alt="Condor Loop Image">
</div>
<div class="floating-box" style="top: 50%; left: 30%; background-color: #fffacd;" data-box="4" onclick="openLink('https://link-to-genoma')">
Genoma
<img src="thumbnails/genoma.png" alt="Genoma Image">
</div>
<div class="floating-box" style="top: 25%; left: 75%; background-color: #d3d3d3;" data-box="5" onclick="openLink('https://www.youtube.com/watch?v=LT9od_RYjDo')">
Internet Sur
<img src="thumbnails/internetsur.png" alt="Internet Sur Image">
</div>
<div class="floating-box" style="top: 70%; left: 55%; background-color: #f5f5f5;" data-box="6" onclick="openLink('https://karen-pal.github.io/ser_ser_ser/')">
Ser Ser Ser
<img src="thumbnails/ser-ser-ser.png" alt="Ser Ser Ser Image">
</div>
<div class="floating-box" style="top: 80%; left: 35%; background-color: #fdfd96;" data-box="7" onclick="openLink('https://www.youtube.com/watch?v=edd1f2PWwZk')">
Árbol
<img src="thumbnails/arbol.png" alt="Árbol Image">
</div>
<div class="floating-box" style="top: 28%; left: 14%; background-color: #dcdcdc;" data-box="8" onclick="openLink('https://www.youtube.com/watch?v=edd1f2PWwZk')">
plancondorLoRA
<img src="thumbnails/arbol.png" alt="Árbol Image">
</div>
<div class="floating-box connect" style="top: 28%; left: 53%; background-color: #f0e68c;" data-box="9" onclick="openLink('https://www.youtube.com/watch?v=edd1f2PWwZk')">
plancondorLoRA
<img src="thumbnails/plancondorlora.png" alt="plancondorlora Image">
</div>
<div class="floating-box connect" style="top: 37%; left: 90%; background-color: #e0ffff;" data-box="10" onclick="openLink('https://www.youtube.com/watch?v=edd1f2PWwZk')">
plancondorLoRA
<img src="thumbnails/plancondorlora.png" alt="plancondorlora Image">
</div>
<div class="floating-box connect" style="top: 28%; left: 14%; background-color: #f5deb3;" data-box="11" onclick="openLink('https://www.youtube.com/watch?v=edd1f2PWwZk')">
plancondorLoRA
<img src="thumbnails/plancondorlora.png" alt="plancondorlora Image">
</div>
</div>
<script>
function openLink(url) {
window.location.href = url;
}
function logCoordinates(event) {
const container = document.querySelector('.container');
const rect = container.getBoundingClientRect();
const x = event.clientX - rect.left;
const y = event.clientY - rect.top;
const percentageX = (x / container.offsetWidth) * 100;
const percentageY = (y / container.offsetHeight) * 100;
console.log(`style="top: ${percentageY}%; left: ${percentageX}%"`);
}
function drawConnectingLines() {
const svg = document.querySelector('.lines-container');
const boxes = document.querySelectorAll('.connect');
svg.innerHTML = '';
const points = [];
boxes.forEach((box1) => {
boxes.forEach((box2) => {
if (box1 === box2) return;
const rect1 = box1.getBoundingClientRect();
const rect2 = box2.getBoundingClientRect();
const containerRect = document.querySelector('.container').getBoundingClientRect();
const x1 = rect1.left + rect1.width / 2 - containerRect.left;
const y1 = rect1.top + rect1.height / 2 - containerRect.top;
const x2 = rect2.left + rect2.width / 2 - containerRect.left;
const y2 = rect2.top + rect2.height / 2 - containerRect.top;
points.push({x: x1, y: y1});
points.push({x: x2, y: y2});
const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
line.setAttribute('x1', x1);
line.setAttribute('y1', y1);
line.setAttribute('x2', x2);
line.setAttribute('y2', y2);
line.classList.add('line');
svg.appendChild(line);
});
});
if (points.length > 2) {
const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
const pointsStr = points.map(p => `${p.x},${p.y}`).join(' ');
polygon.setAttribute('points', pointsStr);
polygon.classList.add('intersection');
svg.appendChild(polygon);
}
}
window.onload = drawConnectingLines;
</script>
</body>
</html>