|
1 | 1 | .header-container { |
2 | | - background-color: #1e1e1e; |
3 | | - padding: 20px 40px; |
| 2 | + background-color: #1e1e1e; /* Dark background for the header */ |
| 3 | + padding: 20px 40px; /* Spacing around the header content */ |
4 | 4 | display: flex; |
5 | | - align-items: center; |
6 | | - justify-content: space-between; |
7 | | - color: #fff; |
| 5 | + align-items: center; /* Vertically align items in the header */ |
| 6 | + justify-content: space-between; /* Space items evenly (logo on the left, nav on the right) */ |
| 7 | + color: #fff; /* White text color */ |
8 | 8 | font-family: 'RobotoMono', sans-serif; |
9 | | - position: relative; |
10 | | - z-index: 1000; |
| 9 | + position: relative; /* Set relative position for z-index control */ |
| 10 | + z-index: 1000; /* Ensure the header stays on top of other elements */ |
11 | 11 | } |
12 | 12 |
|
13 | 13 | .logo { |
14 | | - font-size: 24px; |
15 | | - font-weight: bold; |
16 | | - letter-spacing: 2px; |
17 | | - color: #e1e1e1; |
18 | | - text-decoration: none; |
| 14 | + font-size: 24px; /* Size of the logo text */ |
| 15 | + font-weight: bold; /* Bold text for emphasis */ |
| 16 | + letter-spacing: 2px; /* Add space between the letters */ |
| 17 | + color: #e1e1e1; /* Light gray color for the logo */ |
| 18 | + text-decoration: none; /* Remove underline from logo text */ |
19 | 19 |
|
20 | 20 | &:hover { |
21 | | - color: #9b59b6; |
| 21 | + color: #9b59b6; /* Change logo color to purple on hover */ |
22 | 22 | } |
23 | 23 | } |
24 | 24 |
|
25 | 25 | .nav { |
26 | 26 | display: flex; |
27 | | - align-items: center; |
| 27 | + align-items: center; /* Vertically align navigation links */ |
28 | 28 |
|
| 29 | + /* Mobile: Show the nav as a full-screen menu when open */ |
29 | 30 | @media (max-width: 768px) { |
30 | | - position: fixed; |
| 31 | + position: fixed; /* Fix the nav in place on small screens */ |
31 | 32 | top: 0; |
32 | | - right: -100%; |
33 | | - width: 100%; |
34 | | - height: 100%; |
35 | | - background-color: #1e1e1e; |
36 | | - flex-direction: column; |
37 | | - justify-content: center; |
38 | | - transition: right 0.3s ease-in-out; |
39 | | - z-index: 999; |
| 33 | + right: -100%; /* Initially hide the nav by moving it offscreen */ |
| 34 | + width: 100%; /* Full width for the mobile menu */ |
| 35 | + height: 100%; /* Full height for the mobile menu */ |
| 36 | + background-color: #1e1e1e; /* Same dark background */ |
| 37 | + flex-direction: column; /* Stack the nav items vertically */ |
| 38 | + justify-content: center; /* Center nav items vertically */ |
| 39 | + transition: right 0.3s ease-in-out; /* Smooth slide-in effect */ |
| 40 | + z-index: 999; /* Layer it above other content */ |
40 | 41 | } |
41 | 42 |
|
42 | 43 | &.open { |
43 | | - right: 0; |
| 44 | + right: 0; /* Slide the nav into view when it's open */ |
44 | 45 | } |
45 | 46 | } |
46 | 47 |
|
47 | 48 | .nav-link { |
48 | 49 | display: flex; |
49 | | - align-items: center; |
50 | | - margin-left: 40px; |
51 | | - color: #d3d3d3; |
52 | | - text-decoration: none; |
53 | | - font-size: 18px; |
54 | | - transition: color 0.3s; |
| 50 | + align-items: center; /* Vertically align link content */ |
| 51 | + margin-left: 40px; /* Add space between the links */ |
| 52 | + color: #d3d3d3; /* Light gray for the link text */ |
| 53 | + text-decoration: none; /* Remove underline from links */ |
| 54 | + font-size: 18px; /* Set the link text size */ |
| 55 | + transition: color 0.3s; /* Smooth color transition on hover */ |
55 | 56 | font-family: 'RobotoMono', sans-serif; |
56 | 57 |
|
57 | 58 | &:hover { |
58 | | - color: #9b59b6; |
| 59 | + color: #9b59b6; /* Change link color to purple on hover */ |
59 | 60 | } |
60 | 61 |
|
61 | 62 | svg { |
62 | | - margin-right: 8px; |
| 63 | + margin-right: 8px; /* Add space between the icon and the text */ |
63 | 64 | } |
64 | 65 |
|
| 66 | + /* Mobile: Adjust link spacing and size */ |
65 | 67 | @media (max-width: 768px) { |
66 | 68 | margin-left: 0; |
67 | | - margin-bottom: 20px; |
68 | | - font-size: 24px; |
| 69 | + margin-bottom: 20px; /* Add space between links */ |
| 70 | + font-size: 24px; /* Larger font size on mobile */ |
69 | 71 | } |
70 | 72 | } |
71 | 73 |
|
72 | 74 | .hamburger { |
73 | | - display: none; |
74 | | - cursor: pointer; |
| 75 | + display: none; /* Hide the hamburger menu by default */ |
| 76 | + cursor: pointer; /* Pointer cursor to indicate it's clickable */ |
75 | 77 |
|
| 78 | + /* Mobile: Show the hamburger menu icon */ |
76 | 79 | @media (max-width: 768px) { |
77 | 80 | display: block; |
78 | 81 | position: absolute; |
79 | | - top: 20px; |
80 | | - right: 20px; |
81 | | - z-index: 1001; |
| 82 | + top: 20px; /* Position the hamburger at the top */ |
| 83 | + right: 20px; /* Align the hamburger to the right */ |
| 84 | + z-index: 1001; /* Layer the hamburger above the nav */ |
82 | 85 | } |
83 | 86 | } |
84 | 87 |
|
85 | 88 | .button { |
86 | 89 | display: flex; |
87 | | - align-items: center; |
88 | | - margin-left: 40px; |
89 | | - padding: 8px 16px; |
90 | | - border: 2px solid #9b59b6; |
91 | | - color: #9b59b6; |
92 | | - text-decoration: none; |
93 | | - font-size: 18px; |
94 | | - transition: all 0.3s; |
| 90 | + align-items: center; /* Vertically align button content */ |
| 91 | + margin-left: 40px; /* Space between the button and nav links */ |
| 92 | + padding: 8px 16px; /* Padding inside the button */ |
| 93 | + border: 2px solid #9b59b6; /* Purple border around the button */ |
| 94 | + color: #9b59b6; /* Purple text */ |
| 95 | + text-decoration: none; /* Remove underline from the button text */ |
| 96 | + font-size: 18px; /* Set the button text size */ |
| 97 | + transition: all 0.3s; /* Smooth transition for background and text color */ |
95 | 98 | font-family: 'RobotoMono', sans-serif; |
96 | | - border-radius: 5px; |
| 99 | + border-radius: 5px; /* Rounded button corners */ |
97 | 100 |
|
98 | 101 | &:hover { |
99 | | - background-color: #9b59b6; |
100 | | - color: #fff; |
| 102 | + background-color: #9b59b6; /* Purple background on hover */ |
| 103 | + color: #fff; /* White text on hover */ |
101 | 104 | } |
102 | 105 |
|
103 | 106 | svg { |
104 | | - margin-right: 8px; |
| 107 | + margin-right: 8px; /* Space between the icon and text */ |
105 | 108 | } |
106 | 109 |
|
| 110 | + /* Mobile: Adjust button spacing and size */ |
107 | 111 | @media (max-width: 768px) { |
108 | 112 | margin-left: 0; |
109 | | - margin-bottom: 20px; |
110 | | - font-size: 24px; |
| 113 | + margin-bottom: 20px; /* Add space between the button and other elements */ |
| 114 | + font-size: 24px; /* Increase button font size on mobile */ |
111 | 115 | } |
112 | 116 | } |
113 | 117 |
|
114 | 118 | .close-icon { |
115 | | - display: block; |
116 | | - z-index: 1002; |
| 119 | + display: block; /* Show the close icon by default */ |
| 120 | + z-index: 1002; /* Ensure the close icon is above the nav */ |
117 | 121 | } |
0 commit comments