kramp HF Staff commited on
Commit
5fba8c9
·
verified ·
1 Parent(s): ef6e4b6

make it in both French and English

Browse files
Files changed (5) hide show
  1. components/footer.js +2 -2
  2. components/navbar.js +7 -7
  3. index.html +26 -30
  4. script.js +68 -3
  5. style.css +2 -2
components/footer.js CHANGED
@@ -35,8 +35,8 @@ class CustomFooter extends HTMLElement {
35
  <a href="#"><i data-feather="youtube"></i></a>
36
  <a href="#"><i data-feather="music"></i></a>
37
  </div>
38
- <p class="copyright">&copy; ${new Date().getFullYear()} M.e.B. All rights reserved. Made with anger and electricity.</p>
39
- </footer>
40
  `;
41
  }
42
  }
 
35
  <a href="#"><i data-feather="youtube"></i></a>
36
  <a href="#"><i data-feather="music"></i></a>
37
  </div>
38
+ <p class="copyright">&copy; ${new Date().getFullYear()} M.e.B. <span data-translate="rights">All rights reserved. Made with anger and electricity.</span></p>
39
+ </footer>
40
  `;
41
  }
42
  }
components/navbar.js CHANGED
@@ -69,16 +69,16 @@ class CustomNavbar extends HTMLElement {
69
  }
70
  }
71
  </style>
72
- <nav>
73
  <div class="logo">M<span>.e</span>B</div>
74
  <ul>
75
- <li><a href="#home">Home</a></li>
76
- <li><a href="#about">The Band</a></li>
77
- <li><a href="#music">Music</a></li>
78
- <li><a href="#shows">Shows</a></li>
79
- <li><a href="#contact">Contact</a></li>
80
  </ul>
81
- <div class="mobile-menu">
82
  <i data-feather="menu" class="text-white w-8 h-8"></i>
83
  </div>
84
  </nav>
 
69
  }
70
  }
71
  </style>
72
+ <nav>
73
  <div class="logo">M<span>.e</span>B</div>
74
  <ul>
75
+ <li><a href="#home" data-translate="home">Home</a></li>
76
+ <li><a href="#about" data-translate="band">The Band</a></li>
77
+ <li><a href="#music" data-translate="music">Music</a></li>
78
+ <li><a href="#shows" data-translate="shows">Shows</a></li>
79
+ <li><a href="#contact" data-translate="contact">Contact</a></li>
80
  </ul>
81
+ <div class="mobile-menu">
82
  <i data-feather="menu" class="text-white w-8 h-8"></i>
83
  </div>
84
  </nav>
index.html CHANGED
@@ -32,8 +32,8 @@
32
  <section class="relative py-32 px-6 z-10">
33
  <div class="max-w-6xl mx-auto text-center">
34
  <h1 class="text-6xl md:text-8xl font-bold mb-6 tracking-tight">M.e.B</h1>
35
- <p class="text-xl md:text-2xl mb-10 font-mono uppercase">Breaking walls since 2012</p>
36
- <div class="flex justify-center gap-4">
37
  <a href="#shows" class="px-6 py-3 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase tracking-wider">Upcoming Shows</a>
38
  <a href="#music" class="px-6 py-3 border-2 border-white hover:bg-white hover:text-black rounded-md font-bold uppercase tracking-wider">Our Music</a>
39
  </div>
@@ -43,9 +43,8 @@
43
  <!-- About Section -->
44
  <section id="about" class="relative py-20 px-6 z-10 bg-black bg-opacity-80">
45
  <div class="max-w-6xl mx-auto">
46
- <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block">The Band</h2>
47
-
48
- <div class="grid grid-cols-1 md:grid-cols-4 gap-8 mt-12">
49
  <!-- Band Member 1 -->
50
  <div class="text-center">
51
  <div class="w-40 h-40 mx-auto mb-4 overflow-hidden rounded-full border-4 border-red-600">
@@ -88,21 +87,20 @@
88
  </div>
89
 
90
  <div class="mt-16 max-w-3xl mx-auto text-center">
91
- <p class="text-xl leading-relaxed">
92
  M.e.B formed in a basement in 2012 when four angry teenagers decided the world needed more noise.
93
  Since then, we've been tearing up stages across the country with our raw energy and unapologetic sound.
94
  We don't do pretty - we do loud, fast, and in your face.
95
  </p>
96
- </div>
97
  </div>
98
  </section>
99
 
100
  <!-- Music Section -->
101
  <section id="music" class="relative py-20 px-6 z-10">
102
  <div class="max-w-6xl mx-auto">
103
- <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block">Our Noise</h2>
104
-
105
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mt-12">
106
  <!-- Album 1 -->
107
  <div class="bg-black bg-opacity-80 p-6 rounded-lg hover:scale-105 transition-transform">
108
  <div class="mb-4 overflow-hidden rounded-lg">
@@ -115,8 +113,8 @@
115
  <li>Concrete Dreams</li>
116
  <li>Noise Complaint</li>
117
  </ol>
118
- <button class="mt-4 px-4 py-2 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase text-sm">Listen</button>
119
- </div>
120
 
121
  <!-- Album 2 -->
122
  <div class="bg-black bg-opacity-80 p-6 rounded-lg hover:scale-105 transition-transform">
@@ -154,13 +152,12 @@
154
  <!-- Shows Section -->
155
  <section id="shows" class="relative py-20 px-6 z-10 bg-black bg-opacity-80">
156
  <div class="max-w-6xl mx-auto">
157
- <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block">Live & Loud</h2>
158
-
159
- <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mt-12">
160
  <!-- Past Shows -->
161
  <div>
162
- <h3 class="text-2xl font-bold mb-6 text-red-400 uppercase">Past Shows</h3>
163
- <div class="space-y-4">
164
  <div class="border-l-4 border-red-600 pl-4 py-2">
165
  <p class="font-bold">June 15, 2023</p>
166
  <p>The Riot Club, NYC</p>
@@ -181,14 +178,14 @@
181
 
182
  <!-- Upcoming Shows -->
183
  <div>
184
- <h3 class="text-2xl font-bold mb-6 text-red-400 uppercase">Upcoming Shows</h3>
185
- <div class="space-y-4">
186
  <div class="border-l-4 border-red-600 pl-4 py-2">
187
  <p class="font-bold">August 12, 2023</p>
188
  <p>The Basement, Austin</p>
189
  <p class="text-sm text-red-400">Tickets Available</p>
190
- <button class="mt-2 px-3 py-1 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase text-xs">Get Tickets</button>
191
- </div>
192
  <div class="border-l-4 border-red-600 pl-4 py-2">
193
  <p class="font-bold">September 5, 2023</p>
194
  <p>Chaos Factory, Seattle</p>
@@ -210,13 +207,12 @@
210
  <!-- Contact Section -->
211
  <section id="contact" class="relative py-20 px-6 z-10">
212
  <div class="max-w-6xl mx-auto">
213
- <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block">Join The Riot</h2>
214
-
215
- <div class="grid grid-cols-1 md:grid-cols-2 gap-12 mt-12">
216
  <!-- Social Media -->
217
  <div class="bg-black bg-opacity-80 p-8 rounded-lg">
218
- <h3 class="text-2xl font-bold mb-6">Follow The Chaos</h3>
219
- <div class="flex space-x-6">
220
  <a href="#" class="text-white hover:text-red-400 transition-colors">
221
  <i data-feather="facebook" class="w-8 h-8"></i>
222
  </a>
@@ -237,8 +233,8 @@
237
 
238
  <!-- Contact Form -->
239
  <div class="bg-black bg-opacity-80 p-8 rounded-lg">
240
- <h3 class="text-2xl font-bold mb-6">Book Us / Contact</h3>
241
- <form class="space-y-4">
242
  <div>
243
  <label for="name" class="block mb-1">Name</label>
244
  <input type="text" id="name" class="w-full px-4 py-2 bg-gray-800 border border-gray-700 rounded focus:outline-none focus:ring-2 focus:ring-red-600">
@@ -251,8 +247,8 @@
251
  <label for="message" class="block mb-1">Message</label>
252
  <textarea id="message" rows="4" class="w-full px-4 py-2 bg-gray-800 border border-gray-700 rounded focus:outline-none focus:ring-2 focus:ring-red-600"></textarea>
253
  </div>
254
- <button type="submit" class="px-6 py-3 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase tracking-wider">Send</button>
255
- </form>
256
  </div>
257
  </div>
258
  </div>
 
32
  <section class="relative py-32 px-6 z-10">
33
  <div class="max-w-6xl mx-auto text-center">
34
  <h1 class="text-6xl md:text-8xl font-bold mb-6 tracking-tight">M.e.B</h1>
35
+ <p class="text-xl md:text-2xl mb-10 font-mono uppercase" data-translate="tagline">Breaking walls since 2012</p>
36
+ <div class="flex justify-center gap-4">
37
  <a href="#shows" class="px-6 py-3 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase tracking-wider">Upcoming Shows</a>
38
  <a href="#music" class="px-6 py-3 border-2 border-white hover:bg-white hover:text-black rounded-md font-bold uppercase tracking-wider">Our Music</a>
39
  </div>
 
43
  <!-- About Section -->
44
  <section id="about" class="relative py-20 px-6 z-10 bg-black bg-opacity-80">
45
  <div class="max-w-6xl mx-auto">
46
+ <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block" data-translate="band">The Band</h2>
47
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8 mt-12">
 
48
  <!-- Band Member 1 -->
49
  <div class="text-center">
50
  <div class="w-40 h-40 mx-auto mb-4 overflow-hidden rounded-full border-4 border-red-600">
 
87
  </div>
88
 
89
  <div class="mt-16 max-w-3xl mx-auto text-center">
90
+ <p class="text-xl leading-relaxed" data-translate="aboutText">
91
  M.e.B formed in a basement in 2012 when four angry teenagers decided the world needed more noise.
92
  Since then, we've been tearing up stages across the country with our raw energy and unapologetic sound.
93
  We don't do pretty - we do loud, fast, and in your face.
94
  </p>
95
+ </div>
96
  </div>
97
  </section>
98
 
99
  <!-- Music Section -->
100
  <section id="music" class="relative py-20 px-6 z-10">
101
  <div class="max-w-6xl mx-auto">
102
+ <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block" data-translate="music">Our Noise</h2>
103
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mt-12">
 
104
  <!-- Album 1 -->
105
  <div class="bg-black bg-opacity-80 p-6 rounded-lg hover:scale-105 transition-transform">
106
  <div class="mb-4 overflow-hidden rounded-lg">
 
113
  <li>Concrete Dreams</li>
114
  <li>Noise Complaint</li>
115
  </ol>
116
+ <button class="mt-4 px-4 py-2 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase text-sm" data-translate="listen">Listen</button>
117
+ </div>
118
 
119
  <!-- Album 2 -->
120
  <div class="bg-black bg-opacity-80 p-6 rounded-lg hover:scale-105 transition-transform">
 
152
  <!-- Shows Section -->
153
  <section id="shows" class="relative py-20 px-6 z-10 bg-black bg-opacity-80">
154
  <div class="max-w-6xl mx-auto">
155
+ <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block" data-translate="shows">Live & Loud</h2>
156
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mt-12">
 
157
  <!-- Past Shows -->
158
  <div>
159
+ <h3 class="text-2xl font-bold mb-6 text-red-400 uppercase" data-translate="pastShows">Past Shows</h3>
160
+ <div class="space-y-4">
161
  <div class="border-l-4 border-red-600 pl-4 py-2">
162
  <p class="font-bold">June 15, 2023</p>
163
  <p>The Riot Club, NYC</p>
 
178
 
179
  <!-- Upcoming Shows -->
180
  <div>
181
+ <h3 class="text-2xl font-bold mb-6 text-red-400 uppercase" data-translate="upcomingShows">Upcoming Shows</h3>
182
+ <div class="space-y-4">
183
  <div class="border-l-4 border-red-600 pl-4 py-2">
184
  <p class="font-bold">August 12, 2023</p>
185
  <p>The Basement, Austin</p>
186
  <p class="text-sm text-red-400">Tickets Available</p>
187
+ <button class="mt-2 px-3 py-1 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase text-xs" data-translate="tickets">Get Tickets</button>
188
+ </div>
189
  <div class="border-l-4 border-red-600 pl-4 py-2">
190
  <p class="font-bold">September 5, 2023</p>
191
  <p>Chaos Factory, Seattle</p>
 
207
  <!-- Contact Section -->
208
  <section id="contact" class="relative py-20 px-6 z-10">
209
  <div class="max-w-6xl mx-auto">
210
+ <h2 class="text-4xl font-bold mb-12 text-center uppercase border-b-2 border-red-600 pb-4 inline-block" data-translate="contact">Join The Riot</h2>
211
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-12 mt-12">
 
212
  <!-- Social Media -->
213
  <div class="bg-black bg-opacity-80 p-8 rounded-lg">
214
+ <h3 class="text-2xl font-bold mb-6" data-translate="social">Follow The Chaos</h3>
215
+ <div class="flex space-x-6">
216
  <a href="#" class="text-white hover:text-red-400 transition-colors">
217
  <i data-feather="facebook" class="w-8 h-8"></i>
218
  </a>
 
233
 
234
  <!-- Contact Form -->
235
  <div class="bg-black bg-opacity-80 p-8 rounded-lg">
236
+ <h3 class="text-2xl font-bold mb-6" data-translate="contactForm">Book Us / Contact</h3>
237
+ <form class="space-y-4">
238
  <div>
239
  <label for="name" class="block mb-1">Name</label>
240
  <input type="text" id="name" class="w-full px-4 py-2 bg-gray-800 border border-gray-700 rounded focus:outline-none focus:ring-2 focus:ring-red-600">
 
247
  <label for="message" class="block mb-1">Message</label>
248
  <textarea id="message" rows="4" class="w-full px-4 py-2 bg-gray-800 border border-gray-700 rounded focus:outline-none focus:ring-2 focus:ring-red-600"></textarea>
249
  </div>
250
+ <button type="submit" class="px-6 py-3 bg-red-600 hover:bg-red-700 rounded-md font-bold uppercase tracking-wider" data-translate="send">Send</button>
251
+ </form>
252
  </div>
253
  </div>
254
  </div>
script.js CHANGED
@@ -1,9 +1,74 @@
1
- // Initialize feather icons
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  document.addEventListener('DOMContentLoaded', function() {
3
  feather.replace();
4
 
5
- // Smooth scrolling for anchor links
6
- document.querySelectorAll('a[href^="#"]').forEach(anchor => {
 
 
 
 
 
 
 
 
 
 
 
 
7
  anchor.addEventListener('click', function (e) {
8
  e.preventDefault();
9
  document.querySelector(this.getAttribute('href')).scrollIntoView({
 
1
+
2
+ // Translation dictionary
3
+ const translations = {
4
+ en: {
5
+ title: "M.e.B - Punk Rock Revolution",
6
+ tagline: "Breaking walls since 2012",
7
+ band: "The Band",
8
+ aboutText: "M.e.B formed in a basement in 2012 when four angry teenagers decided the world needed more noise. Since then, we've been tearing up stages across the country with our raw energy and unapologetic sound. We don't do pretty - we do loud, fast, and in your face.",
9
+ music: "Our Noise",
10
+ shows: "Live & Loud",
11
+ pastShows: "Past Shows",
12
+ upcomingShows: "Upcoming Shows",
13
+ contact: "Join The Riot",
14
+ social: "Follow The Chaos",
15
+ contactForm: "Book Us / Contact",
16
+ tickets: "Get Tickets",
17
+ listen: "Listen",
18
+ send: "Send",
19
+ language: "Français"
20
+ },
21
+ fr: {
22
+ title: "M.e.B - Révolution Punk Rock",
23
+ tagline: "On casse les murs depuis 2012",
24
+ band: "Le Groupe",
25
+ aboutText: "M.e.B s'est formé dans un sous-sol en 2012 lorsque quatre adolescents en colère ont décidé que le monde avait besoin de plus de bruit. Depuis, nous déchirons les scènes à travers le pays avec notre énergie brute et notre son sans compromis. Nous ne faisons pas dans le joli - nous faisons dans le bruyant, rapide et agressif.",
26
+ music: "Notre Son",
27
+ shows: "En Concert",
28
+ pastShows: "Concerts Passés",
29
+ upcomingShows: "Prochains Concerts",
30
+ contact: "Rejoignez l'Émeute",
31
+ social: "Suivez le Chaos",
32
+ contactForm: "Réservation / Contact",
33
+ tickets: "Billets",
34
+ listen: "Écouter",
35
+ send: "Envoyer",
36
+ language: "English"
37
+ }
38
+ };
39
+
40
+ let currentLanguage = 'en';
41
+
42
+ // Function to update page content
43
+ function updateContent() {
44
+ const lang = translations[currentLanguage];
45
+ document.title = lang.title;
46
+
47
+ // Update text elements
48
+ document.querySelectorAll('[data-translate]').forEach(el => {
49
+ const key = el.getAttribute('data-translate');
50
+ el.textContent = lang[key];
51
+ });
52
+ }
53
+
54
+ // Initialize feather icons and language
55
  document.addEventListener('DOMContentLoaded', function() {
56
  feather.replace();
57
 
58
+ // Language toggle button
59
+ const langBtn = document.createElement('button');
60
+ langBtn.className = 'px-4 py-2 border border-white rounded-md font-bold uppercase text-sm ml-4 hover:bg-white hover:text-black transition-colors';
61
+ langBtn.setAttribute('data-translate', 'language');
62
+ langBtn.addEventListener('click', () => {
63
+ currentLanguage = currentLanguage === 'en' ? 'fr' : 'en';
64
+ updateContent();
65
+ feather.replace();
66
+ });
67
+
68
+ document.querySelector('nav').appendChild(langBtn);
69
+ updateContent();
70
+ // Smooth scrolling for anchor links (keep existing code)
71
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
72
  anchor.addEventListener('click', function (e) {
73
  e.preventDefault();
74
  document.querySelector(this.getAttribute('href')).scrollIntoView({
style.css CHANGED
@@ -1,9 +1,9 @@
1
  /* Custom styles */
2
  @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');
3
-
4
  body {
5
  font-family: 'Roboto Condensed', sans-serif;
6
- min-height: 100vh;
 
7
  }
8
 
9
  /* Custom scrollbar */
 
1
  /* Custom styles */
2
  @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');
 
3
  body {
4
  font-family: 'Roboto Condensed', sans-serif;
5
+ transition: all 0.3s ease;
6
+ min-height: 100vh;
7
  }
8
 
9
  /* Custom scrollbar */