_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 a {
129 color: $color-main-blue;
130 }
131 a:hover {
132 color: $color-dark-blue;
133 }
134 small p {
135 display: inline;
136 }
137 p {
138 img {
139 display: block;
140 max-width: 100%;
141 margin: 0 auto;
142 border-radius: 1em;
143 }
144 }
145}
146
147.post-page {
148 margin-bottom: 10px;
149 .post-header {
150 margin-bottom: 2em;
151 ul {
152 display: flex;
153 float: right;
154 flex-direction: row;
155 li {
156 margin-right: 0.5em;
157 a {
158 background: $color-main-grey;
159 border-radius: 5px;
160 padding: 2px;
161 }
162 }
163 }
164 }
165
166 ul {
167 padding-left: 10px;
168 }
169}
170
171.art-menu {
172 $art-thumb-wt: ($body-width / 2) - 16;
173 $art-thumb-ht: 300px;
174 //$art-thumb-ht: $art-thumb-wt;
175 display: flex;
176 flex-flow: row wrap;
177 align-items: flex-start;
178 justify-content: space-around;
179 align-content: center;
180 .art-category {
181 margin-bottom: 1em;
182 .link-mask {
183 position: absolute;
184 z-index: 1;
185 width: $art-thumb-wt;
186 height: $art-thumb-ht;
187 line-height: $art-thumb-ht - 16;
188 text-align: center;
189 background: $color-main-bg;
190 opacity: 0;
191 transition: opacity 0.2s ease-in-out;
192 font-size: 200%;
193 color: $color-dark-bg;
194
195 &:hover {
196 opacity: 0.7;
197 }
198 }
199 .thumbnail {
200 width: $art-thumb-wt;
201 height: $art-thumb-ht;
202 position: relative;
203
204 &::after {
205 content: "";
206 display: block;
207 padding-bottom: 100%;
208 }
209
210 img {
211 position: absolute;
212 width: 100%;
213 height: 100%;
214 image-orientation: initial;
215 object-fit: cover;
216 }
217 }
218 }
219}
220
221.art {
222 display: flex;
223 flex-flow: row wrap;
224
225 .art-img {
226 margin: 0.5em 0;
227 img {
228 width: 100%;
229 height: auto;
230 image-orientation: from-image;
231 }
232 }
233}
234
235
236blockquote {
237 margin: 0.5em;
238 padding: 1em;
239 background: $color-main-grey-dark;
240 border-width: 2px 2px 2px 5px;
241 border-color: $color-main-grey;
242 border-style: solid;
243 border-radius: 0.5em;
244}
245
246code {
247 font-family: $code-font;
248 font-size: 0.9em;
249 background: $color-main-grey;
250 padding: 2px;
251 border-radius: 5px;
252}
253div.highlight {
254 overflow-x: auto;
255 background: $color-main-grey;
256 padding-left: 0.5em;
257 border-radius: 5px;
258 code {
259 padding: 0;
260 }
261}
262
263audio {
264 width: 100%;
265 border-radius: 25px;
266}
267
268footer {
269 padding-top: 0.5em;
270 border-top: $border-nav;
271 text-align: center;
272 font: 75% $body-font;
273 p {
274 margin: 0;
275 }
276}
277
278@media only screen and (max-width: 760px) {
279 footer p {
280 padding: 0;
281 }
282 nav {
283 margin-bottom: 5vh;
284 height: 130px;
285 ul {
286 width: 100%;
287 padding-top: 48px;
288 position: relative;
289 top: 5vh;
290 }
291 img {
292 position: absolute;
293 top: 0;
294 }
295 }
296 .content {
297 margin-top: 140px;
298 }
299 .about {
300 flex-direction: column-reverse;
301 .about-sidebar {
302 display: flex;
303 flex-direction: column;
304 img {
305 width: 128px;
306 margin: 0 auto;
307 }
308 }
309 .about-links {
310 margin-top: 0;
311 p:first-child {
312 margin: 0;
313 padding-top: 0;
314 }
315 ul {
316 padding-top: 1em;
317 display: flex;
318 flex-wrap: wrap;
319 li {
320 margin: auto;
321 padding: 0 0.5em;
322 }
323 }
324 }
325 }
326}
327
328@media (prefers-color-scheme: dark) {
329 html {
330 background: $color-dark-bg;
331 }
332 body {
333 color: $color-main-bg;
334 }
335 nav {
336 background: rgba($color-dark-bg, $nav-alpha);
337 ul {
338 border-bottom: $border-dark;
339 }
340 }
341 code {
342 background: $color-darker-grey;
343 }
344 .art-menu .art-category .link-mask {
345 background: $color-dark-bg;
346 color: $color-main-bg;
347 }
348 div.highlight {
349 background: $color-darker-grey;
350 }
351 .post {
352 border: 2px solid $color-dark-grey;
353 }
354 .post-page .post-header ul li a {
355 background: $color-dark-grey;
356 }
357
358 footer {
359 border-top: $border-dark;
360 }
361 blockquote {
362 background: $color-nav-current;
363 border-color: $color-dark-grey;
364 }
365}