ajout du spinner (chargement)
davvalent

davvalent commited on 2023-03-22 05:36:54
Showing 2 changed files, with 52 additions and 2 deletions.

... ...
@@ -39,7 +39,6 @@ header h1 {
39 39
 }
40 40
 .popup-fixed {
41 41
   position: fixed;
42
-  top: 0 !important;
43 42
   right: auto !important;
44 43
   bottom: auto !important;
45 44
   left: 0 !important;
... ...
@@ -55,9 +54,13 @@ header h1 {
55 54
 .popup-fixed .leaflet-popup-tip-container {
56 55
     display: none;
57 56
 }
57
+.leaflet-popup-content-wrapper,
58
+.leaflet-popup-tip {
59
+	box-shadow: 3px 10px 14px rgba(0,0,0,0.4);
60
+}
58 61
 .leaflet-popup-content {
59 62
   width: 100% !important;
60
-    height: 100vh;
63
+  height: calc(100vh - 40px);
61 64
   margin: 0;
62 65
 }
63 66
 .leaflet-fade-anim .leaflet-popup {
... ...
@@ -67,6 +70,43 @@ header h1 {
67 70
 	  transition: none;
68 71
 }
69 72
 
73
+#loader {
74
+  position: absolute;
75
+  inset: 0;
76
+  background: rgba(255, 255, 255);
77
+/*  transition: all 0.075s ease-in-out;*/
78
+  display: block;
79
+  z-index: 500;
80
+  text-align: center;
81
+}
82
+#loader p {
83
+  position: relative;
84
+  top: 40%;
85
+  font-size: x-large;
86
+}
87
+.spinner {
88
+  border: 5px solid #575757;
89
+  border-radius: 50%;
90
+  border-top: 5px solid #fff;
91
+  width: 40px;
92
+  height: 40px;
93
+  -webkit-animation: spin 1s linear infinite; /* Safari */
94
+  animation: spin 1s linear infinite;
95
+  top: 35%;
96
+  margin: auto;
97
+  position: relative;
98
+}
99
+/* Safari */
100
+@-webkit-keyframes spin {
101
+  0% { -webkit-transform: rotate(0deg); }
102
+  100% { -webkit-transform: rotate(360deg); }
103
+}
104
+
105
+@keyframes spin {
106
+  0% { transform: rotate(0deg); }
107
+  100% { transform: rotate(360deg); }
108
+}
109
+
70 110
 /* glide.js + RDF */
71 111
 /*
72 112
 .glide {
... ...
@@ -146,6 +146,12 @@
146 146
           }
147 147
           
148 148
           const popUpInformation = `
149
+
150
+          <div id="loader">
151
+              <div class="spinner"></div>
152
+              <p>Chargement</p>
153
+            </div>
154
+
149 155
             <div class="glide">
150 156
 
151 157
               <div class="glide__track" data-glide-el="track">
... ...
@@ -216,6 +222,10 @@
216 222
 
217 223
             glide.mount();
218 224
 
225
+            let loader = document.querySelector("#loader");
226
+
227
+            loader.style.display = "none";
228
+
219 229
           }, 1000);
220 230
         },
221 231
         (reason) => {
222 232