-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
351 lines (310 loc) · 11.7 KB
/
index.html
File metadata and controls
351 lines (310 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<html lang="zh-Hant">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>澳門網絡安全暨奪旗競賽協會</title>
<link rel="icon" type="image/png" href="static/images/moctf-logo.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="static/css/style.css">
<style>
.navbar-brand img {
height: 40px;
width: auto;
margin-right: 0.5rem;
transition: all 0.5s ease;
transform-origin: center;
}
.navbar-brand:hover img {
filter: drop-shadow(0 0 15px var(--cyber-neon)) brightness(1.2);
transform: scale(1.1) rotate(-5deg);
animation: logoGlow 2s infinite;
}
@keyframes logoGlow {
0% {
filter: drop-shadow(0 0 5px var(--cyber-neon)) brightness(1);
}
50% {
filter: drop-shadow(0 0 15px var(--cyber-neon)) brightness(1.3);
transform: scale(1.15) rotate(-8deg);
}
100% {
filter: drop-shadow(0 0 5px var(--cyber-neon)) brightness(1);
}
}
.navbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: rgba(0, 0, 0, 0.9);
backdrop-filter: blur(10px);
z-index: 1000;
padding: 0.8rem 0;
border-bottom: 1px solid var(--cyber-neon);
}
.navbar .container {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
padding: 0 1rem;
}
.navbar-brand {
display: flex;
align-items: center;
text-decoration: none;
z-index: 1001;
}
.current-page {
display: none;
color: var(--cyber-text);
font-size: 1.1rem;
font-weight: 500;
line-height: 40px;
}
.nav-links {
display: flex;
gap: 2rem;
align-items: center;
margin-left: 2rem;
}
.nav-link {
color: var(--cyber-text);
text-decoration: none;
font-size: 1.1rem;
transition: all 0.3s ease;
padding: 0.5rem 1rem;
border-radius: 4px;
line-height: 1.5;
}
.nav-link:hover {
color: var(--cyber-neon);
text-shadow: 0 0 10px var(--cyber-neon);
}
.nav-link.active {
color: var(--cyber-neon);
border: 1px solid var(--cyber-neon);
box-shadow: 0 0 10px rgba(0, 255, 140, 0.2);
}
/* Hamburger Menu Button */
.hamburger {
display: none;
flex-direction: column;
justify-content: space-between;
width: 30px;
height: 21px;
cursor: pointer;
z-index: 1001;
margin-left: auto;
padding: 0;
background: none;
border: none;
}
.hamburger span {
display: block;
width: 100%;
height: 3px;
background-color: var(--cyber-neon);
transition: all 0.3s ease;
border-radius: 3px;
}
/* Mobile Navigation Styles */
@media screen and (max-width: 768px) {
.navbar {
padding: 0.5rem 0;
}
.navbar .container {
justify-content: flex-start;
}
.current-page {
display: inline-block;
font-size: 1.1rem;
}
.hamburger {
display: flex;
margin-left: auto;
width: 32px;
height: 24px;
}
.nav-links {
position: fixed;
top: -100vh;
left: 0;
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, 0.95);
backdrop-filter: blur(10px);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1rem;
transition: all 0.3s ease;
z-index: 1000;
padding: 4rem 1rem 2rem 1rem;
margin-left: 0;
}
.nav-links.active {
top: 0;
}
/* Hide footer when nav menu is active */
.nav-links.active ~ footer,
.nav-links.active ~ main footer,
.nav-links.active ~ .cyber-footer,
.nav-links.active ~ main .cyber-footer,
.nav-links.active + .cyber-footer,
.nav-links.active + main .cyber-footer {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
}
.nav-link {
font-size: 1.2rem;
width: 100%;
text-align: center;
padding: 0.8rem;
border: 1px solid var(--cyber-neon);
margin: 0.25rem 0;
}
.nav-link:hover {
background: rgba(0, 255, 140, 0.1);
transform: translateY(2px);
}
.nav-link.active {
background: rgba(0, 255, 140, 0.2);
transform: translateY(0);
}
/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
opacity: 0;
}
.hamburger.active span:nth-child(3) {
transform: translateY(-9px) rotate(-45deg);
}
}
/* Adjust main content to account for fixed navbar */
.content {
padding-top: 160px;
margin-top: 20px;
margin-bottom: 60px;
}
</style>
</head>
<body>
<canvas id="matrix"></canvas>
<nav class="navbar">
<div class="container">
<a href="index.html" class="navbar-brand">
<img src="static/images/moctf-logo.png" alt="MOCSCTF Logo">
</a>
<span class="current-page">首頁</span>
<button class="hamburger">
<span></span>
<span></span>
<span></span>
</button>
<div class="nav-links">
<a href="index.html" class="nav-link active">首頁</a>
<a href="events.html" class="nav-link">活動</a>
<a href="mocsctfevents.html" class="nav-link">MOCSCTF系列活動</a>
<a href="about.html" class="nav-link">關於我們</a>
<a href="joinus.html" class="nav-link">加入我們</a>
</div>
</div>
</nav>
<main class="content container">
<div class="title-container text-center">
<h1 class="main-title">澳門網絡安全暨奪旗競賽協會 MOCSCTF</h1>
</div>
<div class="mission-section mb-5">
<div class="cyber-card">
<h2 class="section-title">我們的使命</h2>
<div class="mission-content">
<p>我們致力於推動網絡安全技術的發展與普及,培養本地網絡安全人才,提升社會對網絡安全的認知與防護能力。我們通過專業培訓、競技賽事及社區合作,打造一個開放、創新、互助的平台,讓每一位成員都能在網絡安全的領域中成長、突破,並為構建更安全的數字世界貢獻力量。</p>
</div>
</div>
</div>
<div class="featured-events">
<h2 class="section-title">最新活動</h2>
<div id="events-container" class="events-grid"></div>
</div>
</main>
<footer class="cyber-footer">
<div class="container">
<div class="social-links">
<a href="https://github.com/MOCSCTF" target="_blank" class="social-link">
<i class="fab fa-github"></i>
<span>GitHub</span>
</a>
<a href="https://ctftime.org/team/120747" target="_blank" class="social-link">
<i class="fas fa-flag"></i>
<span>CTFTime</span>
</a>
<a href="https://www.facebook.com/MOCSCTF" target="_blank" class="social-link">
<i class="fab fa-facebook"></i>
<span>Facebook</span>
</a>
</div>
<p class="text-center mt-3">© <span id="currentYear"></span> MOCSCTF. All rights reserved.</p>
</div>
</footer>
<script src="static/js/matrix.js"></script>
<script src="static/js/events.js"></script>
<script>
// Set current year in footer
document.getElementById('currentYear').textContent = new Date().getFullYear();
// Mobile Navigation
const hamburger = document.querySelector('.hamburger');
const navLinks = document.querySelector('.nav-links');
function toggleMenu() {
hamburger.classList.toggle('active');
navLinks.classList.toggle('active');
const footer = document.querySelector('.cyber-footer');
if (navLinks.classList.contains('active')) {
footer.style.display = 'none';
} else {
footer.style.display = '';
}
}
hamburger.addEventListener('click', toggleMenu);
// Close menu when clicking a nav link
document.querySelectorAll('.nav-link').forEach(link => {
link.addEventListener('click', () => {
hamburger.classList.remove('active');
navLinks.classList.remove('active');
});
});
// Close menu when clicking outside
document.addEventListener('click', (e) => {
if (!hamburger.contains(e.target) && !navLinks.contains(e.target)) {
hamburger.classList.remove('active');
navLinks.classList.remove('active');
}
});
document.addEventListener('DOMContentLoaded', function() {
const eventsContainer = document.getElementById('events-container');
// Sort events by date in descending order (newest first)
const sortedEvents = events.sort((a, b) => new Date(b.date) - new Date(a.date));
// Display only the latest 2 events on the homepage
sortedEvents.slice(0, 2).forEach(event => {
const eventCard = document.createElement('div');
eventCard.className = 'cyber-card event-card';
// Get the first image from the images array
const imagePath = event.images[0];
eventCard.innerHTML = `
<img src="${imagePath}" alt="${event.title}" class="event-image">
<h3 class="event-title">${event.title}</h3>
<p class="event-date">${event.date}</p>
<p class="event-description">${event.shortDescription}</p>
<a href="events.html?id=${event.id}" class="cyber-button">了解更多</a>
`;
eventsContainer.appendChild(eventCard);
});
});
</script>
</body>
</html>