-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1017 lines (845 loc) · 45.9 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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto&family=Unica+One&display=swap" rel="stylesheet">
<!-- Primary Meta Tags -->
<title>Presto.it</title>
<meta name="title" content="Presto.it">
<meta name="description" content="Sito clone del famoso Subito.it creato con l'utilizzo di Bootstrap 5 e Vanilla JS">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://lorenzoalu.github.io/project_clone_presto_subito/">
<meta property="og:title" content="Presto.it">
<meta property="og:description" content="Sito clone del famoso Subito.it creato con l'utilizzo di Bootstrap 5 e Vanilla JS">
<meta property="og:image" content="./media/preview.jpg">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://lorenzoalu.github.io/project_clone_presto_subito/">
<meta property="twitter:title" content="Presto.it">
<meta property="twitter:description" content="Sito clone del famoso Subito.it creato con l'utilizzo di Bootstrap 5 e Vanilla JS">
<meta property="twitter:image" content="./media/preview.jpg">
</head>
<body>
<!-- nav bar cazzi amari -->
<nav id="navbar" class="navbar navbar-expand-lg navbar-light fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="./index.html">
<img id="logo" width="50px" alt="logo "></a>
<button id="signbtn" type="button" class="btn mx-2 d-block d-md-none" data-bs-toggle="modal"
data-bs-target="#modal-custom">
<i class=" fas fa-user "></i>
</button>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor01"
aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="./index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./schedaprodotto.html">Esplora Articoli </a>
</li>
<li class="nav-item">
<a class="nav-link" href="./inserisciannuncio.html">Inserisci Annuncio </a>
</li>
<li class="nav-item">
<a class="nav-link" href="./registrati.html">Registrati </a>
</li>
<li class="nav-item">
<a class="nav-link" href="./areariservata.html">Area Riservata </a>
</li>
</ul>
<button id="signbtn1" type="button" class="btn btn-accedi mx-2 d-none d-md-block "
data-bs-toggle="modal" data-bs-target="#modal-custom">
Accedi
</button>
</div>
</div>
</nav>
<!-- header -->
<header class="container-fluid">
<div class="row align-items-center h-75 pt-md-5 pt-0 mt-2 ">
<div class="col-12 z-class ">
<img src="./media/logo.png" class="py-3 my-5 d-block mx-auto logo-header" alt="">
</div>
<span class="skewedOne"></span>
<span class="skewedTwo"></span>
<div class="col-12 justify-content-center d-flex align-items-center h-25 pt-5 mt-2">
<div class="row search-bar d-flex justify-content-center align-items-center bg-white z-class ">
<div class="col-1"></div>
<div class="col-12 col-md-3">
<div class="form-group">
<label for="ricerca">Cosa cerchi scemo?</label>
<input type="text" class="form-control" id="ricerca" placeholder="cerca cerca qua">
</div>
</div>
<div class="col-12 col-md-3 ">
<div class="form-group">
<label for="categorydropdown">seleziona la categoria</label>
<select id="categorydropdown" class="form-control">
<option selected>dimmi dimmi dai </option>
<option>Motori</option>
<option>Abbigliamento</option>
<option>Elettronica</option>
<option>Sport</option>
<option>Babbi</option>
<option>Musica</option>
</select>
</div>
</div>
<div class="col-12 col-md-3">
<div class="form-group">
<label for="where">Dove lo cerchi??</label>
<input type="text" class="form-control" id="where" placeholder="inserisci la tua regione">
</div>
</div>
<div class="col-12 col-md-1">
<button class="btn btn-outline-light bg-secondary-color red-lent-nav mt-2 w-100"
type="submit"><a class="red-lent-nav text-decoration-none" href="./schedaprodotto.html">
<i class="fas fa-search d-none d-md-block"></i>
<p class="text-white d-block d-md-none"> Cerca.</p>
</a>
</button>
</div>
<div class="col-1"></div>
</div>
</div>
</div>
</header>
<!-- <section class="container-fluid bg-secondary-color d-flex justify-content-center align-items-center bg-secondary-color py-5">
</section> -->
<!-- carte skills -->
<section class="container-fluid bg-secondary-color pb-5 ">
<div class="row justify-content-center">
<div class="col-12 col-md-6 col-lg-3 d-flex justify-content-center my-2 py-5">
<div class="card-main-page">
<div class="card-mp-content">
<h1 class="card-text-size">
<span class="enclosed"><i class="fas fa-car"></i></span>Motori
</h1>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-3 d-flex justify-content-center my-2 py-5">
<div class="card-main-page">
<div class="card-mp-content">
<h1 class="card-text-size">
<span class="enclosed"><i class="fas fa-comment-dollar"></i></span>Market
</h1>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-3 d-flex justify-content-center my-2 py-5">
<div class="card-main-page">
<div class="card-mp-content">
<h1 class="card-text-size">
<span class="enclosed"><i class="fas fa-briefcase"></i></span>Lavoro
</h1>
</div>
</div>
</div>
<div class="col-12 col-md-6 col-lg-3 d-flex justify-content-center my-2 py-5">
<div class="card-main-page">
<div class="card-mp-content">
<h1 class="card-text-size">
<span class="enclosed"><i class="fas fa-check"></i></span>Vendi
</h1>
</div>
</div>
</div>
</div>
</section>
<!-- section 1 -->
<section class="container-fluid">
<div class="row">
<h2 class="pt-5 text-center text-white bg-secondary-color mb-0">Nuovi Annunci Inseriti</h2>
<ul id="wrapperMain" class="nav nav-pills mb-3 mt-0 d-flex justify-content-evenly bg-secondary-color pt-5"
id="pills-tab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active text-white" id="motori-tab" data-bs-toggle="pill"
data-bs-target="#motori" type="button" role="tab" aria-controls="motori" aria-selected="true">
<i class="fas fa-car"></i>
<p class="d-none d-md-block"> motori</p>
</button>
</li>
</ul>
<div id="wrapperSecond" class="tab-content bg-white" id="pills-tabContent">
<div class="tab-pane fade show active" id="motori" role="tabpanel">
<div class="row justify-content-evenly mx-0 ">
<!-- carta motori 1 -->
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"> <i class="fas fa-car"></i> Motori </p>
<a class="btn-custom d-flex justify-content-center"
href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<!-- carta motori 2 -->
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"> <i class="fas fa-car"></i> Motori </p>
<a class="btn-custom d-flex justify-content-center"
href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<!-- carta motori 3 -->
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"> <i class="fas fa-car"></i> Motori </p>
<a class="btn-custom d-flex justify-content-center"
href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<!-- carta motori 4 -->
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"> <i class="fas fa-car"></i> Motori </p>
<a class="btn-custom d-flex justify-content-center"
href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<!-- carta motori 5 -->
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"> <i class="fas fa-car"></i> Motori </p>
<a class="btn-custom d-flex justify-content-center"
href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<!-- carta motori 6 -->
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"> <i class="fas fa-car"></i> Motori </p>
<a class="btn-custom d-flex justify-content-center"
href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- carta -->
<!-- <div class="col-6 col-md-3 d-flex justify-content-center">
<div class="card-custom " style="width: 18rem;">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text">Descrizione annuccio </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go there!</span></a>
</div>
</div>
</div> -->
<!-- presentzione azienda -->
<section class="container-fluid bg-white my-5">
<div class="row justify-content-center align-items-center">
<div class="col-11 ">
<h3 class="secondary-color">Lorem Ipsum</h3>
</div>
<div class="col-12 col-md-6 order-md-last my-5">
<img src="https://picsum.photos/300/200" class="box-custom mx-auto img-fluid d-block"
alt="immagine azienda">
</div>
<div class="col-12 col-md-5 py-5">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Explicabo ipsum ipsa nihil tempore,
veritatis, modi totam ducimus consectetur distinctio debitis consequatur. Rerum voluptatem illum
pariatur? Maxime est qui assumenda voluptas?</p>
</div>
</div>
</section>
<!-- sezione js figo -->
<section class="container-fluid bg-white my-5 pb-5">
<div class="row justify-content-center align-items-center">
<div class="col-11 ">
<h3 class="secondary-color text-end">Perchè usare Subito.it?</h3>
</div>
<div
class="col-12 col-md-6 mt-2 mt-md-0 background-circle d-flex justify-content-center align-items-center">
<div class="opener">
<img src="./media/logo_only_red.png" width="50px" alt="">
</div>
<div id='card-1-opener' class="circle">
<i class="fas fa-money-check-alt"></i>
</div>
<div id='card-2-opener' class="circle">
<i class="fas fa-dollar-sign"></i>
</div>
<div id='card-3-opener' class="circle">
<i class="fas fa-shopping-cart"></i>
</div>
<div id='card-4-opener' class="circle">
<i class="fas fa-ad"></i>
</div>
<div class="card-custom-test-1 ">
<img src="./media/card.png" class="mx-auto img-fluid d-block " width="120px" alt="">
<div class="d-flex align-items-center ">
<p class=" secondary-color small my-auto ">
<span class="secondary-color first-letter">P</span>aga in tutta sicurezza
</p>
</div>
</div>
<div class="card-custom-test-2 ">
<img src="./media/money.png" class="mx-auto d-block img-fluid" width="120px" alt="">
<div class="d-flex align-items-center ">
<p class="secondary-color small mx-auto pt-3">
<span class="secondary-color first-letter">F</span>ai crescere i tuoi guadagni
</p>
</div>
</div>
<div class="card-custom-test-3 ">
<div class="d-flex align-items-center ">
<p class="secondary-color small my-auto">
<span class="secondary-color first-letter">A</span>cquisti sicuri
</p>
</div>
<img src="./media/shopping.png" class="ms-auto img-fluid d-block" width="110px" alt="">
</div>
<div class="card-custom-test-4 ">
<img src="./media/market.png" class="mx-auto img-fluid d-block mb-3" width="120px" alt="">
<div class="">
<p class="secondary-color small">
<span class="secondary-color first-letter pt-4">A</span>cquisti sicuri ovunque tu voglia
</p>
</div>
</div>
</div>
<div class="col-12 col-md-5 py-5">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Explicabo ipsum ipsa nihil tempore,
veritatis, modi totam ducimus consectetur distinctio debitis consequatur. Rerum voluptatem illum
pariatur? Maxime est qui assumenda voluptas?</p>
</div>
</div>
</section>
<!-- form iscriviti e ottieni tutti i vantaggi -->
<section class="container-fluid">
<div class="row justify-content-center align-items-center mt-5">
<div class="col-md-6 col-11 text-center ">
<h3 class="secondary-color mb-5"> Registrati adesso, Mona!</h3>
<form action="">
<div class="form-floating ">
<input type="email" class="form-control" id="floatingInput" placeholder="[email protected]">
<label for="floatingInput"> La tua Mail</label>
</div>
<div class="form-floating my-3">
<input type="text" class="form-control" id="floatingname" placeholder="Il tuo nome">
<label for="floatingname">Il tuo nome </label>
</div>
<div class="form-floating">
<select class="form-select" id="floatingScelta" aria-label="Floating label select example">
<option selected>Non specifico</option>
<option value="1">Vendere</option>
<option value="2">Comprare</option>
<option value="3">Entrambi</option>
</select>
<label for="floatingScelta">Cosa vuoi fare?</label>
</div>
<button class="my-5 text-white bg-secondary-color w-100 rounded-1 text-uppercase py-3">
<h3>Registrati </h3>
</button>
</form>
</div>
</div>
</section>
<!-- footer -->
<section class="container-fluid py-5 bg-secondary-color text-white">
<div class="row justify-content-evenly">
<div class="col-12">
<img src="./media/logo-w.png" width="70px" alt="logo sito">
<h2>Lorem</h2>
</div>
<div class="col-12 col-md-6">
<h3>Info legali</h3>
<p class="small">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quis ex sunt recusandae quod
cupiditate porro explicabo impedit dolores quia reprehenderit! Id, est praesentium iure
exercitationem ullam dolore et provident distinctio?</p>
</div>
<div class="col-12 col-md-6 d-flex justify-content-center align-items-center d-none d-lg-flex">
<button class="btn-social">
<div class="links">
<a href="" class="button-4-box">
<i class="fab fa-facebook-f facebook"></i>
</a>
<a href="" class="button-4-box">
<i class="fab fa-google google"></i>
</a>
<a href="" class="button-4-box">
<i class="fab fa-instagram instagram"></i>
</a>
<a href="" class="button-4-box ">
<i class="fab fa-twitter twitter"></i>
</a>
</div>
<span>
Social!
</span>
</button>
</div>
<div class="col-12 col-md-6 d-flex justify-content-around align-items-center d-flex d-lg-none my-3">
<a href="">
<i class="text-white fab fa-facebook-f"></i>
</a>
<a href="">
<i class="text-white fab fa-instagram"></i>
</a>
<a href="">
<i class="text-white fab fa-linkedin"></i>
</a>
<a href="">
<i class="text-white fab fa-twitter"></i>
</a>
</div>
<!-- mappa di google -->
<!-- <div class="col-8 my-3 mx-auto d-block">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3727.362372823569!2d10.513726931685625!3d44.552881572474874!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x478006e1127e7097%3A0x26079b0d15993d91!2s42034%20Ciolla%20RE!5e0!3m2!1sit!2sit!4v1614032329810!5m2!1sit!2sit" width="100%" height="300" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
</div> -->
</div>
</section>
<!-- modale per login -->
<section class="container-fluid">
<div class="row ">
<div class="modal fade" id="modal-custom" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<form class="login modal-content ">
<div class="d-flex justify-content-end">
<button type="button" class="btn-close " data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div>
<img src="./media/logo.png" width="50px" class="img-fluid mx-auto d-block" alt="">
</div>
<input class="input-login" type="text" placeholder="Username">
<input class="input-login" type="password" placeholder="Password">
<div>
<button class="btn-login"><a href="">Login</a> </button>
<button class="btn-signup ms-2">
<a href="./registrati.html"> Sing Up</a>
</button>
</div>
</form>
</div>
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/4ff5c0a70f.js" crossorigin="anonymous"></script>
<script src="./main.js"></script>
<script>
const categories = [["arredamento", "fas fa-home"], ["elettronica", "fas fa-laptop"], ["giardinaggio", "fas fa-cannabis"], ["hobby", "fas fa-gamepad"], ["immobili", "fas fa-igloo"], ["musica", "fas fa-music"], ["sport", "fas fa-futbol"]]
const categoriesWrapper = document.querySelector('#wrapperMain')
categories.forEach(el => {
let li = document.createElement("li")
li.classList.add("nav-item")
li.innerHTML =
`
<button class="nav-link text-white" id="${el[0]}-tab" data-bs-toggle="pill"
data-bs-target="#${el[0]}" type="button" role="tab" aria-controls="${el[0]}"
aria-selected="false">
<i class="${el[1]}"></i>
<p class="d-none d-md-block"> ${el[0]}</p>
</button>
`
categoriesWrapper.appendChild(li)
})
const categoriesWrapperSecond = document.querySelector('#wrapperSecond')
categories.forEach(el => {
let div = document.createElement("div")
div.classList.add("tab-pane", "fade", "show")
div.id = `${el[0]}`
div.innerHTML =
`
<div class="row justify-content-evenly mx-0 ">
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"><i class="${el[1]}"></i> ${el[0]} </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"><i class="${el[1]}"></i> ${el[0]} </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"><i class="${el[1]}"></i> ${el[0]} </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"><i class="${el[1]}"></i> ${el[0]} </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"><i class="${el[1]}"></i> ${el[0]} </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
<div class="col-12 col-md-2 my-2 d-flex justify-content-center">
<div class="card-custom ">
<img src="https://picsum.photos/300/200" class="card-img-top" alt="immagine prodotto">
<div class="card-body">
<h5 class="card-title">Nome annuncio</h5>
<p class="card-text"><i class="${el[1]}"></i> ${el[0]} </p>
<a class="btn-custom d-flex justify-content-center" href="./descrizioneprodotto.html">
<span class="btn-custom-icon">
<i class="fas fa-chevron-right"></i></i>
</span><span> Go!</span></a>
</div>
</div>
</div>
</div>
`
categoriesWrapperSecond.appendChild(div)
})
let opener = document.querySelector(".opener");
let circle = document.querySelectorAll(".circle");
let card1 = document.querySelector(".card-custom-test-1");
let card2 = document.querySelector(".card-custom-test-2");
let card3 = document.querySelector(".card-custom-test-3");
let card4 = document.querySelector(".card-custom-test-4");
let card1opened = document.querySelector("#card-1-opener");
let card2opened = document.querySelector("#card-2-opener");
let card3opened = document.querySelector("#card-3-opener");
let card4opened = document.querySelector("#card-4-opener");
console.log(card3)
let opened = false;
let cardOpen1 = false;
let cardOpen2 = false;
let cardOpen3 = false;
let cardOpen4 = false;
let dimensio = innerWidth;
opener.addEventListener('click', () => {
if (opened == false) {
circle.forEach((el, i) => {
el.style.transform = `rotate(-${i * 360 / circle.length}deg) translate(${(dimensio * 100) / dimensio}px) rotate(${i * 360 / circle.length}deg)`
})
opened = !opened;
//tutti sono cliccabili all'inizio
//quando clicchi su uno, gli altri non sono cliccabili
card1opened.addEventListener('click', () => {
if (cardOpen1 == false) {
card1opened.style.transform = `translate(128px)`
card1opened.style.border = '2px solid var(--secondary-color)'
card1.style.opacity = '1';
cardOpen1 = !cardOpen1;
card2opened.style.opacity = "0"
card2opened.style.visibility = "hidden"
card3opened.style.opacity = "0"
card3opened.style.visibility = "hidden"
card4opened.style.opacity = "0"
card4opened.style.visibility = "hidden"
opener.style.opacity = "0"
opener.style.visibility = "hidden"
} else {
card1opened.style.transform = `translate(100px)`
card1opened.style.border = 'none'
card1.style.opacity = '0';
card2opened.style.opacity = "1"
card2opened.style.visibility = "visible"
card3opened.style.opacity = "1"
card3opened.style.visibility = "visible"
card4opened.style.opacity = "1"
card4opened.style.visibility = "visible"
opener.style.opacity = "1"
opener.style.visibility = "visible"
cardOpen1 = !cardOpen1;
}
})
card2opened.addEventListener('click', () => {
if (cardOpen2 == false) {
card2opened.style.transform = `translatey(-128px)`
card2opened.style.border = '2px solid var(--secondary-color)'
card2.style.opacity = '1';
cardOpen2 = !cardOpen2;
card1opened.style.opacity = "0";
card1opened.style.visibility = "hidden"
card3opened.style.opacity = "0";
card3opened.style.visibility = "hidden"
card4opened.style.opacity = "0";
card4opened.style.visibility = "hidden"
opener.style.opacity = "0";
opener.style.visibility = "hidden"
} else {
card2opened.style.transform = `translatey(-100px)`
card2opened.style.border = 'none'
card2.style.opacity = '0';
card1opened.style.opacity = "1";
card1opened.style.visibility = "visible"
card3opened.style.opacity = "1";
card3opened.style.visibility = "visible"
card4opened.style.opacity = "1";
card4opened.style.visibility = "visible"
opener.style.opacity = "1";
opener.style.visibility = "visible"
cardOpen2 = !cardOpen2;
}
})
card3opened.addEventListener('click', () => {
if (cardOpen3 == false) {
card3opened.style.transform = `translate(-128px)`
card3opened.style.border = '2px solid var(--secondary-color)'
card3.style.opacity = '1';
cardOpen3 = !cardOpen3;
card1opened.style.opacity = "0";
card1opened.style.visibility = "hidden"
card2opened.style.opacity = "0";
card2opened.style.visibility = "hidden"
card4opened.style.opacity = "0";
card4opened.style.visibility = "hidden"
opener.style.opacity = "0";
opener.style.visibility = "hidden"
} else {
card3opened.style.transform = `translate(-100px)`
card3opened.style.border = 'none'
card3.style.opacity = '0';
card1opened.style.opacity = "1";
card1opened.style.visibility = "visible"
card2opened.style.opacity = "1";
card2opened.style.visibility = "visible"
card4opened.style.opacity = "1";
card4opened.style.visibility = "visible"
opener.style.opacity = "1";
opener.style.visibility = "visible"
cardOpen3 = !cardOpen3;
}
})
card4opened.addEventListener('click', () => {
if (cardOpen4 == false) {
card4.style.opacity = '1';
cardOpen4 = !cardOpen4;
card1opened.style.opacity = "0";
card1opened.style.visibility = "hidden"
card2opened.style.opacity = "0";
card2opened.style.visibility = "hidden"
card3opened.style.opacity = "0";
card3opened.style.visibility = "hidden"
opener.style.opacity = "0";
opener.style.visibility = "hidden"
} else {
card4.style.opacity = '0';
card1opened.style.opacity = "1";
card1opened.style.visibility = "visible"
card2opened.style.opacity = "1";
card2opened.style.visibility = "visible"
card3opened.style.opacity = "1";
card3opened.style.visibility = "visible"
opener.style.opacity = "1";
opener.style.visibility = "visible"
cardOpen4 = !cardOpen4;
}
})
} else {
circle.forEach((el, i) => {
el.style.transform = `rotate(${360 / circle.length}deg) translate(0px) rotate(${i * 360 / circle.length}deg)`
})
opened = !opened;
card1opened.addEventListener('click', () => {
if (cardOpen1 == false) {
card1opened.style.transform = `translate(128px)`
card1opened.style.border = '2px solid var(--secondary-color)'
card1.style.opacity = '1';
cardOpen1 = !cardOpen1;
card2opened.style.opacity = "0"
card2opened.style.visibility = "hidden"
card3opened.style.opacity = "0"
card3opened.style.visibility = "hidden"
card4opened.style.opacity = "0"
card4opened.style.visibility = "hidden"
opener.style.opacity = "0"
opener.style.visibility = "hidden"
} else {
card1opened.style.transform = `translate(100px)`
card1opened.style.border = 'none'
card1.style.opacity = '0';
card2opened.style.opacity = "1"
card2opened.style.visibility = "visible"
card3opened.style.opacity = "1"
card3opened.style.visibility = "visible"
card4opened.style.opacity = "1"
card4opened.style.visibility = "visible"
opener.style.opacity = "1"
opener.style.visibility = "visible"
cardOpen1 = !cardOpen1;
}
})
card2opened.addEventListener('click', () => {
if (cardOpen2 == false) {
card2opened.style.transform = `translatey(-128px)`
card2opened.style.border = '2px solid var(--secondary-color)'
card2.style.opacity = '1';
cardOpen2 = !cardOpen2;
card1opened.style.opacity = "0";
card1opened.style.visibility = "hidden"
card3opened.style.opacity = "0";
card3opened.style.visibility = "hidden"
card4opened.style.opacity = "0";
card4opened.style.visibility = "hidden"
opener.style.opacity = "0";
opener.style.visibility = "hidden"
} else {
card2opened.style.transform = `translatey(-100px)`
card2opened.style.border = 'none'
card2.style.opacity = '0';
card1opened.style.opacity = "1";
card1opened.style.visibility = "visible"
card3opened.style.opacity = "1";
card3opened.style.visibility = "visible"
card4opened.style.opacity = "1";
card4opened.style.visibility = "visible"
opener.style.opacity = "1";
opener.style.visibility = "visible"
cardOpen2 = !cardOpen2;
}
})
card3opened.addEventListener('click', () => {
if (cardOpen3 == false) {
card3opened.style.transform = `translate(-128px)`
card3opened.style.border = '2px solid var(--secondary-color)'
card3.style.opacity = '1';
cardOpen3 = !cardOpen3;
card1opened.style.opacity = "0";
card1opened.style.visibility = "hidden"
card2opened.style.opacity = "0";
card2opened.style.visibility = "hidden"
card4opened.style.opacity = "0";
card4opened.style.visibility = "hidden"
opener.style.opacity = "0";
opener.style.visibility = "hidden"
} else {
card3opened.style.transform = `translate(-100px)`
card3opened.style.border = 'none'
card3.style.opacity = '0';
card1opened.style.opacity = "1";
card1opened.style.visibility = "visible"
card2opened.style.opacity = "1";
card2opened.style.visibility = "visible"
card4opened.style.opacity = "1";
card4opened.style.visibility = "visible"
opener.style.opacity = "1";
opener.style.visibility = "visible"
cardOpen3 = !cardOpen3;
}
})
card4opened.addEventListener('click', () => {
if (cardOpen4 == false) {
card4.style.opacity = '1';
cardOpen4 = !cardOpen4;
card1opened.style.opacity = "0";
card1opened.style.visibility = "hidden"
card2opened.style.opacity = "0";
card2opened.style.visibility = "hidden"
card3opened.style.opacity = "0";
card3opened.style.visibility = "hidden"
opener.style.opacity = "0";
opener.style.visibility = "hidden"
} else {
card4.style.opacity = '0';
card1opened.style.opacity = "1";
card1opened.style.visibility = "visible"
card2opened.style.opacity = "1";
card2opened.style.visibility = "visible"
card3opened.style.opacity = "1";
card3opened.style.visibility = "visible"
opener.style.opacity = "1";
opener.style.visibility = "visible"
cardOpen4 = !cardOpen4;
}
})