_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 height: 4em;
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 img {
221 width: 100%;
222 height: auto;
223 image-orientation: from-image;
224 }
225 }
226}
227
228
229blockquote {
230 margin: 0.5em;
231 padding: 1em;
232 background: $color-main-grey-dark;
233 border-width: 2px 2px 2px 5px;
234 border-color: $color-main-grey;
235 border-style: solid;
236 border-radius: 0.5em;
237}
238
239code {
240 font-family: $code-font;
241 font-size: 0.9em;
242 background: $color-main-grey;
243 padding: 2px;
244 border-radius: 5px;
245}
246div.highlight {
247 overflow-x: auto;
248 background: $color-main-grey;
249 padding-left: 0.5em;
250 border-radius: 5px;
251 code {
252 padding: 0;
253 }
254}
255
256audio {
257 width: 100%;
258 border-radius: 25px;
259}
260
261footer {
262 padding-top: 0.5em;
263 border-top: $border-nav;
264 text-align: center;
265 font: 75% $body-font;
266 p {
267 margin: 0;
268 }
269}
270
271@media only screen and (max-width: 760px) {
272 footer p {
273 padding: 0;
274 }
275 nav {
276 margin-bottom: 5vh;
277 height: 130px;
278 ul {
279 width: 100%;
280 padding-top: 48px;
281 position: relative;
282 top: 5vh;
283 }
284 img {
285 position: absolute;
286 top: 0;
287 }
288 }
289 .content {
290 margin-top: 140px;
291 }
292 .about {
293 flex-direction: column-reverse;
294 .about-sidebar {
295 display: flex;
296 flex-direction: column;
297 img {
298 width: 128px;
299 margin: 0 auto;
300 }
301 }
302 .about-links {
303 margin-top: 0;
304 p:first-child {
305 margin: 0;
306 padding-top: 0;
307 }
308 ul {
309 padding-top: 1em;
310 display: flex;
311 flex-wrap: wrap;
312 li {
313 margin: auto;
314 padding: 0 0.5em;
315 }
316 }
317 }
318 }
319}
320
321@media (prefers-color-scheme: dark) {
322 html {
323 background: $color-dark-bg;
324 }
325 body {
326 color: $color-main-bg;
327 }
328 nav {
329 background: rgba($color-dark-bg, $nav-alpha);
330 ul {
331 border-bottom: $border-dark;
332 }
333 }
334 code {
335 background: $color-darker-grey;
336 }
337 .art-menu .art-category .link-mask {
338 background: $color-dark-bg;
339 color: $color-main-bg;
340 }
341 div.highlight {
342 background: $color-darker-grey;
343 }
344 .post {
345 border: 2px solid $color-dark-grey;
346 }
347 .post-page .post-header ul li a {
348 background: $color-dark-grey;
349 }
350
351 footer {
352 border-top: $border-dark;
353 }
354 blockquote {
355 background: $color-nav-current;
356 border-color: $color-dark-grey;
357 }
358}