C50BARZ commited on
Commit
f6ec6c1
Β·
verified Β·
1 Parent(s): 7f227a1

Wiki creating connections between generations of people by demystifying their real experience and explain about new language trends etc

Browse files
Files changed (5) hide show
  1. README.md +8 -5
  2. components/navbar.js +274 -0
  3. index.html +190 -19
  4. script.js +429 -0
  5. style.css +80 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Generation Bridge Wiki
3
- emoji: πŸš€
4
- colorFrom: indigo
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Generation Bridge Wiki πŸŒ‰
3
+ colorFrom: green
4
+ colorTo: purple
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/navbar.js ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ this.isMenuOpen = false;
5
+ }
6
+
7
+ connectedCallback() {
8
+ this.attachShadow({ mode: 'open' });
9
+ this.render();
10
+ this.setupEventListeners();
11
+ }
12
+
13
+ render() {
14
+ this.shadowRoot.innerHTML = `
15
+ <style>
16
+ :host {
17
+ display: block;
18
+ position: fixed;
19
+ top: 0;
20
+ left: 0;
21
+ right: 0;
22
+ z-index: 50;
23
+ }
24
+
25
+ .navbar {
26
+ background: rgba(15, 23, 42, 0.8);
27
+ backdrop-filter: blur(20px);
28
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
29
+ transition: all 0.3s ease;
30
+ }
31
+
32
+ .navbar.scrolled {
33
+ background: rgba(15, 23, 42, 0.95);
34
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
35
+ }
36
+
37
+ .nav-container {
38
+ max-width: 1200px;
39
+ margin: 0 auto;
40
+ padding: 0 1rem;
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: space-between;
44
+ height: 80px;
45
+ }
46
+
47
+ .logo {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 0.75rem;
51
+ font-size: 1.5rem;
52
+ font-weight: bold;
53
+ color: white;
54
+ text-decoration: none;
55
+ transition: transform 0.3s ease;
56
+ }
57
+
58
+ .logo:hover {
59
+ transform: scale(1.05);
60
+ }
61
+
62
+ .logo-icon {
63
+ width: 2.5rem;
64
+ height: 2.5rem;
65
+ background: linear-gradient(135deg, #a855f7, #db2777);
66
+ border-radius: 50%;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ }
71
+
72
+ .nav-links {
73
+ display: flex;
74
+ gap: 2rem;
75
+ align-items: center;
76
+ }
77
+
78
+ .nav-link {
79
+ color: #d1d5db;
80
+ text-decoration: none;
81
+ font-weight: 500;
82
+ transition: all 0.3s ease;
83
+ cursor: pointer;
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 0.5rem;
87
+ }
88
+
89
+ .nav-link:hover {
90
+ color: #c084fc;
91
+ transform: translateY(-2px);
92
+ }
93
+
94
+ .mobile-menu-btn {
95
+ display: none;
96
+ background: none;
97
+ border: none;
98
+ color: white;
99
+ cursor: pointer;
100
+ padding: 0.5rem;
101
+ border-radius: 0.5rem;
102
+ transition: background 0.3s ease;
103
+ }
104
+
105
+ .mobile-menu-btn:hover {
106
+ background: rgba(255, 255, 255, 0.1);
107
+ }
108
+
109
+ @media (max-width: 768px) {
110
+ .nav-links {
111
+ position: fixed;
112
+ top: 80px;
113
+ left: -100%;
114
+ width: 100%;
115
+ height: calc(100vh - 80px);
116
+ background: rgba(15, 23, 42, 0.98);
117
+ flex-direction: column;
118
+ padding: 2rem;
119
+ transition: left 0.3s ease;
120
+ backdrop-filter: blur(20px);
121
+ }
122
+
123
+ .nav-links.active {
124
+ left: 0;
125
+ }
126
+
127
+ .mobile-menu-btn {
128
+ display: block;
129
+ }
130
+
131
+ .nav-link {
132
+ width: 100%;
133
+ padding: 1rem;
134
+ border-radius: 0.75rem;
135
+ justify-content: center;
136
+ }
137
+
138
+ .nav-link:hover {
139
+ background: rgba(168, 85, 247, 0.2);
140
+ }
141
+ }
142
+
143
+ .live-indicator {
144
+ display: inline-flex;
145
+ align-items: center;
146
+ gap: 0.5rem;
147
+ background: rgba(34, 197, 94, 0.2);
148
+ color: #22c55e;
149
+ padding: 0.25rem 0.75rem;
150
+ border-radius: 9999px;
151
+ font-size: 0.75rem;
152
+ font-weight: bold;
153
+ border: 1px solid rgba(34, 197, 94, 0.3);
154
+ }
155
+
156
+ .pulse-dot {
157
+ width: 8px;
158
+ height: 8px;
159
+ background: #22c55e;
160
+ border-radius: 50%;
161
+ animation: pulse 2s infinite;
162
+ }
163
+
164
+ @keyframes pulse {
165
+ 0% { transform: scale(1); opacity: 1; }
166
+ 50% { transform: scale(1.2); opacity: 0.7; }
167
+ 100% { transform: scale(1); opacity: 1; }
168
+ }
169
+
170
+ .submit-btn {
171
+ background: linear-gradient(135deg, #a855f7, #db2777);
172
+ color: white;
173
+ padding: 0.5rem 1.5rem;
174
+ border-radius: 0.75rem;
175
+ font-weight: bold;
176
+ transition: all 0.3s ease;
177
+ }
178
+
179
+ .submit-btn:hover {
180
+ transform: scale(1.05);
181
+ box-shadow: 0 10px 25px rgba(168, 85, 247, 0.4);
182
+ }
183
+ </style>
184
+
185
+ <nav class="navbar" id="navbar">
186
+ <div class="nav-container">
187
+ <a href="#" class="logo" data-action="home">
188
+ <div class="logo-icon">πŸŒ‰</div>
189
+ <span>GenBridge</span>
190
+ </a>
191
+
192
+ <div class="nav-links" id="navLinks">
193
+ <a href="#" class="nav-link" data-action="home">
194
+ <i data-feather="home"></i>
195
+ Home
196
+ </a>
197
+ <a href="#" class="nav-link" data-action="search">
198
+ <i data-feather="search"></i>
199
+ Search
200
+ </a>
201
+ <a href="#" class="nav-link" data-action="stories">
202
+ <i data-feather="book-open"></i>
203
+ Stories
204
+ </a>
205
+ <a href="#" class="nav-link" data-action="about">
206
+ <i data-feather="info"></i>
207
+ About
208
+ </a>
209
+
210
+ <div class="live-indicator">
211
+ <div class="pulse-dot"></div>
212
+ <span>LIVE</span>
213
+ </div>
214
+
215
+ <a href="#" class="nav-link submit-btn" data-action="submit">
216
+ <i data-feather="plus"></i>
217
+ Submit Term
218
+ </a>
219
+ </div>
220
+
221
+ <button class="mobile-menu-btn" id="mobileMenuBtn">
222
+ <i data-feather="menu" class="w-6 h-6"></i>
223
+ </button>
224
+ </div>
225
+ </nav>
226
+ `;
227
+ }
228
+
229
+ setupEventListeners() {
230
+ const navbar = this.shadowRoot.getElementById('navbar');
231
+ const mobileMenuBtn = this.shadowRoot.getElementById('mobileMenuBtn');
232
+ const navLinks = this.shadowRoot.getElementById('navLinks');
233
+
234
+ // Scroll effect
235
+ window.addEventListener('scroll', () => {
236
+ if (window.scrollY > 50) {
237
+ navbar.classList.add('scrolled');
238
+ } else {
239
+ navbar.classList.remove('scrolled');
240
+ }
241
+ });
242
+
243
+ // Mobile menu toggle
244
+ mobileMenuBtn.addEventListener('click', () => {
245
+ this.isMenuOpen = !this.isMenuOpen;
246
+ navLinks.classList.toggle('active');
247
+
248
+ const icon = mobileMenuBtn.querySelector('i');
249
+ if (this.isMenuOpen) {
250
+ icon.setAttribute('data-feather', 'x');
251
+ } else {
252
+ icon.setAttribute('data-feather', 'menu');
253
+ }
254
+ feather.replace();
255
+ });
256
+
257
+ // Close mobile menu on link click
258
+ const links = navLinks.querySelectorAll('.nav-link');
259
+ links.forEach(link => {
260
+ link.addEventListener('click', () => {
261
+ this.isMenuOpen = false;
262
+ navLinks.classList.remove('active');
263
+ const icon = mobileMenuBtn.querySelector('i');
264
+ icon.setAttribute('data-feather', 'menu');
265
+ feather.replace();
266
+ });
267
+ });
268
+
269
+ // Re-initialize feather icons
270
+ feather.replace();
271
+ }
272
+ }
273
+
274
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,190 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Generation Bridge Wiki - Connecting Generations Through Language</title>
7
+ <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>πŸŒ‰</text></svg>">
8
+ <link rel="stylesheet" href="style.css">
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script src="https://unpkg.com/feather-icons"></script>
12
+ </head>
13
+ <body class="bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 min-h-screen text-white">
14
+
15
+ <custom-navbar></custom-navbar>
16
+
17
+ <!-- Hero Section -->
18
+ <section class="relative overflow-hidden pt-20 pb-32 px-4">
19
+ <div class="absolute inset-0 bg-gradient-to-r from-purple-500/20 via-transparent to-blue-500/20 animate-gradient-shift"></div>
20
+ <div class="max-w-6xl mx-auto relative z-10">
21
+ <div class="text-center mb-12">
22
+ <h1 class="text-5xl md:text-7xl font-bold mb-6 bg-gradient-to-r from-purple-400 via-pink-400 to-blue-400 bg-clip-text text-transparent animate-gradient">
23
+ Generation Bridge Wiki
24
+ </h1>
25
+ <p class="text-xl md:text-2xl text-gray-300 max-w-3xl mx-auto leading-relaxed">
26
+ Bridging the communication gap between generations through language, culture, and shared experiences
27
+ </p>
28
+ </div>
29
+
30
+ <!-- Search Bar -->
31
+ <div class="max-w-2xl mx-auto mb-16">
32
+ <div class="relative group">
33
+ <input type="text" id="mainSearch" placeholder="Search for a term, slang, or phrase..."
34
+ class="w-full px-6 py-4 rounded-2xl bg-white/10 backdrop-blur-lg border border-white/20
35
+ focus:border-purple-400 focus:ring-4 focus:ring-purple-400/20 transition-all duration-300
36
+ placeholder-gray-400 text-white text-lg">
37
+ <div class="absolute right-4 top-1/2 transform -translate-y-1/2">
38
+ <i data-feather="search" class="w-6 h-6 text-gray-400 group-focus-within:text-purple-400 transition-colors"></i>
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ <!-- Generation Selector -->
44
+ <div class="grid grid-cols-2 md:grid-cols-5 gap-4 max-w-5xl mx-auto">
45
+ <button class="generation-btn" data-gen="boomer">
46
+ <div class="text-3xl mb-2">πŸ‘΄</div>
47
+ <div class="font-bold">Boomers</div>
48
+ <div class="text-sm opacity-75">1946-1964</div>
49
+ </button>
50
+ <button class="generation-btn" data-gen="genx">
51
+ <div class="text-3xl mb-2">🎸</div>
52
+ <div class="font-bold">Gen X</div>
53
+ <div class="text-sm opacity-75">1965-1980</div>
54
+ </button>
55
+ <button class="generation-btn" data-gen="millennial">
56
+ <div class="text-3xl mb-2">πŸ“±</div>
57
+ <div class="font-bold">Millennials</div>
58
+ <div class="text-sm opacity-75">1981-1996</div>
59
+ </button>
60
+ <button class="generation-btn" data-gen="genz">
61
+ <div class="text-3xl mb-2">πŸ’«</div>
62
+ <div class="font-bold">Gen Z</div>
63
+ <div class="text-sm opacity-75">1997-2012</div>
64
+ </button>
65
+ <button class="generation-btn" data-gen="genalpha">
66
+ <div class="text-3xl mb-2">πŸš€</div>
67
+ <div class="font-bold">Gen Alpha</div>
68
+ <div class="text-sm opacity-75">2013+</div>
69
+ </button>
70
+ </div>
71
+ </div>
72
+ </section>
73
+
74
+ <!-- Featured Terms Section -->
75
+ <section class="py-20 px-4">
76
+ <div class="max-w-6xl mx-auto">
77
+ <h2 class="text-4xl font-bold text-center mb-4 bg-gradient-to-r from-pink-400 to-orange-400 bg-clip-text text-transparent">
78
+ Trending Terms
79
+ </h2>
80
+ <p class="text-center text-gray-300 mb-12 max-w-2xl mx-auto">
81
+ Discover the latest slang and phrases making waves across generations
82
+ </p>
83
+
84
+ <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6" id="featuredTerms">
85
+ <!-- Terms will be populated by JavaScript -->
86
+ </div>
87
+ </div>
88
+ </section>
89
+
90
+ <!-- Translation Tool -->
91
+ <section class="py-20 px-4 bg-white/5 backdrop-blur-lg">
92
+ <div class="max-w-4xl mx-auto">
93
+ <h2 class="text-4xl font-bold text-center mb-12 bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent">
94
+ Translation Tool
95
+ </h2>
96
+ <div class="bg-white/10 backdrop-blur-xl rounded-3xl p-8 border border-white/20">
97
+ <div class="grid md:grid-cols-2 gap-6">
98
+ <div>
99
+ <label class="block text-sm font-bold mb-3 text-gray-200">From Generation</label>
100
+ <select id="fromGen" class="w-full p-3 rounded-xl bg-white/10 border border-white/20 focus:border-purple-400 focus:ring-4 focus:ring-purple-400/20 transition-all">
101
+ <option value="boomer">Boomers (1946-1964)</option>
102
+ <option value="genx">Gen X (1965-1980)</option>
103
+ <option value="millennial">Millennials (1981-1996)</option>
104
+ <option value="genz">Gen Z (1997-2012)</option>
105
+ </select>
106
+ </div>
107
+ <div>
108
+ <label class="block text-sm font-bold mb-3 text-gray-200">To Generation</label>
109
+ <select id="toGen" class="w-full p-3 rounded-xl bg-white/10 border border-white/20 focus:border-purple-400 focus:ring-4 focus:ring-purple-400/20 transition-all">
110
+ <option value="genz">Gen Z (1997-2012)</option>
111
+ <option value="millennial">Millennials (1981-1996)</option>
112
+ <option value="genx">Gen X (1965-1980)</option>
113
+ <option value="boomer">Boomers (1946-1964)</option>
114
+ </select>
115
+ </div>
116
+ </div>
117
+
118
+ <div class="mt-6">
119
+ <label class="block text-sm font-bold mb-3 text-gray-200">Enter Phrase</label>
120
+ <textarea id="translateInput" rows="3" placeholder="Type a phrase to translate..."
121
+ class="w-full p-4 rounded-xl bg-white/10 border border-white/20 focus:border-purple-400
122
+ focus:ring-4 focus:ring-purple-400/20 transition-all placeholder-gray-400 resize-none"></textarea>
123
+ </div>
124
+
125
+ <button id="translateBtn" class="mt-6 w-full py-4 bg-gradient-to-r from-purple-500 to-pink-500 rounded-xl font-bold
126
+ hover:from-purple-600 hover:to-pink-600 transition-all duration-300 transform
127
+ hover:scale-105 active:scale-95 shadow-lg hover:shadow-purple-500/25">
128
+ <i data-feather="shuffle" class="w-5 h-5 inline mr-2"></i>
129
+ Translate
130
+ </button>
131
+
132
+ <div id="translationResult" class="mt-6 p-6 bg-green-500/10 border border-green-500/30 rounded-xl hidden">
133
+ <h3 class="font-bold text-lg mb-2 text-green-400">Translation Result</h3>
134
+ <p id="translatedText" class="text-white text-lg"></p>
135
+ <p id="translationContext" class="text-gray-300 text-sm mt-2"></p>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ </section>
140
+
141
+ <!-- Connect Section -->
142
+ <section class="py-20 px-4">
143
+ <div class="max-w-6xl mx-auto text-center">
144
+ <h2 class="text-4xl font-bold mb-6 bg-gradient-to-r from-orange-400 to-red-400 bg-clip-text text-transparent">
145
+ Share Your Experience
146
+ </h2>
147
+ <p class="text-xl text-gray-300 mb-12 max-w-3xl mx-auto">
148
+ Help others understand your generation's perspective. Share stories, explain slang, and build bridges.
149
+ </p>
150
+
151
+ <div class="grid md:grid-cols-3 gap-8">
152
+ <div class="p-8 bg-white/5 backdrop-blur-lg rounded-2xl border border-white/10 hover:border-white/30 transition-all">
153
+ <div class="w-16 h-16 bg-gradient-to-r from-blue-500 to-purple-500 rounded-full flex items-center justify-center mx-auto mb-4">
154
+ <i data-feather="edit-3" class="w-8 h-8"></i>
155
+ </div>
156
+ <h3 class="text-xl font-bold mb-3">Submit Slang</h3>
157
+ <p class="text-gray-300">Add new terms and expressions from your generation</p>
158
+ </div>
159
+
160
+ <div class="p-8 bg-white/5 backdrop-blur-lg rounded-2xl border border-white/10 hover:border-white/30 transition-all">
161
+ <div class="w-16 h-16 bg-gradient-to-r from-pink-500 to-orange-500 rounded-full flex items-center justify-center mx-auto mb-4">
162
+ <i data-feather="message-circle" class="w-8 h-8"></i>
163
+ </div>
164
+ <h3 class="text-xl font-bold mb-3">Share Stories</h3>
165
+ <p class="text-gray-300">Tell us about experiences that shaped your generation</p>
166
+ </div>
167
+
168
+ <div class="p-8 bg-white/5 backdrop-blur-lg rounded-2xl border border-white/10 hover:border-white/30 transition-all">
169
+ <div class="w-16 h-16 bg-gradient-to-r from-green-500 to-teal-500 rounded-full flex items-center justify-center mx-auto mb-4">
170
+ <i data-feather="users" class="w-8 h-8"></i>
171
+ </div>
172
+ <h3 class="text-xl font-bold mb-3">Join Discussions</h3>
173
+ <p class="text-gray-300">Connect with people from different generations</p>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ </section>
178
+
179
+ <footer class="py-12 px-4 border-t border-white/10">
180
+ <div class="max-w-6xl mx-auto text-center">
181
+ <p class="text-gray-400">&copy; 2024 Generation Bridge Wiki. Building connections, one word at a time.</p>
182
+ </div>
183
+ </footer>
184
+
185
+ <script src="components/navbar.js"></script>
186
+ <script src="script.js"></script>
187
+ <script>feather.replace();</script>
188
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
189
+ </body>
190
+ </html>
script.js ADDED
@@ -0,0 +1,429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Generation Bridge Wiki - Main JavaScript
2
+
3
+ // Mock data for terms
4
+ const termsData = [
5
+ {
6
+ id: 1,
7
+ term: "No Cap",
8
+ generation: "genz",
9
+ meaning: "No lie, for real, truthfully",
10
+ example: "This pizza is the best, no cap!",
11
+ category: "slang",
12
+ popularity: 95,
13
+ tags: ["truth", "honesty", "slang"]
14
+ },
15
+ {
16
+ id: 2,
17
+ term: "Lit",
18
+ generation: "millennial",
19
+ meaning: "Amazing, exciting, fun",
20
+ example: "That party was so lit last night!",
21
+ category: "slang",
22
+ popularity: 85,
23
+ tags: ["fun", "exciting", "awesome"]
24
+ },
25
+ {
26
+ id: 3,
27
+ term: "Groovy",
28
+ generation: "boomer",
29
+ meaning: "Cool, fashionable, or pleasant",
30
+ example: "That music is really groovy!",
31
+ category: "slang",
32
+ popularity: 60,
33
+ tags: ["cool", "music", "vintage"]
34
+ },
35
+ {
36
+ id: 4,
37
+ term: "Slay",
38
+ generation: "genz",
39
+ meaning: "To do something exceptionally well",
40
+ example: "You absolutely slayed that presentation!",
41
+ category: "slang",
42
+ popularity: 98,
43
+ tags: ["success", "fashion", "performance"]
44
+ },
45
+ {
46
+ id: 5,
47
+ term: "Whatever",
48
+ generation: "genx",
49
+ meaning: "Indifference, dismissive",
50
+ example: "You don't like my idea? Whatever.",
51
+ category: "attitude",
52
+ popularity: 70,
53
+ tags: ["indifferent", "sarcastic", "dismissive"]
54
+ },
55
+ {
56
+ id: 6,
57
+ term: "Bussin",
58
+ generation: "genz",
59
+ meaning: "Really good, especially food",
60
+ example: "This burger is bussin!",
61
+ category: "food",
62
+ popularity: 88,
63
+ tags: ["food", "delicious", "good"]
64
+ },
65
+ {
66
+ id: 7,
67
+ term: "Rad",
68
+ generation: "genx",
69
+ meaning: "Radical, excellent, cool",
70
+ example: "That skateboard trick was rad!",
71
+ category: "slang",
72
+ popularity: 65,
73
+ tags: ["cool", "awesome", "extreme"]
74
+ },
75
+ {
76
+ id: 8,
77
+ term: "Skibidi",
78
+ generation: "genalpha",
79
+ meaning: "Fun, silly, nonsensical (from YouTube series)",
80
+ example: "Skibidi toilet is so funny!",
81
+ category: "meme",
82
+ popularity: 75,
83
+ tags: ["meme", "funny", "youtube"]
84
+ },
85
+ {
86
+ id: 9,
87
+ term: "Adulting",
88
+ generation: "millennial",
89
+ meaning: "Doing adult responsibilities",
90
+ example: "I spent my Saturday doing taxes, adulting is hard.",
91
+ category: "lifestyle",
92
+ popularity: 90,
93
+ tags: ["responsibility", "growing up", "life"]
94
+ },
95
+ {
96
+ id: 10,
97
+ term: "Bet",
98
+ generation: "genz",
99
+ meaning: "Okay, agreement, or confirmation",
100
+ example: "Want to hang out later? Bet.",
101
+ category: "slang",
102
+ popularity: 92,
103
+ tags: ["agreement", "yes", "cool"]
104
+ },
105
+ {
106
+ id: 11,
107
+ term: "FOMO",
108
+ generation: "millennial",
109
+ meaning: "Fear Of Missing Out",
110
+ example: "I have serious FOMO seeing everyone's vacation photos.",
111
+ category: "psychology",
112
+ popularity: 88,
113
+ tags: ["anxiety", "social", "missing out"]
114
+ },
115
+ {
116
+ id: 12,
117
+ term: "Cool Beans",
118
+ generation: "genx",
119
+ meaning: "Agreeable, good idea",
120
+ example: "Want to grab pizza? Cool beans!",
121
+ category: "slang",
122
+ popularity: 55,
123
+ tags: ["agreement", "casual", "friendly"]
124
+ }
125
+ ];
126
+
127
+ // Translation dictionary
128
+ const translationDictionary = {
129
+ "awesome": { boomer: "groovy", genx: "rad", millennial: "lit", genz: "slaps" },
130
+ "cool": { boomer: "hip", genx: "cool", millennial: "chill", genz: "fire" },
131
+ "great": { boomer: "fabulous", genx: "excellent", millennial: "amazing", genz: "bussin" },
132
+ "bad": { boomer: "bummer", genx: "lame", millennial: "trash", genz: "mid" },
133
+ "friend": { boomer: "pal", genx: "buddy", millennial: "homie", genz: "fam" },
134
+ "very": { boomer: "real", genx: "totally", millennial: "super", genz: "lowkey" },
135
+ "yes": { boomer: "right on", genx: "for sure", millennial: "absolutely", genz: "bet" }
136
+ };
137
+
138
+ // DOM Elements
139
+ let searchInput, featuredTermsContainer, translateBtn, translateInput,
140
+ fromGenSelect, toGenSelect, translationResult, translatedText,
141
+ translationContext, generationButtons;
142
+
143
+ // Initialize the app
144
+ document.addEventListener('DOMContentLoaded', () => {
145
+ initializeElements();
146
+ setupEventListeners();
147
+ loadFeaturedTerms();
148
+ });
149
+
150
+ function initializeElements() {
151
+ searchInput = document.getElementById('mainSearch');
152
+ featuredTermsContainer = document.getElementById('featuredTerms');
153
+ translateBtn = document.getElementById('translateBtn');
154
+ translateInput = document.getElementById('translateInput');
155
+ fromGenSelect = document.getElementById('fromGen');
156
+ toGenSelect = document.getElementById('toGen');
157
+ translationResult = document.getElementById('translationResult');
158
+ translatedText = document.getElementById('translatedText');
159
+ translationContext = document.getElementById('translationContext');
160
+ generationButtons = document.querySelectorAll('.generation-btn');
161
+ }
162
+
163
+ function setupEventListeners() {
164
+ // Search functionality
165
+ searchInput.addEventListener('input', handleSearch);
166
+ searchInput.addEventListener('keypress', (e) => {
167
+ if (e.key === 'Enter') {
168
+ performSearch();
169
+ }
170
+ });
171
+
172
+ // Translation
173
+ translateBtn.addEventListener('click', performTranslation);
174
+ translateInput.addEventListener('keypress', (e) => {
175
+ if (e.key === 'Enter' && e.ctrlKey) {
176
+ performTranslation();
177
+ }
178
+ });
179
+
180
+ // Generation buttons
181
+ generationButtons.forEach(btn => {
182
+ btn.addEventListener('click', () => {
183
+ const gen = btn.dataset.gen;
184
+ filterByGeneration(gen);
185
+ });
186
+ });
187
+
188
+ // Navbar interactions
189
+ document.addEventListener('click', (e) => {
190
+ if (e.target.matches('[data-action]')) {
191
+ handleNavbarAction(e.target.dataset.action);
192
+ }
193
+ });
194
+ }
195
+
196
+ function loadFeaturedTerms() {
197
+ // Sort by popularity and get top terms
198
+ const topTerms = [...termsData]
199
+ .sort((a, b) => b.popularity - a.popularity)
200
+ .slice(0, 9);
201
+
202
+ featuredTermsContainer.innerHTML = topTerms.map(term => createTermCard(term)).join('');
203
+
204
+ // Re-initialize feather icons for new content
205
+ if (typeof feather !== 'undefined') {
206
+ feather.replace();
207
+ }
208
+ }
209
+
210
+ function createTermCard(term) {
211
+ const generationColors = {
212
+ boomer: 'from-blue-500/30 to-blue-600/30',
213
+ genx: 'from-purple-500/30 to-purple-600/30',
214
+ millennial: 'from-pink-500/30 to-pink-600/30',
215
+ genz: 'from-orange-500/30 to-orange-600/30',
216
+ genalpha: 'from-green-500/30 to-teal-600/30'
217
+ };
218
+
219
+ const generationEmojis = {
220
+ boomer: 'πŸ‘΄',
221
+ genx: '🎸',
222
+ millennial: 'πŸ“±',
223
+ genz: 'πŸ’«',
224
+ genalpha: 'πŸš€'
225
+ };
226
+
227
+ return `
228
+ <div class="term-card" data-term-id="${term.id}">
229
+ <div class="flex items-start justify-between mb-4">
230
+ <span class="px-3 py-1 rounded-full text-xs font-bold bg-gradient-to-r ${generationColors[term.generation]} border border-white/20 backdrop-blur-sm">
231
+ ${generationEmojis[term.generation]} ${term.generation.toUpperCase()}
232
+ </span>
233
+ <div class="flex items-center text-sm text-gray-300">
234
+ <i data-feather="trending-up" class="w-4 h-4 mr-1 text-green-400"></i>
235
+ ${term.popularity}%
236
+ </div>
237
+ </div>
238
+
239
+ <h3 class="text-2xl font-bold mb-2 text-white">${term.term}</h3>
240
+ <p class="text-gray-300 mb-3">${term.meaning}</p>
241
+
242
+ <div class="bg-white/5 p-3 rounded-lg mb-4 border border-white/10">
243
+ <p class="text-sm text-gray-200 italic">"${term.example}"</p>
244
+ </div>
245
+
246
+ <div class="flex flex-wrap gap-2">
247
+ ${term.tags.map(tag => `
248
+ <span class="px-2 py-1 bg-white/10 rounded-full text-xs text-gray-300 hover:bg-white/20 transition-colors cursor-pointer">
249
+ #${tag}
250
+ </span>
251
+ `).join('')}
252
+ </div>
253
+
254
+ <button class="mt-4 w-full py-2 bg-gradient-to-r from-purple-500/30 to-pink-500/30 rounded-lg
255
+ hover:from-purple-500/50 hover:to-pink-500/50 transition-all duration-300 text-sm font-bold"
256
+ onclick="showTermDetails(${term.id})">
257
+ Learn More
258
+ </button>
259
+ </div>
260
+ `;
261
+ }
262
+
263
+ function handleSearch(e) {
264
+ const query = e.target.value.toLowerCase().trim();
265
+
266
+ if (query.length === 0) {
267
+ loadFeaturedTerms();
268
+ return;
269
+ }
270
+
271
+ const filteredTerms = termsData.filter(term =>
272
+ term.term.toLowerCase().includes(query) ||
273
+ term.meaning.toLowerCase().includes(query) ||
274
+ term.tags.some(tag => tag.toLowerCase().includes(query))
275
+ );
276
+
277
+ featuredTermsContainer.innerHTML = filteredTerms.map(term => createTermCard(term)).join('');
278
+ feather.replace();
279
+ }
280
+
281
+ function performSearch() {
282
+ const query = searchInput.value.trim();
283
+ if (query) {
284
+ console.log('Searching for:', query);
285
+ // Could implement advanced search or redirect to search results page
286
+ }
287
+ }
288
+
289
+ function filterByGeneration(generation) {
290
+ const filteredTerms = termsData.filter(term => term.generation === generation);
291
+ featuredTermsContainer.innerHTML = filteredTerms.map(term => createTermCard(term)).join('');
292
+ feather.replace();
293
+
294
+ // Update active state
295
+ generationButtons.forEach(btn => {
296
+ if (btn.dataset.gen === generation) {
297
+ btn.classList.add('ring-4', 'ring-purple-400/40');
298
+ } else {
299
+ btn.classList.remove('ring-4', 'ring-purple-400/40');
300
+ }
301
+ });
302
+
303
+ // Scroll to terms section
304
+ document.getElementById('featuredTerms').scrollIntoView({ behavior: 'smooth' });
305
+ }
306
+
307
+ function performTranslation() {
308
+ const input = translateInput.value.trim().toLowerCase();
309
+ const fromGen = fromGenSelect.value;
310
+ const toGen = toGenSelect.value;
311
+
312
+ if (!input) {
313
+ showTranslationError('Please enter a phrase to translate');
314
+ return;
315
+ }
316
+
317
+ if (fromGen === toGen) {
318
+ showTranslationError('Please select different generations');
319
+ return;
320
+ }
321
+
322
+ // Simple translation logic - could be enhanced with a proper dictionary
323
+ let translated = input;
324
+ let context = '';
325
+
326
+ // Check for common words in our dictionary
327
+ Object.keys(translationDictionary).forEach(word => {
328
+ if (input.includes(word)) {
329
+ const replacement = translationDictionary[word][toGen];
330
+ translated = translated.replace(new RegExp(word, 'g'), replacement);
331
+ context += ` "${word}" β†’ "${replacement}"`;
332
+ }
333
+ });
334
+
335
+ // Add generation-specific context
336
+ const contexts = {
337
+ boomer: "This phrase reflects Boomer values of authenticity and straightforwardness",
338
+ genx: "Gen X expressions often carry a tone of rebellion and independence",
339
+ millennial: "Millennial phrases blend digital culture with ironic humor",
340
+ genz: "Gen Z language is fast-evolving and heavily influenced by social media"
341
+ };
342
+
343
+ translatedText.textContent = translated.charAt(0).toUpperCase() + translated.slice(1);
344
+ translationContext.textContent = `Based on ${fromGen.toUpperCase()} β†’ ${toGen.toUpperCase()} translation.${context ? ' Translated:' + context : ''} ${contexts[toGen] || ''}`;
345
+
346
+ translationResult.classList.remove('hidden', 'border-red-500/30', 'bg-red-500/10');
347
+ translationResult.classList.add('border-green-500/30', 'bg-green-500/10');
348
+ translationResult.scrollIntoView({ behavior: 'smooth' });
349
+ }
350
+
351
+ function showTranslationError(message) {
352
+ translatedText.textContent = message;
353
+ translationContext.textContent = 'Please check your input and try again.';
354
+
355
+ translationResult.classList.remove('hidden', 'border-green-500/30', 'bg-green-500/10');
356
+ translationResult.classList.add('border-red-500/30', 'bg-red-500/10');
357
+ }
358
+
359
+ function showTermDetails(termId) {
360
+ const term = termsData.find(t => t.id === termId);
361
+ if (term) {
362
+ console.log('Showing details for:', term);
363
+ // Could open modal or navigate to detail page
364
+ alert(`${term.term}\n\nMeaning: ${term.meaning}\n\nExample: "${term.example}"\n\nPopularity: ${term.popularity}%`);
365
+ }
366
+ }
367
+
368
+ function handleNavbarAction(action) {
369
+ switch(action) {
370
+ case 'home':
371
+ window.scrollTo({ top: 0, behavior: 'smooth' });
372
+ break;
373
+ case 'search':
374
+ searchInput.focus();
375
+ break;
376
+ case 'submit':
377
+ alert('Submit feature coming soon!');
378
+ break;
379
+ case 'stories':
380
+ alert('Stories feature coming soon!');
381
+ break;
382
+ case 'about':
383
+ alert('About section coming soon!');
384
+ break;
385
+ }
386
+ }
387
+
388
+ // Keyboard shortcuts
389
+ document.addEventListener('keydown', (e) => {
390
+ // Ctrl/Cmd + K for search
391
+ if ((e.ctrlKey || e.metaKey) && e.key === 'k') {
392
+ e.preventDefault();
393
+ searchInput.focus();
394
+ }
395
+
396
+ // Escape to clear search
397
+ if (e.key === 'Escape') {
398
+ if (document.activeElement === searchInput) {
399
+ searchInput.value = '';
400
+ searchInput.blur();
401
+ loadFeaturedTerms();
402
+ }
403
+ }
404
+ });
405
+
406
+ // Intersection Observer for animations
407
+ const observerOptions = {
408
+ threshold: 0.1,
409
+ rootMargin: '0px 0px -50px 0px'
410
+ };
411
+
412
+ const observer = new IntersectionObserver((entries) => {
413
+ entries.forEach(entry => {
414
+ if (entry.isIntersecting) {
415
+ entry.target.style.opacity = '1';
416
+ entry.target.style.transform = 'translateY(0)';
417
+ }
418
+ });
419
+ }, observerOptions);
420
+
421
+ // Observe all term cards
422
+ setTimeout(() => {
423
+ document.querySelectorAll('.term-card').forEach(card => {
424
+ card.style.opacity = '0';
425
+ card.style.transform = 'translateY(20px)';
426
+ card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
427
+ observer.observe(card);
428
+ });
429
+ }, 100);
style.css CHANGED
@@ -1,28 +1,89 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom animations and effects beyond Tailwind */
2
+
3
+ @keyframes gradientShift {
4
+ 0%, 100% { background-position: 0% 50%; }
5
+ 50% { background-position: 100% 50%; }
6
+ }
7
+
8
+ .animate-gradient-shift {
9
+ background-size: 200% 200%;
10
+ animation: gradientShift 8s ease-in-out infinite;
11
+ }
12
+
13
+ .animate-gradient {
14
+ background-size: 200% 200%;
15
+ animation: gradientShift 3s ease-in-out infinite;
16
+ }
17
+
18
+ /* Generation buttons */
19
+ .generation-btn {
20
+ @apply p-6 bg-white/10 backdrop-blur-lg rounded-2xl border border-white/20 text-center
21
+ hover:bg-white/20 hover:border-purple-400/50 transition-all duration-300 transform
22
+ hover:-translate-y-2 hover:scale-105 active:scale-95 shadow-lg;
23
+ }
24
+
25
+ /* Term cards */
26
+ .term-card {
27
+ @apply bg-white/10 backdrop-blur-lg rounded-2xl p-6 border border-white/10
28
+ hover:border-white/30 hover:bg-white/20 transition-all duration-300
29
+ transform hover:-translate-y-1 shadow-lg;
30
+ }
31
+
32
+ /* Scrollbar styling */
33
+ ::-webkit-scrollbar {
34
+ width: 10px;
35
  }
36
 
37
+ ::-webkit-scrollbar-track {
38
+ background: rgba(255, 255, 255, 0.05);
 
39
  }
40
 
41
+ ::-webkit-scrollbar-thumb {
42
+ background: rgba(168, 85, 247, 0.5);
43
+ border-radius: 5px;
 
 
44
  }
45
 
46
+ ::-webkit-scrollbar-thumb:hover {
47
+ background: rgba(168, 85, 247, 0.8);
 
 
 
 
48
  }
49
 
50
+ /* Loading animation */
51
+ .loading-skeleton {
52
+ background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
53
+ background-size: 200% 100%;
54
+ animation: loading 1.5s infinite;
55
  }
56
+
57
+ @keyframes loading {
58
+ 0% { background-position: 200% 0; }
59
+ 100% { background-position: -200% 0; }
60
+ }
61
+
62
+ /* Custom selection color */
63
+ ::selection {
64
+ background: rgba(168, 85, 247, 0.5);
65
+ color: white;
66
+ }
67
+
68
+ /* Smooth scrolling */
69
+ html {
70
+ scroll-behavior: smooth;
71
+ }
72
+
73
+ /* Glass morphism enhancements */
74
+ .glass {
75
+ background: rgba(255, 255, 255, 0.1);
76
+ backdrop-filter: blur(10px);
77
+ border: 1px solid rgba(255, 255, 255, 0.2);
78
+ }
79
+
80
+ /* Pulse animation for live indicators */
81
+ .pulse-dot {
82
+ animation: pulse 2s infinite;
83
+ }
84
+
85
+ @keyframes pulse {
86
+ 0% { transform: scale(1); opacity: 1; }
87
+ 50% { transform: scale(1.2); opacity: 0.7; }
88
+ 100% { transform: scale(1); opacity: 1; }
89
+ }