|
| 1 | +/*Title Container*/ |
1 | 2 | .container {
|
2 | 3 | text-align: center;
|
3 | 4 | padding-top: 100px;
|
4 | 5 | }
|
5 | 6 |
|
| 7 | +/*Title Text*/ |
6 | 8 | .title {
|
7 | 9 | font-size: 800%;
|
8 | 10 | font-weight: bold;
|
|
11 | 13 | display: inline;
|
12 | 14 | }
|
13 | 15 |
|
| 16 | +/*Actual Content*/ |
14 | 17 | .content {
|
15 | 18 | padding: 100px;
|
16 | 19 | padding-top: 0;
|
17 | 20 | font-size: 300%;
|
18 | 21 | text-align: center;
|
19 | 22 | }
|
20 | 23 |
|
| 24 | +/*Contains both title and actual content*/ |
21 | 25 | .main {
|
22 | 26 | position:absolute;
|
23 | 27 | color: #323232;
|
|
29 | 33 | height: 200%;
|
30 | 34 | }
|
31 | 35 |
|
| 36 | +/*Sidebar's Box*/ |
32 | 37 | .sidebar {
|
33 | 38 | text-align: center;
|
34 | 39 | height: 100%;
|
35 | 40 | width: 70%;
|
36 |
| - font-size: 350%; |
37 | 41 | position: fixed;
|
38 | 42 | top: 0;
|
39 | 43 | background-color: MediumSeaGreen;
|
|
42 | 46 | transition: 200ms all ease;
|
43 | 47 | }
|
44 | 48 |
|
| 49 | +/*Sidebar Links*/ |
45 | 50 | .sidebar a {
|
46 | 51 | display: block;
|
47 | 52 | color: white;
|
| 53 | + font-size: 350%; |
48 | 54 | padding: 40px;
|
49 | 55 | text-decoration: none;
|
50 | 56 | transition: 200ms all;
|
51 | 57 | font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
|
52 | 58 | }
|
53 | 59 |
|
54 |
| - |
| 60 | +/*Easter Egg*/ |
55 | 61 | .easter-egg-button {
|
56 | 62 | bottom: -450px;
|
57 | 63 | }
|
58 | 64 |
|
| 65 | +/*Hidden checkbox for sidebar-toggle*/ |
59 | 66 | #sidebar-toggle {
|
60 | 67 | display: none;
|
61 | 68 | }
|
62 | 69 |
|
| 70 | +/*The fancy button button for opening sidebar*/ |
63 | 71 | .sidebar-toggle-button::before {
|
64 | 72 | text-align: center;
|
65 | 73 | content: "☰";
|
|
75 | 83 | font-size: 72px;
|
76 | 84 | }
|
77 | 85 |
|
| 86 | +/*Executing Anmiation for opening the sidebar*/ |
78 | 87 | #sidebar-toggle:checked ~ .sidebar-toggle-button::before {
|
79 | 88 | animation-name: to-x;
|
80 | 89 | animation-duration: 500ms;
|
81 | 90 | animation-fill-mode: forwards;
|
82 | 91 | }
|
83 | 92 |
|
| 93 | +/*Executing Anmiation for closing the sidebar*/ |
84 | 94 | #sidebar-toggle:not(checked) ~ .sidebar-toggle-button::before {
|
85 | 95 | animation-name: to-ham;
|
86 | 96 | animation-duration: 500ms;
|
87 | 97 | animation-fill-mode: forwards;
|
88 | 98 | }
|
89 | 99 |
|
| 100 | +/*the sidebar button animations*/ |
90 | 101 | @keyframes to-ham {
|
91 |
| - from { |
92 |
| - content: "✕"; |
93 |
| - } |
94 | 102 | to {
|
95 | 103 | transform:rotateZ(1turn);
|
96 | 104 | content: "☰";
|
97 | 105 | }
|
98 | 106 | }
|
99 |
| - |
100 | 107 | @keyframes to-x {
|
101 |
| - from { |
102 |
| - content: "☰"; |
103 |
| - } |
104 | 108 | to {
|
105 | 109 | transform:rotateZ(-1turn);
|
106 | 110 | content: "✕";
|
107 | 111 | }
|
108 | 112 | }
|
109 | 113 |
|
| 114 | +/*Shadow on main content when sidebar is open*/ |
110 | 115 | #sidebar-toggle:checked ~ .sidebar {
|
111 | 116 | right: 0px;
|
112 | 117 | box-shadow: 0px 0px 200px 500px hsla(0, 0%, 0%, 0.732);
|
113 | 118 | }
|
114 | 119 |
|
| 120 | +/*Hover effect for links in the sidebar*/ |
115 | 121 | .sidebar > a:hover {
|
116 | 122 | color: #323232;
|
117 | 123 | }
|
118 | 124 |
|
| 125 | +/*hidden checkbox for theme-toggle*/ |
| 126 | +#theme-toggle { |
| 127 | + display: none; |
| 128 | +} |
| 129 | + |
| 130 | +/*fancy button for theme toggle*/ |
119 | 131 | .theme-toggle-button::before {
|
120 | 132 | content: "☀️";
|
121 | 133 | font-size: 81.5px;
|
|
129 | 141 | border-radius: 50%;
|
130 | 142 | z-index: 9999;
|
131 | 143 | }
|
132 |
| - |
133 |
| -#theme-toggle { |
134 |
| - display: none; |
135 |
| -} |
136 |
| - |
137 |
| -#theme-toggle:checked + .theme-toggle-button { |
138 |
| - background-color: #323232; |
139 |
| -} |
140 |
| - |
| 144 | +/*Animation for theme-toggle button*/ |
141 | 145 | @keyframes to-moon {
|
142 |
| - from { |
143 |
| - content: "☀️"; |
144 |
| - } |
| 146 | + from {} |
145 | 147 | to {
|
146 | 148 | transform:rotateZ(1turn);
|
147 | 149 | content: "🌑";
|
148 | 150 | }
|
149 | 151 | }
|
150 |
| - |
151 | 152 | @keyframes to-sun {
|
152 |
| - from { |
153 |
| - content: "🌑"; |
154 |
| - } |
| 153 | + from {} |
155 | 154 | to {
|
156 | 155 | transform:rotateZ(-1turn);
|
157 | 156 | content: "☀️";
|
158 | 157 | }
|
159 | 158 | }
|
160 | 159 |
|
| 160 | +/*executing theme-toggle animation*/ |
161 | 161 | #theme-toggle:checked ~ .theme-toggle-button::before {
|
162 | 162 | animation-name: to-moon;
|
163 | 163 | animation-duration: 500ms;
|
164 | 164 | animation-fill-mode: forwards;
|
165 | 165 | }
|
166 |
| - |
167 | 166 | #theme-toggle:not(checked) ~ .theme-toggle-button::before {
|
168 | 167 | animation-name: to-sun;
|
169 | 168 | animation-duration: 500ms;
|
170 | 169 | animation-fill-mode: forwards;
|
171 | 170 | }
|
172 | 171 |
|
| 172 | +/*actual theme change on the main content*/ |
173 | 173 | #theme-toggle:checked ~ .main {
|
174 | 174 | background: #051428;
|
175 | 175 | color: #faebd7;
|
176 | 176 | }
|
177 | 177 |
|
| 178 | +/*actual theme change on the sidebar*/ |
178 | 179 | #theme-toggle:checked ~ .sidebar {
|
179 | 180 | background-color: #102f1e;
|
180 | 181 | }
|
181 | 182 |
|
182 |
| -#theme-toggle:checked ~ .sidebar-toggle-button { |
183 |
| - color: white; |
184 |
| -} |
185 |
| - |
| 183 | +/*adjusting easter-egg's size*/ |
186 | 184 | .easter-egg-button > img {
|
187 | 185 | padding-top: 75%;
|
188 | 186 | }
|
189 | 187 |
|
| 188 | + |
| 189 | +/*optimizations for the desktop*/ |
190 | 190 | @media (min-width: 1280px) {
|
| 191 | + /*adjust the theme-toggle size*/ |
191 | 192 | .theme-toggle-button::before {
|
192 | 193 | content: "☀️";
|
193 | 194 | font-size: 225%;
|
|
201 | 202 | z-index: 9999;
|
202 | 203 | }
|
203 | 204 |
|
| 205 | + /*disable sidebar's shadow*/ |
204 | 206 | #sidebar-toggle:checked ~ .sidebar {
|
205 | 207 | right: 0px;
|
206 | 208 | box-shadow: 0px 0px 0px 0px hsla(0, 0%, 0%, 0);
|
207 | 209 | }
|
208 | 210 |
|
| 211 | + /*make font smaller and always keep the sidebar open*/ |
209 | 212 | .sidebar {
|
210 | 213 | text-align: center;
|
211 | 214 | height: 100%;
|
212 | 215 | width: 12%;
|
213 |
| - font-size: 150%; |
214 | 216 | position: fixed;
|
215 | 217 | top: 0;
|
216 | 218 | background-color: MediumSeaGreen;
|
217 | 219 | padding-top: 25px;
|
218 | 220 | right: 0%;
|
219 | 221 | transition: 200ms all ease;
|
220 | 222 | }
|
221 |
| - |
| 223 | + |
| 224 | + /*make the sidebar links font smaller*/ |
222 | 225 | .sidebar a {
|
223 |
| - display: flex; |
224 | 226 | justify-content: space-evenly;
|
| 227 | + font-size: 150%; |
225 | 228 | color: white;
|
226 | 229 | padding: 35px;
|
227 | 230 | text-decoration: none;
|
|
230 | 233 | white-space: nowrap;
|
231 | 234 | }
|
232 | 235 |
|
| 236 | + /*disable the mobile sidebar toggle*/ |
233 | 237 | .sidebar-toggle-button {
|
234 | 238 | display: none;
|
235 | 239 | }
|
236 | 240 |
|
237 |
| - #theme-toggle:checked ~ .main { |
238 |
| - background: #051428; |
239 |
| - color: #faebd7; |
240 |
| - } |
241 |
| - |
| 241 | + /*adjust easteregg size for desktop*/ |
242 | 242 | .easter-egg-button > img {
|
243 | 243 | max-width: 75%;
|
244 | 244 | padding-top: 225%;
|
245 | 245 | }
|
246 | 246 |
|
| 247 | + /*move the main content to make space for the always open sidebar*/ |
247 | 248 | .main {
|
248 | 249 | padding-top: 0;
|
249 | 250 | right: 12%;
|
250 | 251 | }
|
251 | 252 |
|
| 253 | + /*make title smaller*/ |
252 | 254 | .title {
|
253 | 255 | font-size: 500%;
|
254 | 256 | font-weight: bold;
|
|
257 | 259 | display: inline;
|
258 | 260 | }
|
259 | 261 |
|
| 262 | + /*reduce font size because large text is not needed on the desktop*/ |
260 | 263 | .content {
|
261 | 264 | font-size: 200%;
|
262 | 265 | }
|
|
0 commit comments