NeuralFalcon commited on
Commit
b7c43fd
·
verified ·
1 Parent(s): c38f38e

Update white.html

Browse files
Files changed (1) hide show
  1. white.html +297 -0
white.html CHANGED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Italian Brinarot</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
11
+
12
+ body {
13
+ font-family: 'Poppins', sans-serif;
14
+ background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
15
+ }
16
+
17
+ .character-card {
18
+ transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
19
+ perspective: 1000px;
20
+ }
21
+
22
+ .character-card:hover {
23
+ transform: translateY(-8px);
24
+ box-shadow: 0 15px 30px rgba(0,0,0,0.12);
25
+ }
26
+
27
+ .image-container {
28
+ /* REMOVED clip-path: circle(50% at 50% 50%); */
29
+ background: linear-gradient(145deg, #ffffff, #e6e6e6);
30
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
31
+ /* Tailwind classes will handle rounding and overflow */
32
+ }
33
+
34
+ .play-btn {
35
+ transition: all 0.2s ease;
36
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
37
+ }
38
+
39
+ .play-btn:hover {
40
+ transform: translateY(-2px);
41
+ box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
42
+ }
43
+
44
+ .play-btn:active {
45
+ transform: translateY(0);
46
+ }
47
+
48
+ .gradient-text {
49
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
50
+ -webkit-background-clip: text;
51
+ background-clip: text;
52
+ color: transparent;
53
+ }
54
+
55
+ .header-divider {
56
+ height: 4px;
57
+ background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
58
+ }
59
+
60
+ @media (max-width: 640px) {
61
+ .character-name {
62
+ font-size: 1rem;
63
+ }
64
+ }
65
+ </style>
66
+ </head>
67
+ <body class="min-h-screen">
68
+ <div class="container mx-auto px-4 py-8">
69
+ <!-- Header -->
70
+ <header class="text-center mb-12">
71
+ <h1 class="text-4xl md:text-5xl font-bold gradient-text mb-2">Italian Brinarot</h1>
72
+ <div class="header-divider w-32 mx-auto rounded-full mb-6"></div>
73
+ <p class="text-gray-600 max-w-2xl mx-auto">Discover the magical sounds of Italian Brinarot characters</p>
74
+ </header>
75
+
76
+ <!-- Character Grid -->
77
+ <div id="characterGrid" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8"></div>
78
+ </div>
79
+
80
+ <!-- Embedded Character Data -->
81
+ <script>
82
+ const characterData = {
83
+ "Bombardiro Crocodilo": {
84
+ "image_path": "./assets/Bombardiro_Crocodilo.png",
85
+ "audio_path": "./assets/Bombardiro_Crocodilo.wav"
86
+ },
87
+ "Tralalero Tralala": {
88
+ "image_path": "./assets/Tralalero_Tralala.png",
89
+ "audio_path": "./assets/Tralalero_Tralala.wav"
90
+ },
91
+ "Bombombini Gusini": {
92
+ "image_path": "./assets/Bombombini_Gusini.png",
93
+ "audio_path": "./assets/Bombombini_Gusini.wav"
94
+ },
95
+ "Tung Tung Tung Tung Tung Tung Tung Tung Tung Sahur": {
96
+ "image_path": "./assets/Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Sahur.png",
97
+ "audio_path": "./assets/Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Tung_Sahur.wav"
98
+ },
99
+ "Brr Brr Patapim": {
100
+ "image_path": "./assets/Brr_Brr_Patapim.png",
101
+ "audio_path": "./assets/Brr_Brr_Patapim.wav"
102
+ },
103
+ "Cappuccino Assassino": {
104
+ "image_path": "./assets/Cappuccino_Assassino.png",
105
+ "audio_path": "./assets/Cappuccino_Assassino.wav"
106
+ },
107
+ "Lirili Larila": {
108
+ "image_path": "./assets/Lirili_Larila.png",
109
+ "audio_path": "./assets/Lirili_Larila.wav"
110
+ },
111
+ "Trulimero Trulichina": {
112
+ "image_path": "./assets/Trulimero_Trulichina.png",
113
+ "audio_path": "./assets/Trulimero_Trulichina.wav"
114
+ },
115
+ "Boneca Ambalabu": {
116
+ "image_path": "./assets/Boneca_Ambalabu.png",
117
+ "audio_path": "./assets/Boneca_Ambalabu.wav"
118
+ },
119
+ "Chimpanzini Bananini": {
120
+ "image_path": "./assets/Chimpanzini_Bananini.png",
121
+ "audio_path": "./assets/Chimpanzini_Bananini.wav"
122
+ },
123
+ "Bananita Dolfinita": {
124
+ "image_path": "./assets/Bananita_Dolfinita.png",
125
+ "audio_path": "./assets/Bananita_Dolfinita.wav"
126
+ },
127
+ "Bluberini Octopusini": {
128
+ "image_path": "./assets/Bluberini_Octopusini.png",
129
+ "audio_path": "./assets/Bluberini_Octopusini.wav"
130
+ },
131
+ "Bobrito Bandito": {
132
+ "image_path": "./assets/Bobrito_Bandito.png",
133
+ "audio_path": "./assets/Bobrito_Bandito.wav"
134
+ },
135
+ "Brri Brri Bicus Dicus": {
136
+ "image_path": "./assets/Brri_Brri_Bicus_Dicus.png",
137
+ "audio_path": "./assets/Brri_Brri_Bicus_Dicus.wav"
138
+ },
139
+ "Burbaloni Luliloli": {
140
+ "image_path": "./assets/Burbaloni_Luliloli.png",
141
+ "audio_path": "./assets/Burbaloni_Luliloli.wav"
142
+ },
143
+ "Chimpanzini Annasini": {
144
+ "image_path": "./assets/Chimpanzini_Annasini.png",
145
+ "audio_path": "./assets/Chimpanzini_Annasini.wav"
146
+ },
147
+ "Chimpanzini Cocosini": {
148
+ "image_path": "./assets/Chimpanzini_Cocosini.png",
149
+ "audio_path": "./assets/Chimpanzini_Cocosini.wav"
150
+ },
151
+ "Cocofanto Elefanto": {
152
+ "image_path": "./assets/Cocofanto_Elefanto.png",
153
+ "audio_path": "./assets/Cocofanto_Elefanto.wav"
154
+ },
155
+ "Frigo Camelo Buffardello": {
156
+ "image_path": "./assets/frigo_camelo_buffardello.png",
157
+ "audio_path": "./assets/frigo_camelo_buffardello.wav"
158
+ },
159
+ "Giraffe Celeste": {
160
+ "image_path": "./assets/Giraffe_Celeste.png",
161
+ "audio_path": "./assets/Giraffe_Celeste.wav"
162
+ },
163
+ "Glorbo Fruttodrillo": {
164
+ "image_path": "./assets/Glorbo_Fruttodrillo.png",
165
+ "audio_path": "./assets/Glorbo_Fruttodrillo.wav"
166
+ },
167
+ "Il Cacto Hipopotoma": {
168
+ "image_path": "./assets/il_cacto_hipopotoma.png",
169
+ "audio_path": "./assets/il_cacto_hipopotoma.wav"
170
+ },
171
+ "Trippi Troppi Troppa Trippa": {
172
+ "image_path": "./assets/Trippi_Troppi_Troppa_Trippa.png",
173
+ "audio_path": "./assets/Trippi_Troppi_Troppa_Trippa.wav"
174
+ }
175
+ };
176
+
177
+ // Function to load and display characters
178
+ function loadCharacters() {
179
+ const characterGrid = document.getElementById('characterGrid');
180
+
181
+ // Clear any existing content
182
+ characterGrid.innerHTML = '';
183
+
184
+ // Create cards for each character
185
+ Object.entries(characterData).forEach(([name, data]) => {
186
+ const card = document.createElement('div');
187
+ card.className = 'character-card bg-white rounded-2xl overflow-hidden shadow-md flex flex-col items-center p-6';
188
+
189
+ // Image container - **MODIFIED** for square with rounded corners
190
+ const imageContainer = document.createElement('div');
191
+ // Added rounded-xl (you can change this) and overflow-hidden
192
+ imageContainer.className = 'image-container mb-4 w-40 h-40 flex items-center justify-center rounded-2xl overflow-hidden'; // <-- MODIFIED LINE
193
+
194
+ const image = document.createElement('img');
195
+ image.src = data.image_path.replace(/\\/g, '/');
196
+ image.alt = name;
197
+ image.className = 'w-full h-full object-cover'; // object-cover ensures the image fills the square container
198
+ imageContainer.appendChild(image);
199
+
200
+ // Character name
201
+ const nameElement = document.createElement('h3');
202
+ nameElement.className = 'character-name text-lg md:text-xl font-semibold text-gray-800 mb-3 text-center';
203
+ nameElement.textContent = name;
204
+
205
+ // Play/Pause button
206
+ const playButton = document.createElement('button');
207
+ // **MODIFIED** - Adjusted button gradient for better contrast/look (Optional)
208
+ playButton.className = 'play-btn text-white font-medium py-2 px-6 rounded-full flex items-center';
209
+
210
+ const playIcon = document.createElement('i');
211
+ playIcon.className = 'fas fa-play mr-2';
212
+
213
+ playButton.appendChild(playIcon);
214
+ playButton.appendChild(document.createTextNode('Play'));
215
+
216
+ // Audio element
217
+ const audio = new Audio(data.audio_path.replace(/\\/g, '/'));
218
+ let isPlaying = false;
219
+
220
+ // Keep track of all audios and buttons to manage pause state
221
+ let currentAudio = null;
222
+ let currentButton = null;
223
+
224
+ // Play/Pause button click handler - **REVISED** for better pause handling
225
+ playButton.addEventListener('click', () => {
226
+ // Stop any other audio that might be playing
227
+ document.querySelectorAll('audio').forEach(a => {
228
+ if (a !== audio && !a.paused) {
229
+ a.pause();
230
+ // Reset the button associated with that audio
231
+ const relatedButton = a.nextElementSibling; // Assuming button is the next sibling
232
+ if (relatedButton && relatedButton.classList.contains('play-btn')) {
233
+ relatedButton.innerHTML = '<i class="fas fa-play mr-2"></i>Play';
234
+ relatedButton.style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'; // Reset background
235
+ // Find the 'isPlaying' state for that audio (more complex, simplified here)
236
+ }
237
+ }
238
+ });
239
+ // Find *all* buttons and reset their state visually if they aren't the current one
240
+ document.querySelectorAll('.play-btn').forEach(btn => {
241
+ if (btn !== playButton && !btn.previousElementSibling.paused) { // Check if audio associated with *other* button is playing
242
+ // This part is tricky without a direct link; the logic below handles the active one better.
243
+ } else if (btn !== playButton) {
244
+ btn.innerHTML = '<i class="fas fa-play mr-2"></i>Play';
245
+ btn.style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)';
246
+ }
247
+ });
248
+
249
+
250
+ if (isPlaying) {
251
+ audio.pause();
252
+ playButton.innerHTML = '<i class="fas fa-play mr-2"></i>Play';
253
+ playButton.style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'; // Reset background
254
+ isPlaying = false;
255
+ currentAudio = null;
256
+ currentButton = null;
257
+ } else {
258
+ audio.currentTime = 0;
259
+ audio.play();
260
+ playButton.innerHTML = '<i class="fas fa-pause mr-2"></i>Pause';
261
+ playButton.style.background = '#ef4444'; // Example: Red background for pause state
262
+ isPlaying = true;
263
+ currentAudio = audio;
264
+ currentButton = playButton;
265
+ }
266
+ });
267
+
268
+ // When audio ends, reset button
269
+ audio.addEventListener('ended', () => {
270
+ playButton.innerHTML = '<i class="fas fa-play mr-2"></i>Play';
271
+ playButton.style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'; // Reset background
272
+ isPlaying = false;
273
+ currentAudio = null;
274
+ currentButton = null;
275
+ });
276
+
277
+ // Assemble the card
278
+ card.appendChild(imageContainer);
279
+ card.appendChild(nameElement);
280
+ card.appendChild(audio); // Keep audio in DOM for easier access if needed, hide it
281
+ audio.style.display = 'none';
282
+ card.appendChild(playButton);
283
+
284
+
285
+ // Add card to the grid
286
+ characterGrid.appendChild(card);
287
+ });
288
+
289
+ // Improved pause handling: Add a global listener if needed, or rely on the button click logic above.
290
+ // The revised click handler above should now pause other audios when a new one is played.
291
+ }
292
+
293
+ // Load characters when the page loads
294
+ window.addEventListener('DOMContentLoaded', loadCharacters);
295
+ </script>
296
+ </body>
297
+ </html>