_sass/main.scss (view raw)
1$color-main-bg: #f0f0f0;
2$color-dark-bg: #070707;
3$color-main-blue: #397eaf;
4$color-dark-blue: #2e4054;
5$color-main-grey: #e1e1e1;
6$color-main-grey-dark: #c4c4c4;
7$color-dark-grey: #1f1f1f;
8$color-darker-grey: #101010;
9$color-link-idle: #707070;
10$color-link-hover: #999999;
11$color-nav-current: #333333;
12$nav-alpha: 0.95;
13$body-width: 835px;
14$border-main: 5px solid;
15$border-nav: $border-main $color-main-grey;
16$border-dark: $border-main $color-dark-grey;
17$font-title: Montserrat, sans-serif;
18$body-font: Lato, sans-serif;
19$code-font: Fira Code, monospace;
20
21html {
22 background: $color-main-bg;
23}
24
25body {
26 max-width: $body-width;
27 min-width: 378px;
28 margin: 0 auto;
29 padding: 8px;
30 color: $color-dark-bg;
31 font: 100% $body-font;
32}
33a {
34 color: $color-link-idle;
35 text-decoration: none;
36}
37a:hover {
38 color: $color-link-hover;
39}
40
41.current {
42 color: $color-nav-current;
43 pointer-events: none;
44 font-weight: 500;
45}
46
47nav {
48 display: flex;
49 position: fixed;
50 z-index: 10;
51 top: 0;
52 width: 100%;
53 max-width: 843px;
54 height: 102px;
55 font: 400 1.5em $font-title;
56 letter-spacing: -1.2px;
57 background: rgba($color-main-bg, $nav-alpha);
58
59 img {
60 margin-right: 8px;
61 }
62
63 ul {
64 display: inline-flex;
65 width: 430px;
66 height: 32px;
67 padding: 50px 30px 0 0;
68 flex-direction: row;
69 justify-content: space-between;
70 border-bottom: $border-nav;
71 }
72}
73
74h1, h2, h3, h4, h5, h6 {
75 margin: 0;
76 color: $color-main-blue;
77 font-family: $font-title;
78 font-weight: 500;
79}
80
81ul {
82 margin: 0;
83 padding: 0;
84 li {
85 list-style-type:none;
86 }
87}
88
89.content {
90 margin-top: 95px;
91}
92
93.about {
94 display: flex;
95 flex-direction: row;
96 img#avatar {
97 border-radius: 100%;
98 height: 128px;
99 }
100 .about-sidebar {
101 flex: 23%;
102 }
103 .about-links {
104 margin-top: 1em;
105 .link-icon {
106 width: 32px;
107 }
108 .link-text {
109 display: inline;
110 position: relative;
111 bottom: 0.75em;
112 }
113 }
114 .about-info {
115 width: 100%;
116 p:first-child {
117 margin-top: 0;
118 }
119 }
120}
121
122.post {
123 padding: 1em;
124 margin: 1em 0;
125 border-radius: 25px 25px 25px 0px;
126 border: 2px solid $color-main-grey;
127 word-wrap: break-word;
128 small p {
129 display: inline;
130 }
131 p {
132 img {
133 display: block;
134 max-width: 100%;
135 margin: 0 auto;
136 border-radius: 1em;
137 }
138 }
139}
140
141.post-page {
142 margin-bottom: 10px;
143 .post-header {
144 margin-bottom: 2em;
145 ul {
146 display: flex;
147 float: right;
148 flex-direction: row;
149 li {
150 margin-right: 0.5em;
151 a {
152 background: $color-main-grey;
153 border-radius: 5px;
154 padding: 2px;
155 }
156 }
157 }
158 }
159
160 ul {
161 padding-left: 10px;
162 }
163}
164
165.art-menu {
166 $art-thumb-wt: ($body-width / 2) - 16;
167 $art-thumb-ht: 300px;
168 //$art-thumb-ht: $art-thumb-wt;
169 display: flex;
170 flex-flow: row wrap;
171 align-items: flex-start;
172 justify-content: space-around;
173 align-content: center;
174 .art-category {
175 margin-bottom: 1em;
176 .link-mask {
177 position: absolute;
178 z-index: 1;
179 width: $art-thumb-wt;
180 height: $art-thumb-ht;
181 line-height: $art-thumb-ht - 16;
182 text-align: center;
183 background: $color-main-bg;
184 opacity: 0;
185 transition: opacity 0.2s ease-in-out;
186 font-size: 200%;
187 color: $color-dark-bg;
188
189 &:hover {
190 opacity: 0.7;
191 }
192 }
193 .thumbnail {
194 width: $art-thumb-wt;
195 height: $art-thumb-ht;
196 position: relative;
197
198 &::after {
199 content: "";
200 display: block;
201 padding-bottom: 100%;
202 }
203
204 img {
205 position: absolute;
206 width: 100%;
207 height: 100%;
208 image-orientation: initial;
209 object-fit: cover;
210 }
211 }
212 }
213}
214
215.art {
216 display: flex;
217 flex-flow: row wrap;
218
219 .art-img {
220 margin: 0.5em 0;
221 img {
222 width: 100%;
223 height: auto;
224 image-orientation: from-image;
225 }
226 }
227}
228
229
230blockquote {
231 margin: 0.5em;
232 padding: 1em;
233 background: $color-main-grey-dark;
234 border-width: 2px 2px 2px 5px;
235 border-color: $color-main-grey;
236 border-style: solid;
237 border-radius: 0.5em;
238}
239
240code {
241 font-family: $code-font;
242 font-size: 0.9em;
243 background: $color-main-grey;
244 padding: 2px;
245 border-radius: 5px;
246}
247div.highlight {
248 overflow-x: auto;
249 background: $color-main-grey;
250 padding-left: 0.5em;
251 border-radius: 5px;
252 code {
253 padding: 0;
254 }
255}
256
257audio {
258 width: 100%;
259 border-radius: 25px;
260}
261
262footer {
263 padding-top: 0.5em;
264 border-top: $border-nav;
265 text-align: center;
266 font: 75% $body-font;
267 p {
268 margin: 0;
269 }
270}
271
272@media only screen and (max-width: 760px) {
273 footer p {
274 padding: 0;
275 }
276 nav {
277 margin-bottom: 5vh;
278 height: 130px;
279 ul {
280 width: 100%;
281 padding-top: 48px;
282 position: relative;
283 top: 5vh;
284 }
285 img {
286 position: absolute;
287 top: 0;
288 }
289 }
290 .content {
291 margin-top: 140px;
292 }
293 .about {
294 flex-direction: column-reverse;
295 .about-sidebar {
296 display: flex;
297 flex-direction: column;
298 img {
299 width: 128px;
300 margin: 0 auto;
301 }
302 }
303 .about-links {
304 margin-top: 0;
305 p:first-child {
306 margin: 0;
307 padding-top: 0;
308 }
309 ul {
310 padding-top: 1em;
311 display: flex;
312 flex-wrap: wrap;
313 li {
314 margin: auto;
315 padding: 0 0.5em;
316 }
317 }
318 }
319 }
320}
321
322@media (prefers-color-scheme: dark) {
323 html {
324 background: $color-dark-bg;
325 }
326 body {
327 color: $color-main-bg;
328 }
329 nav {
330 background: rgba($color-dark-bg, $nav-alpha);
331 ul {
332 border-bottom: $border-dark;
333 }
334 }
335 code {
336 background: $color-darker-grey;
337 }
338 .art-menu .art-category .link-mask {
339 background: $color-dark-bg;
340 color: $color-main-bg;
341 }
342 div.highlight {
343 background: $color-darker-grey;
344 }
345 .post {
346 border: 2px solid $color-dark-grey;
347 }
348 .post-page .post-header ul li a {
349 background: $color-dark-grey;
350 }
351
352 footer {
353 border-top: $border-dark;
354 }
355 blockquote {
356 background: $color-nav-current;
357 border-color: $color-dark-grey;
358 }
359}