-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
369 lines (308 loc) · 12.8 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>probador</title>
<!-- Forbid resize on pinch with IOS Safari: -->
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
/>
<!-- INCLUDE MAIN SCRIPT: -->
<script src="dist/JeelizVTOWidget.js"></script>
<!-- For icons adjust fame or resize canvas -->
<!-- <script
defer
src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"
></script> -->
<!-- Font for the header only: -->
<!-- <link
href="https://fonts.googleapis.com/css?family=Roboto+Condensed"
rel="stylesheet"
/> -->
<!-- font awesome cdn link -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
/>
<!-- main stylesheet: -->
<link rel="stylesheet" href="css/JeelizVTOWidget.css" />
<script>
let _isResized = false;
function test_resizeCanvas() {
// reduce a la mitad la altura:
let halfHeightPx = Math.round(window.innerHeight / 2).toString() + "px";
const domWidget = document.getElementById("JeelizVTOWidget");
domWidget.style.maxHeight = _isResized ? "none" : halfHeightPx;
_isResized = !_isResized;
}
function get_initialSKU() {
// mira si se proporciona un SKU como parámetros de URL:
const queryString = window.location.search;
const URLParams = new URLSearchParams(queryString);
const sku = URLParams.get("sku") || "polaroid_6003_black_grey";
console.log("Initial SKU =", sku);
return sku;
}
function get_isShadow() {
const queryString = window.location.search;
const URLParams = new URLSearchParams(queryString);
return URLParams.get("isHideShadow") ? false : true;
}
// entry point:
function main() {
JEELIZVTOWIDGET.start({
isShadow: get_isShadow(),
sku: get_initialSKU(),
searchImageMask:
"https://appstatic.jeeliz.com/jeewidget/images/target.png",
searchImageColor: 0xeeeeee,
callbackReady: function () {
console.log("INFO: Listoo :)");
// agregue un LUT para cambiar la representación de video:
//JEELIZVTOWIDGET.set_LUT('images/LUTs/LUTGrayscale.png');
//JEELIZVTOWIDGET.set_LUT('images/LUTs/LUTImprove.jpg');
},
onError: function (errorLabel) {
// esta función detecta errores, por lo que puede mostrar mensajes integrados personalizados
alert("An error happened. errorLabel =" + errorLabel);
switch (errorLabel) {
case "WEBCAM_UNAVAILABLE":
// El usuario no tiene cámara, o no quiere compartirlo.
break;
case "NOFILE":
// el usuario envía una imagen, pero no está aquí
break;
case "WRONGFILEFORMAT":
// el usuario carga un archivo que no es una imagen o está dañado
break;
case "INVALID_SKU":
// el SKU proporcionado no coincide con un modelo de anteojos
break;
case "FALLBACK_UNAVAILABLE":
// no podemos cambiar al modo de carga de archivos. Navegador demasiado viejo?
break;
case "PLACEHOLDER_NULL_WIDTH":
case "PLACEHOLDER_NULL_HEIGHT":
// Algo está mal con el marcador de posición
// (element whose id='JeelizVTOWidget')
break;
case "FATAL":
default:
// ocurre un pequeño error :(
break;
} // end switch
}, // end onError()
}); // end JEELIZVTOWIDGET.start call
} // end main()
function load_modelBySKU() {
const sku = prompt(
"Ingrese un SKU de modelo de anteojos:",
"rayban_wayfarer_havane_marron"
);
if (sku) {
JEELIZVTOWIDGET.load(sku);
}
}
</script>
<!-- custom js file link -->
<script src="js/script.js" defer></script>
</head>
<body onload="main()">
<!-- header section starts -->
<header class="header">
<a href="home.html" class="logo"> LOGO </a>
<nav class="navbar">
<ul>
<li><a href="home.html">inicio</a></li>
<li><a href="products.html">productos</a></li>
<li>
<a href="#">lo nuevo +</a>
<ul>
<li><a href="index.html">prueba virtual</a></li>
<li><a href="blogs.html">blogs</a></li>
</ul>
</li>
<li><a href="contact.html">contacto</a></li>
<li>
<a href="#">cuenta +</a>
<ul>
<li><a href="login.html">acceso</a></li>
<li><a href="register.html">registro</a></li>
</ul>
</li>
</ul>
</nav>
<div class="icons">
<div id="menu-btn" class="fas fa-bars"></div>
<div id="search-btn" class="fas fa-search"></div>
<a href="cart.html" class="fas fa-shopping-cart"></a>
</div>
<form action="" class="search-form">
<input
type="search"
name=""
placeholder="buscar"
id="search-box"
/>
<label for="search-box" class="fas fa-search"></label>
</form>
</header>
<!-- header section ends -->
<!-- header section -->
<section class="heading">
<h1>probador virtual</h1>
<p><a href="home.html">inicio</a> >> prueba</p>
</section>
<!-- header section -->
<section class="about">
<h1 class="title">¡Pruébatelos ahora!</h1>
<div class="row">
<div class='contents'>
<!-- Mantenga los mismos ID de elementos para que JEELIZVTOWIDGET pueda extraerlos del DOM -->
<!-- COMENZAR JEELIZVTOWIDGET -->
<!--
div con id='JeelizVTOWidget' es el marcador de posición
debe dimensionarlo y colocarlo de acuerdo con el lugar donde debería estar el widget VTO
si lo redimensionas, el widget se redimensionará automáticamente
-->
<div id='JeelizVTOWidget'>
<!-- MAIN CANVAS: -->
<!--
canvas con id='JeelizVTOWidgetCanvas' es el lienzo donde se representará el widget VTO
debe tener la posición del atributo CSS: absoluta para que se pueda cambiar el tamaño sin
cambiar el tamaño total del marcador de posición
-->
<canvas id='JeelizVTOWidgetCanvas'></canvas>
<div class='JeelizVTOWidgetControls JeelizVTOWidgetControlsTop'>
<!-- BOTÓN DE AJUSTE: -->
<button id='JeelizVTOWidgetAdjust'>
<div class="buttonIcon"><i class="fas fa-arrows-alt"></i></div>Ajustar
</button>
<!-- BOTÓN DE CAMBIO DE TAMAÑO DEL WIDGET: -->
<button id='buttonResizeCanvas' onclick='test_resizeCanvas();'>
<div class="buttonIcon"><i class="fas fa-sync-alt"></i></div>Cambiar tamaño
</button>
</div>
<!-- BOTONES DE CAMBIO DE MODELO: -->
<!-- <div class='JeelizVTOWidgetControls' id='JeelizVTOWidgetChangeModelContainer'>
<button onclick="JEELIZVTOWIDGET.load('polaroid_6003_black_grey')">NEGRO</button>
<button onclick="JEELIZVTOWIDGET.load('polaroid_6003_blue_grey')">AZUL</button>
<button onclick="JEELIZVTOWIDGET.load('polaroid_6003_havana_brown')">ANIMAL P.</button>
<button onclick="load_modelBySKU()">by SKU</button>
</div> -->
<!-- COMENZAR AJUSTAR AVISO -->
<div id='JeelizVTOWidgetAdjustNotice'>
Mueve las gafas para ajustarlas.
<button class='JeelizVTOWidgetBottomButton' id='JeelizVTOWidgetAdjustExit'>Salir</button>
</div>
<!-- AVISO DE FIN DE AJUSTE -->
<!-- COMENZAR A CARGAR WIDGET (no modelo) -->
<!-- <div id='JeelizVTOWidgetLoading'>
<div class='JeelizVTOWidgetLoadingText'>
Cargando...
</div>
</div> -->
<!-- END LOADING -->
</div>
</div>
<!-- <div class="image">
<img src="images/product-1.jpg" alt="" />
</div> -->
<div class="box">
<div class="image">
<div class="icons">
<a href="products.html" class="fas fa-shopping-cart"></a>
<a href="#" class="fas fa-share"></a>
<a href="index.html" class="fas fa-eye"></a>
</div>
<img src="images/product1.jpg" alt="" />
</div>
<div class="content">
<h3>selecciona un color para probar</h3>
<div class='JeelizVTOWidgetControls' id='JeelizVTOWidgetChangeModelContainer'>
<button onclick="JEELIZVTOWIDGET.load('polaroid_6003_black_grey')"><img src="images/product1.jpg" alt="" /></button>
<button onclick="JEELIZVTOWIDGET.load('polaroid_6003_blue_grey')"><img src="images/product1-Azul.jpg" alt="" /></button>
<button onclick="JEELIZVTOWIDGET.load('polaroid_6003_havana_brown')"><img src="images/Product1-Animal.jpg" alt="" /></button>
<!-- <button onclick="load_modelBySKU()">by SKU</button> -->
</div>
<div class="price">$20,000 <span>$25,000</span></div>
</div>
</div>
</div>
<div class="icons-container">
<div class="icons">
<img src="images/icon-1.png" alt="" />
<h3>todos los tamaños</h3>
</div>
<div class="icons">
<img src="images/icon-2.png" alt="" />
<h3>entrega gratis</h3>
</div>
<div class="icons">
<img src="images/icon-3.png" alt="" />
<h3>devolución facil</h3>
</div>
<div class="icons">
<img src="images/icon-4.png" alt="" />
<h3>pago fácil</h3>
</div>
<div class="icons">
<img src="images/icon-5.png" alt="" />
<h3>soporte 24/7</h3>
</div>
</div>
</section>
<!-- footer section starts -->
<section class="footer">
<div class="box-container">
<div class="box">
<h3>enlaces rápidos</h3>
<a href="home.html"> <i class="fas fa-angle-right"></i> inicio</a>
<a href="products.html">
<i class="fas fa-angle-right"></i> productos</a
>
<a href="index.html"> <i class="fas fa-angle-right"></i> prueba virtual</a>
<a href="blogs.html"> <i class="fas fa-angle-right"></i> blogs</a>
<a href="contact.html"> <i class="fas fa-angle-right"></i> contacto</a>
<a href="login.html"> <i class="fas fa-angle-right"></i> acceso</a>
<a href="register.html">
<i class="fas fa-angle-right"></i> registro</a
>
<a href="cart.html"> <i class="fas fa-angle-right"></i> carrito </a>
</div>
<div class="box">
<h3>extras</h3>
<a href="#"> <i class="fas fa-angle-right"></i> mi cuenta </a>
<a href="#"> <i class="fas fa-angle-right"></i> mi pedido </a>
<a href="#"> <i class="fas fa-angle-right"></i> mi lista de deseos </a>
<a href="#"> <i class="fas fa-angle-right"></i> condiciones de uso </a>
<a href="#"> <i class="fas fa-angle-right"></i> política De Privacidad </a>
</div>
<div class="box">
<h3>¡seguinos!</h3>
<a href="#"> <i class="fab fa-facebook-f"></i> facebook </a>
<a href="#"> <i class="fab fa-twitter"></i> twitter </a>
<a href="#"> <i class="fab fa-instagram"></i> instagram </a>
<a href="#"> <i class="fab fa-pinterest"></i> pinterest </a>
<a href="#"> <i class="fab fa-linkedin"></i> linkedin </a>
<a href="#"> <i class="fab fa-github"></i> github </a>
</div>
<div class="box">
<h3>boletín informativo</h3>
<p>Suscríbete Para Recibir Las Últimas Actualizaciones</p>
<form action="">
<input type="email" placeholder="ingresa tu correo electrónico" />
<input type="submit" value="subscribir" class="btn" />
</form>
</div>
</div>
<div class="credit">
creado por <span>Joaquín Cavarzan</span> | todos los derechos reservados
</div>
</section>
<!-- footer section ends -->
</body>
</html>