6
6
< meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
7
7
< meta name ="description " content ="Contacto con Tu Barbería - Conéctate a través de Instagram o WhatsApp. ">
8
8
< title > Lopez Barber</ title >
9
+
10
+ <!-- FontAwesome for Icons -->
11
+ < link href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css " rel ="stylesheet ">
12
+
9
13
< style >
10
14
* { margin : 0 ; padding : 0 ; box-sizing : border-box; font-family : 'Poppins' , sans-serif; }
11
15
body {
12
- overflow : hidden;
16
+ overflow : hidden; /* Prevent scroll until content is loaded */
13
17
background : radial-gradient (circle, # 1c3b69, # 2a5579, # 4a90e2, # 5e8db6, # 8abbd4 );
14
18
background-size : 400% 400% ;
15
19
animation : gradientBG 120s ease infinite;
28
32
100% { background-position : 0% 50% ; }
29
33
}
30
34
35
+ /* Custom Logo Spinner */
36
+ .loading-overlay {
37
+ position : fixed;
38
+ top : 0 ;
39
+ left : 0 ;
40
+ width : 100% ;
41
+ height : 100% ;
42
+ background : rgba (0 , 0 , 0 , 1 ); /* Increased opacity to make it darker */
43
+ display : flex;
44
+ justify-content : center;
45
+ align-items : center;
46
+ z-index : 9999 ;
47
+ opacity : 1 ;
48
+ transition : opacity 1s ease;
49
+ }
50
+
51
+ .logo-spinner {
52
+ width : 500px ;
53
+ height : 500px ;
54
+ display : flex;
55
+ justify-content : center;
56
+ align-items : center;
57
+ animation : spin 2s linear infinite, pulse 1.5s ease-in-out infinite;
58
+ }
59
+
60
+ .logo-spinner img {
61
+ max-width : 100% ;
62
+ max-height : 100% ;
63
+ }
64
+
65
+ @keyframes spin {
66
+ 0% { transform : rotate (0deg ); }
67
+ 100% { transform : rotate (360deg ); }
68
+ }
69
+
70
+ @keyframes pulse {
71
+ 0% { transform : scale (1 ); }
72
+ 50% { transform : scale (1.1 ); }
73
+ 100% { transform : scale (1 ); }
74
+ }
75
+
76
+ /* Main Content Styles */
31
77
.container {
32
78
width : 100% ;
33
79
max-width : 800px ;
42
88
flex-direction : column;
43
89
justify-content : center;
44
90
align-items : center;
91
+ opacity : 0 ;
92
+ transition : opacity 1s ease-out;
45
93
}
94
+
46
95
@keyframes fadeIn {
47
96
0% { opacity : 0 ; transform : translateY (50px ); }
48
97
100% { opacity : 1 ; transform : translateY (0 ); }
49
98
}
50
99
100
+ /* Logo at the top of the page */
51
101
.logo-container {
52
- position : absolute;
53
- top : 50% ;
54
- left : 50% ;
55
- transform : translate (-50% , -50% );
56
- animation : moveLogoToPosition 3s ease-out forwards;
57
- z-index : 3 ;
102
+ margin-bottom : 1rem ; /* Reduced space under the logo */
103
+ opacity : 1 ;
58
104
}
105
+
59
106
.logo {
60
107
width : 180px ;
61
- opacity : 0 ;
62
- animation : logoFadeIn 1.5s ease-out 0.5s forwards;
63
- }
64
- @keyframes logoFadeIn {
65
- 0% { opacity : 0 ; transform : scale (4 ); }
66
- 100% { opacity : 1 ; transform : scale (1 ); }
67
- }
68
- @keyframes moveLogoToPosition {
69
- 0% { top : 50% ; left : 50% ; transform : translate (-50% , -50% ) scale (4 ); }
70
- 100% { top : 10px ; left : 50% ; transform : translateX (-50% ) scale (1 ); }
71
108
}
72
109
73
110
h1 {
79
116
color : # FFD700 ;
80
117
animation : slideInFromLeft 1.5s ease-out;
81
118
}
119
+
82
120
@keyframes slideInFromLeft {
83
121
0% { opacity : 0 ; transform : translateX (-100px ); }
84
122
100% { opacity : 1 ; transform : translateX (0 ); }
91
129
opacity : 0 ;
92
130
animation : slideInFromRight 1.5s ease-out 0.5s forwards;
93
131
}
132
+
94
133
@keyframes slideInFromRight {
95
134
0% { opacity : 0 ; transform : translateX (100px ); }
96
135
100% { opacity : 1 ; transform : translateX (0 ); }
103
142
opacity : 0 ;
104
143
animation : fadeInText 2s ease-out 1s forwards;
105
144
}
145
+
106
146
@keyframes fadeInText {
107
147
0% { opacity : 0 ; }
108
148
100% { opacity : 1 ; }
115
155
margin-top : 3rem ;
116
156
flex-wrap : wrap;
117
157
}
158
+
118
159
.social-icon {
119
160
display : flex;
120
161
align-items : center;
127
168
transition : all 0.3s ease;
128
169
background-color : # 333 ;
129
170
}
171
+
130
172
.social-icon i { margin-right : 0.5rem ; }
131
173
.social-icon : hover {
132
174
transform : scale (1.05 );
133
175
box-shadow : 0 5px 15px rgba (0 , 0 , 0 , 0.3 );
134
176
background-color : # ff6a00 ;
135
177
}
178
+
136
179
.social-icon : active { transform : scale (0.95 ); }
137
180
.instagram { background-color : # e1306c ; }
138
181
.whatsapp { background-color : # 25D366 ; }
139
182
140
- .taggbox { margin-top : 2rem ; }
183
+ .taggbox {
184
+ margin-top : 2rem ;
185
+ display : none; /* Hide the widget initially */
186
+ }
141
187
142
188
@media (max-width : 768px ) {
143
189
body {
144
190
font-size : 16px ;
145
191
padding : 0 30px ;
146
192
}
193
+
147
194
.container {
148
195
padding : 2rem ;
149
196
max-width : 100% ;
150
197
}
198
+
151
199
h1 { font-size : 2rem ; }
152
200
h2 { font-size : 1.6rem ; }
153
201
.social-links { flex-direction : column; gap : 1rem ; }
154
202
.social-icon { width : 100% ; font-size : 1.4rem ; }
155
203
}
156
204
</ style >
157
205
158
- < link href ="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Poppins:wght@300;500;700&display=swap " rel ="stylesheet " media ="print " onload ="this.media='all' ">
159
- < link href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css " rel ="stylesheet ">
160
206
</ head >
161
207
< body >
162
208
163
- < div class ="logo-container ">
164
- < img src ="https://myxxdev.github.io/images/LopezBarber.png " alt ="Logo de Tu Barbería " class ="logo " loading ="lazy ">
209
+ <!-- Loading Spinner -->
210
+ < div class ="loading-overlay " id ="loadingOverlay ">
211
+ < div class ="logo-spinner ">
212
+ < img src ="https://myxxdev.github.io/images/LopezBarber.png " alt ="Logo de Tu Barbería " class ="logo " />
213
+ </ div >
165
214
</ div >
166
215
216
+ <!-- Main Content -->
167
217
< div class ="container ">
218
+ <!-- Logo placed here -->
219
+ < div class ="logo-container ">
220
+ < img src ="https://myxxdev.github.io/images/LopezBarber.png " alt ="Logo de Tu Barbería " class ="logo " />
221
+ </ div >
222
+
168
223
< h1 > ¡Conéctate con Tu Barbería!</ h1 >
169
224
< p > Elige tu forma preferida de contactarnos:</ p >
170
225
@@ -177,9 +232,42 @@ <h1>¡Conéctate con Tu Barbería!</h1>
177
232
</ a >
178
233
</ div >
179
234
180
- < div class ="taggbox " style ="width:100%;height:100% " data-widget-id ="2147120 " data-tags ="false "> </ div >
235
+ < div class ="taggbox " id =" taggboxWidget " style ="width:100%; height:100% " data-widget-id ="2147120 " data-tags ="false "> </ div >
181
236
< script src ="https://widget.taggbox.com/embed-lite.min.js " type ="text/javascript "> </ script >
237
+
238
+ <!-- Example Address -->
239
+ < address style ="margin-top: 20px; font-size: 0.9em; ">
240
+ Calle Gran Cardenal< br >
241
+ 29620 Torremolinos< br >
242
+ Málaga, España
243
+ </ address >
182
244
</ div >
183
245
246
+ < script >
247
+ // Function to hide loading spinner after widget loads
248
+ function hideLoadingSpinner ( ) {
249
+ document . getElementById ( 'loadingOverlay' ) . style . opacity = 0 ;
250
+ document . querySelector ( '.taggbox' ) . style . display = 'block' ;
251
+ document . querySelector ( '.container' ) . style . opacity = 1 ; // Show the main content
252
+ setTimeout ( ( ) => {
253
+ document . getElementById ( 'loadingOverlay' ) . style . display = 'none' ;
254
+ } , 1000 ) ; // Wait for the fade-out to complete
255
+ }
256
+
257
+ // Wait for the widget to load
258
+ window . addEventListener ( 'load' , function ( ) {
259
+ setTimeout ( hideLoadingSpinner , 3000 ) ; // Ensure spinner stays for 5 seconds
260
+ } ) ;
261
+
262
+ // Check if widget is ready after script loads
263
+ const interval = setInterval ( ( ) => {
264
+ const taggbox = document . getElementById ( 'taggboxWidget' ) ;
265
+ if ( taggbox && taggbox . children . length > 0 ) {
266
+ hideLoadingSpinner ( ) ;
267
+ clearInterval ( interval ) ;
268
+ }
269
+ } , 500 ) ; // Check every 500ms
270
+ </ script >
271
+
184
272
</ body >
185
273
</ html >
0 commit comments