-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtopic1.html
More file actions
692 lines (613 loc) · 22.6 KB
/
Copy pathtopic1.html
File metadata and controls
692 lines (613 loc) · 22.6 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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>مبانی شبکه</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Vazir:wght@400;700&family=Orbitron:wght@400;700;900&display=swap" rel="stylesheet">
<style>
:root {
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
--dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
--neon-blue: #00d4ff;
--neon-pink: #ff0080;
--neon-green: #39ff14;
--neon-purple: #bf00ff;
--neon-orange: #ff6600;
--glass: rgba(255, 255, 255, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Vazir', sans-serif;
background: var(--dark-gradient);
color: #fff;
overflow-x: hidden;
position: relative;
min-height: 100vh;
}
/* Animated background particles */
.bg-animation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.particle {
position: absolute;
background: var(--neon-blue);
border-radius: 50%;
opacity: 0.6;
animation: float 6s ease-in-out infinite;
}
.particle:nth-child(2n) {
background: var(--neon-pink);
animation-delay: -2s;
}
.particle:nth-child(3n) {
background: var(--neon-green);
animation-delay: -4s;
}
.particle:nth-child(4n) {
background: var(--neon-purple);
animation-delay: -1s;
}
@keyframes float {
0%, 100% { transform: translateY(0px) rotate(0deg); }
50% { transform: translateY(-100px) rotate(180deg); }
}
/* Glowing grid overlay */
.grid-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image:
linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
background-size: 50px 50px;
z-index: -1;
animation: gridPulse 4s ease-in-out infinite;
}
@keyframes gridPulse {
0%, 100% { opacity: 0.3; }
50% { opacity: 0.1; }
}
/* Header with cyberpunk styling */
header {
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(20px);
border-bottom: 2px solid var(--neon-blue);
box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
padding: 1rem 2rem;
position: sticky;
top: 0;
z-index: 1000;
animation: slideInDown 1s ease;
}
.container {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1400px;
margin: auto;
}
header h1 {
font-family: 'Orbitron', monospace;
font-weight: 900;
font-size: 2rem;
background: linear-gradient(45deg, var(--neon-blue), var(--neon-pink));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from { filter: drop-shadow(0 0 20px var(--neon-blue)); }
to { filter: drop-shadow(0 0 30px var(--neon-pink)); }
}
nav {
display: flex;
gap: 2rem;
}
nav a {
color: #fff;
text-decoration: none;
position: relative;
padding: 0.5rem 1rem;
border: 1px solid transparent;
border-radius: 25px;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
font-weight: 500;
}
nav a::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 25px;
padding: 1px;
background: linear-gradient(45deg, var(--neon-blue), var(--neon-pink));
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask-composite: exclude;
opacity: 0;
transition: opacity 0.3s ease;
}
nav a:hover::before {
opacity: 1;
}
nav a:hover {
color: var(--neon-blue);
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}
/* Main course page styling */
main.course-page {
max-width: 1000px;
margin: 4rem auto;
background: var(--glass);
backdrop-filter: blur(20px);
padding: 3rem;
border-radius: 30px;
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
animation: coursePageFloat 8s ease-in-out infinite;
position: relative;
overflow: hidden;
}
.course-page::before {
content: '';
position: absolute;
top: -100%;
left: -100%;
width: 300%;
height: 300%;
background: conic-gradient(
from 0deg,
transparent,
var(--neon-blue),
transparent,
var(--neon-green),
transparent
);
animation: rotate 15s linear infinite;
z-index: -1;
border-radius: 50%;
opacity: 0.05;
}
@keyframes coursePageFloat {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-15px); }
}
@keyframes rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
main h2 {
font-family: 'Orbitron', monospace;
text-align: center;
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 1.5rem;
background: linear-gradient(45deg, var(--neon-green), var(--neon-blue), var(--neon-pink));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: textShimmer 4s ease-in-out infinite;
text-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
}
@keyframes textShimmer {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
main > p {
text-align: center;
font-size: 1.2rem;
opacity: 0.9;
margin-bottom: 3rem;
line-height: 1.8;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
/* Lesson sections with advanced styling */
.lesson {
background: var(--glass);
backdrop-filter: blur(15px);
padding: 2rem;
border-radius: 20px;
margin-bottom: 2rem;
border: 1px solid rgba(255, 255, 255, 0.15);
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
position: relative;
overflow: hidden;
animation: lessonFloat 6s ease-in-out infinite;
}
.lesson:nth-child(odd) { animation-delay: -2s; }
.lesson:nth-child(even) { animation-delay: -4s; }
@keyframes lessonFloat {
0%, 100% { transform: translateY(0px) rotateX(0deg); }
50% { transform: translateY(-8px) rotateX(1deg); }
}
.lesson::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(0, 212, 255, 0.1),
rgba(255, 0, 128, 0.1),
transparent
);
transition: left 0.6s ease;
z-index: 0;
}
.lesson:hover::before {
left: 100%;
}
.lesson:hover {
transform: translateY(-12px) scale(1.02);
box-shadow:
0 25px 50px rgba(0, 0, 0, 0.4),
0 0 40px rgba(0, 212, 255, 0.3);
border-color: var(--neon-blue);
}
.lesson h3 {
font-family: 'Orbitron', monospace;
font-size: 1.4rem;
margin-bottom: 1rem;
color: var(--neon-green);
text-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
position: relative;
z-index: 1;
}
.lesson p {
opacity: 0.9;
margin-bottom: 1.5rem;
line-height: 1.7;
font-size: 1.1rem;
position: relative;
z-index: 1;
}
/* OSI Layers List Styling */
ul {
padding-right: 0;
list-style: none;
position: relative;
z-index: 1;
}
ul li {
background: linear-gradient(45deg,
rgba(0, 212, 255, 0.1),
rgba(255, 0, 128, 0.1)
);
margin-bottom: 0.8rem;
padding: 1rem 1.5rem;
border-radius: 15px;
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
backdrop-filter: blur(10px);
}
ul li::before {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 4px;
background: linear-gradient(180deg, var(--neon-blue), var(--neon-pink));
transition: width 0.3s ease;
}
ul li:hover::before {
width: 100%;
opacity: 0.1;
}
ul li:hover {
background: rgba(0, 212, 255, 0.15);
transform: translateX(-10px);
box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
border-color: var(--neon-blue);
}
/* Different colors for each OSI layer */
ul li:nth-child(1) { border-right: 4px solid var(--neon-pink); }
ul li:nth-child(2) { border-right: 4px solid var(--neon-orange); }
ul li:nth-child(3) { border-right: 4px solid var(--neon-green); }
ul li:nth-child(4) { border-right: 4px solid var(--neon-blue); }
ul li:nth-child(5) { border-right: 4px solid var(--neon-purple); }
ul li:nth-child(6) { border-right: 4px solid var(--neon-pink); }
ul li:nth-child(7) { border-right: 4px solid var(--neon-green); }
/* Back button with advanced styling */
.back-button {
display: block;
width: fit-content;
margin: 3rem auto 0;
background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
color: #fff;
padding: 1rem 2.5rem;
border-radius: 50px;
text-decoration: none;
font-weight: bold;
font-size: 1.1rem;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 10px 30px rgba(57, 255, 20, 0.3);
border: 2px solid transparent;
}
.back-button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
transition: left 0.5s ease;
}
.back-button:hover::before {
left: 100%;
}
.back-button:hover {
transform: translateY(-5px) scale(1.05);
box-shadow: 0 20px 40px rgba(57, 255, 20, 0.5);
border-color: var(--neon-green);
}
/* Footer with neon styling */
footer {
text-align: center;
padding: 3rem 1rem;
margin-top: 4rem;
border-top: 1px solid rgba(0, 212, 255, 0.3);
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(20px);
}
footer p {
font-size: 1rem;
opacity: 0.8;
color: var(--neon-blue);
text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}
/* Animations */
@keyframes slideInDown {
from { transform: translateY(-100px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
/* Progress indicator */
.progress-bar {
position: fixed;
top: 0;
left: 0;
height: 4px;
background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
z-index: 10000;
transition: width 0.3s ease;
box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
/* Responsive design */
@media (max-width: 768px) {
/* Compact header styling */
header {
padding: 0.75rem 1rem; /* Reduced padding */
}
.container {
flex-direction: column;
gap: 0.75rem; /* Small gap between title and nav */
align-items: center;
}
/* Compact navigation */
nav {
flex-direction: row; /* Keep horizontal on mobile */
flex-wrap: wrap; /* Allow wrapping if needed */
gap: 0.5rem; /* Reduced gap between links */
justify-content: center;
}
nav a {
padding: 0.4rem 0.8rem; /* Smaller padding */
font-size: 0.9rem; /* Slightly smaller text */
border-radius: 20px; /* Smaller border radius */
}
/* Compact title */
header h1 {
font-size: 1.3rem; /* Smaller title */
margin-bottom: 0; /* Remove any margin */
}
main.course-page {
margin: 2rem 1rem;
padding: 2rem;
}
main h2 {
font-size: 2rem;
}
.lesson {
padding: 1.5rem;
}
}
</style>
</head>
<body>
<!-- Animated background -->
<div class="bg-animation"></div>
<div class="grid-overlay"></div>
<!-- Progress bar -->
<div class="progress-bar" id="progressBar"></div>
<header>
<div class="container">
<h1>آموزش شبکه</h1>
<nav>
<a href="index.html">صفحه اصلی</a>
<a href="about.html">درباره ما</a>
<a href="contact.html">تماس با ما</a>
<a href="login.html">ورود</a>
<a href="signup.html">ثبت نام</a>
</nav>
</div>
</header>
<main class="course-page">
<h2>دوره مبانی شبکه</h2>
<p>در این درس، با اصول پایه شبکه آشنا میشوید: مدل OSI، پروتکلها، و تجهیزات شبکه.</p>
<section class="lesson">
<h3>1. مدل OSI</h3>
<p>مدل OSI هفت لایه دارد که هر لایه وظیفه خاص خود را انجام میدهد.</p>
<ul>
<li>لایه فیزیکی</li>
<li>لایه دادهها</li>
<li>لایه شبکه</li>
<li>لایه انتقال</li>
<li>لایه جلسه</li>
<li>لایه نمایش</li>
<li>لایه کاربرد</li>
</ul>
</section>
<section class="lesson">
<h3>2. تجهیزات شبکه</h3>
<p>سوئیچها، روترها، هابها و کارت شبکهها ابزارهای اصلی شبکه هستند.</p>
</section>
<section class="lesson">
<h3>3. پروتکلها</h3>
<p>پروتکلها قوانین انتقال داده را مشخص میکنند، مثل TCP/IP و UDP.</p>
</section>
<a href="index.html" class="back-button">بازگشت به صفحه اصلی</a>
</main>
<footer>
<p>© 2025 همه حقوق محفوظ تیم وب سایت نویسان رجایی است.</p>
</footer>
<script>
// Create floating particles
function createParticles() {
const container = document.querySelector('.bg-animation');
for (let i = 0; i < 60; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
particle.style.left = Math.random() * 100 + '%';
particle.style.top = Math.random() * 100 + '%';
particle.style.width = Math.random() * 4 + 2 + 'px';
particle.style.height = particle.style.width;
particle.style.animationDuration = Math.random() * 4 + 3 + 's';
particle.style.animationDelay = Math.random() * 6 + 's';
container.appendChild(particle);
}
}
// Mouse trail effect
function createMouseTrail() {
document.addEventListener('mousemove', (e) => {
const trailElement = document.createElement('div');
trailElement.style.position = 'fixed';
trailElement.style.left = e.clientX + 'px';
trailElement.style.top = e.clientY + 'px';
trailElement.style.width = '6px';
trailElement.style.height = '6px';
trailElement.style.background = 'var(--neon-green)';
trailElement.style.borderRadius = '50%';
trailElement.style.pointerEvents = 'none';
trailElement.style.zIndex = '9999';
trailElement.style.opacity = '0.8';
trailElement.style.boxShadow = '0 0 10px var(--neon-green)';
document.body.appendChild(trailElement);
setTimeout(() => {
trailElement.remove();
}, 500);
});
}
// Progress bar
function updateProgressBar() {
const progressBar = document.getElementById('progressBar');
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
const scrollHeight = document.documentElement.scrollHeight - document.documentElement.clientHeight;
const scrollPercent = (scrollTop / scrollHeight) * 100;
progressBar.style.width = scrollPercent + '%';
}
// Intersection Observer for lesson animations
function setupIntersectionObserver() {
const lessons = document.querySelectorAll('.lesson');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.animation = 'lessonFloat 6s ease-in-out infinite';
}
});
}, { threshold: 0.1 });
lessons.forEach(lesson => {
observer.observe(lesson);
});
}
// OSI Layer click effects
function setupOSILayerEffects() {
const layers = document.querySelectorAll('ul li');
layers.forEach((layer, index) => {
layer.addEventListener('click', () => {
// Create ripple effect
const ripple = document.createElement('div');
ripple.style.position = 'absolute';
ripple.style.width = '100px';
ripple.style.height = '100px';
ripple.style.background = 'var(--neon-blue)';
ripple.style.borderRadius = '50%';
ripple.style.transform = 'scale(0)';
ripple.style.animation = 'ripple 0.6s ease-out';
ripple.style.opacity = '0.3';
ripple.style.pointerEvents = 'none';
ripple.style.left = '50%';
ripple.style.top = '50%';
ripple.style.transform = 'translate(-50%, -50%) scale(0)';
layer.style.position = 'relative';
layer.appendChild(ripple);
setTimeout(() => ripple.remove(), 600);
});
});
}
// Add ripple animation
const style = document.createElement('style');
style.textContent = `
@keyframes ripple {
to {
transform: translate(-50%, -50%) scale(4);
opacity: 0;
}
}
`;
document.head.appendChild(style);
// Initialize all effects
document.addEventListener('DOMContentLoaded', () => {
createParticles();
createMouseTrail();
setupIntersectionObserver();
setupOSILayerEffects();
// Update progress bar on scroll
window.addEventListener('scroll', updateProgressBar);
});
// Smooth scrolling for navigation
document.querySelectorAll('nav a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
</script>
</body>
</html>