-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
266 lines (237 loc) · 5.82 KB
/
style.css
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
/*remove the white border around the screen*/
body {
margin: 0%;
}
/*Title Container*/
.container {
text-align: center;
padding-top: 100px;
}
/*Title Text*/
.title {
font-size: 800%;
font-weight: bold;
text-align: center;
padding: 2px;
display: inline;
}
/*Actual Content*/
.content {
padding: 100px;
padding-top: 0;
font-size: 300%;
text-align: center;
}
/*Contains both title and actual content*/
.main {
position:absolute;
color: #323232;
background-color:#faebd7;
transition: 200ms all ease;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
height: 200%;
}
/*Sidebar's Box*/
.sidebar {
text-align: center;
height: 100%;
width: 70%;
position: fixed;
top: 0;
background-color: MediumSeaGreen;
padding-top: 250px;
right: -70%;
transition: 200ms all ease;
}
/*Sidebar Links*/
.sidebar a {
display: flex;
justify-content:space-evenly;
color: white;
font-size: 350%;
padding: 40px;
text-decoration: none;
transition: 200ms all;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
/*Hidden checkbox for sidebar-toggle*/
#sidebar-toggle {
display: none;
}
/*The fancy button button for opening sidebar*/
.sidebar-toggle-button::before {
text-align: center;
content: "☰";
font-size: 100%;
position: fixed;
top: 2%;
width: 100px;
height: 100px;
background-color: white;
border-radius: 50%;
left: 88%;
z-index: 9999;
font-size: 72px;
}
/*Executing Anmiation for opening the sidebar*/
#sidebar-toggle:checked ~ .sidebar-toggle-button::before {
animation-name: to-x;
animation-duration: 500ms;
animation-fill-mode: forwards;
}
/*Executing Anmiation for closing the sidebar*/
#sidebar-toggle:not(checked) ~ .sidebar-toggle-button::before {
animation-name: to-ham;
animation-duration: 500ms;
animation-fill-mode: forwards;
}
/*the sidebar button animations*/
@keyframes to-ham {
to {
transform:rotateZ(1turn);
content: "☰";
}
}
@keyframes to-x {
to {
transform:rotateZ(-1turn);
content: "✕";
}
}
/*Shadow on main content when sidebar is open*/
#sidebar-toggle:checked ~ .sidebar {
right: 0px;
box-shadow: 0px 0px 200px 500px hsla(0, 0%, 0%, 0.732);
}
/*Hover effect for links in the sidebar*/
.sidebar > a:hover {
color: #323232;
}
/*hidden checkbox for theme-toggle*/
#theme-toggle {
display: none;
}
/*fancy button for theme toggle*/
.theme-toggle-button::before {
content: "☀️";
font-size: 81.5px;
text-align: center;
position: fixed;
top: 2%;
left: 2%;
width: 100px;
height: 100px;
background-color: white;
border-radius: 50%;
z-index: 9999;
}
/*Animation for theme-toggle button*/
@keyframes to-moon {
from {}
to {
transform:rotateZ(1turn);
content: "🌑";
}
}
@keyframes to-sun {
from {}
to {
transform:rotateZ(-1turn);
content: "☀️";
}
}
/*executing theme-toggle animation*/
#theme-toggle:checked ~ .theme-toggle-button::before {
animation-name: to-moon;
animation-duration: 500ms;
animation-fill-mode: forwards;
}
#theme-toggle:not(checked) ~ .theme-toggle-button::before {
animation-name: to-sun;
animation-duration: 500ms;
animation-fill-mode: forwards;
}
/*actual theme change on the main content*/
#theme-toggle:checked ~ .main {
background: #051428;
color: #faebd7;
}
/*actual theme change on the sidebar*/
#theme-toggle:checked ~ .sidebar {
background-color: #102f1e;
}
/*adjusting easter-egg's size*/
.easter-egg-button > img {
margin-top: 75%;
}
/*optimizations for the desktop*/
@media (min-width: 1280px) {
/*adjust the theme-toggle size*/
.theme-toggle-button::before {
content: "☀️";
font-size: 225%;
position: absolute;
top: 2%;
left: 2%;
width: 50px;
height: 50px;
background-color: white;
border-radius: 50%;
z-index: 9999;
}
/*disable sidebar's shadow*/
#sidebar-toggle:checked ~ .sidebar {
right: 0px;
box-shadow: 0px 0px 0px 0px hsla(0, 0%, 0%, 0);
}
/*make font smaller and always keep the sidebar open*/
.sidebar {
text-align: center;
height: 100%;
width: 12%;
position: fixed;
top: 0;
background-color: MediumSeaGreen;
padding-top: 25px;
right: 0%;
transition: 200ms all ease;
}
/*make the sidebar links font smaller*/
.sidebar a {
display: flex;
justify-content: space-evenly;
font-size: 150%;
color: white;
padding: 35px;
text-decoration: none;
transition: 200ms all;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
white-space: nowrap;
}
/*disable the mobile sidebar toggle*/
.sidebar-toggle-button {
display: none;
}
/*adjust easteregg size for desktop*/
.easter-egg-button > img {
max-width: 75%;
margin-top: 225%;
}
/*move the main content to make space for the always open sidebar*/
.main {
padding-top: 0;
right: 12%;
}
/*make title smaller*/
.title {
font-size: 500%;
font-weight: bold;
text-align: center;
padding: 2px;
display: inline;
}
/*reduce font size because large text is not needed on the desktop*/
.content {
font-size: 200%;
}
}