DEADS1KE commited on
Commit
ad24ed1
·
verified ·
1 Parent(s): d2b8585

Upload 3 files

Browse files
Files changed (2) hide show
  1. script.js +25 -5
  2. style.css +57 -10
script.js CHANGED
@@ -150,9 +150,22 @@ const translations = {
150
  let currentLang = "en";
151
 
152
  function handleDemoButtonClick(event) {
153
- const url = event.target.dataset.href;
 
 
154
  if (url) {
155
- window.open(url, "_blank");
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
  }
158
 
@@ -162,9 +175,16 @@ demoButtons.forEach((button) => {
162
 
163
  function updateContent(lang) {
164
  const translation = translations[lang];
 
 
 
 
165
 
166
- title.textContent = translation.title;
167
- subtitle.textContent = translation.subtitle;
 
 
 
168
 
169
  // About Section
170
  document.querySelector("#about .card-title").textContent = translation.aboutTitle;
@@ -264,4 +284,4 @@ function toggleLanguage() {
264
 
265
  langToggle.addEventListener("click", toggleLanguage);
266
 
267
- updateContent(currentLang);
 
150
  let currentLang = "en";
151
 
152
  function handleDemoButtonClick(event) {
153
+ const button = event.target;
154
+ const url = button.dataset.href;
155
+
156
  if (url) {
157
+ // Add loading state
158
+ button.innerHTML = `<span class="loading">Loading...</span>`;
159
+ button.disabled = true;
160
+
161
+ setTimeout(() => {
162
+ window.open(url, "_blank");
163
+ // Reset button after 1 second
164
+ setTimeout(() => {
165
+ button.innerHTML = button.textContent;
166
+ button.disabled = false;
167
+ }, 1000);
168
+ }, 500);
169
  }
170
  }
171
 
 
175
 
176
  function updateContent(lang) {
177
  const translation = translations[lang];
178
+
179
+ // Fade out content
180
+ document.body.style.opacity = '0';
181
+ document.body.style.transition = 'opacity 0.3s ease';
182
 
183
+ setTimeout(() => {
184
+ title.textContent = translation.title;
185
+ subtitle.textContent = translation.subtitle;
186
+ document.body.style.opacity = '1';
187
+ }, 300);
188
 
189
  // About Section
190
  document.querySelector("#about .card-title").textContent = translation.aboutTitle;
 
284
 
285
  langToggle.addEventListener("click", toggleLanguage);
286
 
287
+ updateContent(currentLang);
style.css CHANGED
@@ -1,16 +1,19 @@
1
  :root {
2
- /* Dark, GitHub-inspired theme */
3
  --primary: #0d1117; /* Dark background */
4
  --primary-dark: #010409; /* Even darker for header */
5
- --surface: #161b22; /* Slightly lighter background for cards */
6
- --surface-variant: #21262d; /* For buttons and interactive elements */
7
  --on-surface: #c9d1d9; /* Light gray text */
8
- --on-surface-variant: #8b949e; /* Slightly darker text for less important content */
9
  --accent1: #58a6ff; /* Blue for links and highlights */
10
  --accent2: #79c0ff; /* Lighter blue for hover effects */
 
 
11
  --elevation-1: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
12
  --elevation-2: 0 3px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
13
  --elevation-3: 0 10px 20px rgba(0,0,0,0.4), 0 3px 6px rgba(0,0,0,0.3);
 
14
  }
15
 
16
  /* Reset some default styles */
@@ -22,9 +25,10 @@
22
 
23
  body {
24
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
25
- background-color: var(--primary); /* Darker background */
26
  color: var(--on-surface);
27
  line-height: 1.6;
 
28
  }
29
 
30
  .top-bar {
@@ -56,11 +60,24 @@ body {
56
  }
57
 
58
  header {
59
- padding: 4rem 1rem 2rem; /* Reduced padding */
60
  text-align: center;
61
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
62
  color: white;
63
  animation: fadeIn 0.8s ease-out;
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
  .title {
@@ -86,17 +103,20 @@ main {
86
 
87
  .card {
88
  background: var(--surface);
89
- border-radius: 16px; /* Smaller radius */
90
- padding: 1rem; /* Reduced padding */
91
  box-shadow: var(--elevation-1);
92
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
93
  animation: slideUp 0.5s ease-out;
94
  animation-fill-mode: both;
 
 
95
  }
96
 
97
  .card:hover {
98
  transform: translateY(-4px);
99
  box-shadow: var(--elevation-3);
 
100
  }
101
 
102
  .card-title {
@@ -171,6 +191,18 @@ footer {
171
  background-color: var(--accent2); /* Use accent2 for hover */
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  details {
175
  background-color: var(--surface-variant);
176
  border-radius: 8px;
@@ -242,6 +274,21 @@ details p {
242
  }
243
  }
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  /* Responsive Adjustments */
246
  @media (max-width: 768px) {
247
  main {
@@ -263,4 +310,4 @@ details p {
263
  .info-grid {
264
  grid-template-columns: 1fr; /* Stack info sections on mobile */
265
  }
266
- }
 
1
  :root {
2
+ /* Modern glass morphism theme */
3
  --primary: #0d1117; /* Dark background */
4
  --primary-dark: #010409; /* Even darker for header */
5
+ --surface: rgba(22, 27, 34, 0.7); /* Semi-transparent surface */
6
+ --surface-variant: rgba(33, 38, 45, 0.8); /* More opaque for interactive elements */
7
  --on-surface: #c9d1d9; /* Light gray text */
8
+ --on-surface-variant: #8b949e; /* Slightly darker text */
9
  --accent1: #58a6ff; /* Blue for links and highlights */
10
  --accent2: #79c0ff; /* Lighter blue for hover effects */
11
+ --glass-blur: 12px; /* Blur for glass effect */
12
+ --glass-border: 1px solid rgba(255, 255, 255, 0.1); /* Glass border */
13
  --elevation-1: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
14
  --elevation-2: 0 3px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
15
  --elevation-3: 0 10px 20px rgba(0,0,0,0.4), 0 3px 6px rgba(0,0,0,0.3);
16
+ --transition-speed: 0.3s;
17
  }
18
 
19
  /* Reset some default styles */
 
25
 
26
  body {
27
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
28
+ background-color: var(--primary);
29
  color: var(--on-surface);
30
  line-height: 1.6;
31
+ scroll-behavior: smooth;
32
  }
33
 
34
  .top-bar {
 
60
  }
61
 
62
  header {
63
+ padding: 4rem 1rem 2rem;
64
  text-align: center;
65
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
66
  color: white;
67
  animation: fadeIn 0.8s ease-out;
68
+ position: relative;
69
+ overflow: hidden;
70
+ }
71
+
72
+ header::before {
73
+ content: '';
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
77
+ width: 100%;
78
+ height: 100%;
79
+ background: radial-gradient(circle at 50% 0%, rgba(88, 166, 255, 0.1), transparent 70%);
80
+ animation: gradientPulse 10s infinite alternate;
81
  }
82
 
83
  .title {
 
103
 
104
  .card {
105
  background: var(--surface);
106
+ border-radius: 16px;
107
+ padding: 1rem;
108
  box-shadow: var(--elevation-1);
109
+ transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
110
  animation: slideUp 0.5s ease-out;
111
  animation-fill-mode: both;
112
+ backdrop-filter: blur(var(--glass-blur));
113
+ border: var(--glass-border);
114
  }
115
 
116
  .card:hover {
117
  transform: translateY(-4px);
118
  box-shadow: var(--elevation-3);
119
+ background: rgba(22, 27, 34, 0.9);
120
  }
121
 
122
  .card-title {
 
191
  background-color: var(--accent2); /* Use accent2 for hover */
192
  }
193
 
194
+ @keyframes loadingPulse {
195
+ 0% { opacity: 0.5; }
196
+ 50% { opacity: 1; }
197
+ 100% { opacity: 0.5; }
198
+ }
199
+
200
+ .loading {
201
+ animation: loadingPulse 1.5s infinite;
202
+ display: inline-block;
203
+ padding: 0 0.5rem;
204
+ }
205
+
206
  details {
207
  background-color: var(--surface-variant);
208
  border-radius: 8px;
 
274
  }
275
  }
276
 
277
+ @keyframes gradientPulse {
278
+ 0% {
279
+ transform: scale(1);
280
+ opacity: 0.1;
281
+ }
282
+ 50% {
283
+ transform: scale(1.2);
284
+ opacity: 0.2;
285
+ }
286
+ 100% {
287
+ transform: scale(1);
288
+ opacity: 0.1;
289
+ }
290
+ }
291
+
292
  /* Responsive Adjustments */
293
  @media (max-width: 768px) {
294
  main {
 
310
  .info-grid {
311
  grid-template-columns: 1fr; /* Stack info sections on mobile */
312
  }
313
+ }