aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-11-03 22:47:58 +0000
committerAkshay <[email protected]>2024-11-03 22:47:58 +0000
commit429fefe5023222b3e8a9a8fb6fbf440938dacce8 (patch)
tree5065e8c8897b4cf06fd8d9cdd349a38946848d9e
parentaf143a2e14424f9ac4b7f4214cb726e37e0d0205 (diff)
fix fonts (finally maybe)
-rw-r--r--src/public/styles.css63
-rw-r--r--src/views/comments.pug4
-rw-r--r--src/views/index.pug6
3 files changed, 48 insertions, 25 deletions
diff --git a/src/public/styles.css b/src/public/styles.css
index 76f70b5..cd7d6b1 100644
--- a/src/public/styles.css
+++ b/src/public/styles.css
@@ -1,5 +1,3 @@
1@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
2
3:root { 1:root {
4 /* Light mode colors */ 2 /* Light mode colors */
5 --bg-color: white; 3 --bg-color: white;
@@ -7,8 +5,12 @@
7 --text-color: black; 5 --text-color: black;
8 --text-color-muted: #999; 6 --text-color-muted: #999;
9 --blockquote-color: green; 7 --blockquote-color: green;
10 --link-color: blue; 8 --link-color: #29BC9B;
11 --link-visited-color: purple; 9 --link-visited-color: #999;
10
11 font-family: Inter, sans-serif;
12 font-feature-settings: 'ss01' 1, 'kern' 1, 'liga' 1, 'cv05' 1, 'tnum' 1, 'dlig' 1, 'ss01' 1, 'ss07' 1, 'ss08' 1;
13
12} 14}
13 15
14@media (prefers-color-scheme: dark) { 16@media (prefers-color-scheme: dark) {
@@ -18,14 +20,16 @@
18 --text-color: white; 20 --text-color: white;
19 --text-color-muted: #999; 21 --text-color-muted: #999;
20 --blockquote-color: lightgreen; 22 --blockquote-color: lightgreen;
21 --link-color: lightblue; 23 --link-color: #79ffe1;
22 --link-visited-color: violet; 24 --link-visited-color: #999;
23 } 25 }
24} 26}
25 27
28@supports (font-variation-settings: normal) {
29 :root { font-family: InterVariable, sans-serif; }
30}
26 31
27body { 32body {
28 font-family: 'Inter', sans-serif;
29 overflow-x: hidden; 33 overflow-x: hidden;
30 background-color: var(--bg-color); 34 background-color: var(--bg-color);
31 color: var(--text-color); 35 color: var(--text-color);
@@ -38,9 +42,16 @@ main {
38 align-items: center; 42 align-items: center;
39} 43}
40 44
45.header a,
46.sub-title a,
47.info-container a,
48.comment-info-container a,
49.sort-opts a {
50 text-decoration: none;
51}
52
41a { 53a {
42 color: var(--link-color); 54 color: var(--link-color);
43 text-decoration: none;
44} 55}
45 56
46a:hover { 57a:hover {
@@ -111,7 +122,7 @@ nav {
111.info-container, 122.info-container,
112.comment-info-container, 123.comment-info-container,
113.more, 124.more,
114summary.expand-comments::before, 125summary::before,
115hr { 126hr {
116 color: var(--text-color-muted) 127 color: var(--text-color-muted)
117} 128}
@@ -121,6 +132,10 @@ hr {
121 display: flex; 132 display: flex;
122} 133}
123 134
135summary::before {
136 font-size: 0.7rem;
137}
138
124.comment-info-container { 139.comment-info-container {
125 display: inline-flex; 140 display: inline-flex;
126 align-items: center; 141 align-items: center;
@@ -170,10 +185,13 @@ hr {
170 .comments-container { 185 .comments-container {
171 font-size: 1.3rem; 186 font-size: 1.3rem;
172 } 187 }
173 .info-container, .comment-info-container, .more, summary.expand-comments::before 188 .info-container, .comment-info-container, .more
174 { 189 {
175 font-size: 1rem; 190 font-size: 1rem;
176 } 191 }
192 summary::before {
193 font-size: 0.8rem;
194 }
177 .domain { 195 .domain {
178 font-size: 1rem; 196 font-size: 1rem;
179 } 197 }
@@ -202,9 +220,12 @@ hr {
202 .comments-container { 220 .comments-container {
203 font-size: 1.3rem; 221 font-size: 1.3rem;
204 } 222 }
205 .info-container, .comment-info-container, .more, summary.expand-comments::before { 223 .info-container, .comment-info-container, .more {
206 font-size: 1rem; 224 font-size: 1rem;
207 } 225 }
226 summary::before {
227 font-size: 0.8rem;
228 }
208 .domain { 229 .domain {
209 font-size: 1rem; 230 font-size: 1rem;
210 } 231 }
@@ -293,7 +314,9 @@ hr {
293 color: var(--text-color-muted) 314 color: var(--text-color-muted)
294} 315}
295 316
296.header a { 317.header a,
318.sort-opts a,
319.sub-title a {
297 color: var(--text-color); 320 color: var(--text-color);
298} 321}
299 322
@@ -334,21 +357,19 @@ summary.expand-post {
334 display: none; 357 display: none;
335} 358}
336 359
337summary.expand-comments { 360summary {
338 list-style: none; 361 list-style: none;
339 cursor: pointer; 362 cursor: pointer;
340} 363}
341 364
342summary.expand-comments::before { 365details[open] summary::before {
343 content: "[+] "; 366 content: "";
344} 367 padding-right: 10px;
345
346details[open] summary.expand-comments::before {
347 content: "[-] ";
348} 368}
349 369
350details:not([open]) summary.expand-comments::before { 370details:not([open]) summary::before {
351 content: "[+] "; 371 content: "";
372 padding-right: 10px;
352} 373}
353 374
354.comment-body { 375.comment-body {
diff --git a/src/views/comments.pug b/src/views/comments.pug
index d9c96e9..9210d96 100644
--- a/src/views/comments.pug
+++ b/src/views/comments.pug
@@ -22,8 +22,8 @@ html
22 main#content 22 main#content
23 +header() 23 +header()
24 div.hero 24 div.hero
25 h3 25 h3.sub-title
26 a(href=`/r/${post.subreddit}`) r/#{post.subreddit} 26 a(href=`/r/${post.subreddit}`) r/#{post.subreddit}
27 27
28 h2 #{post.title} 28 h2 #{post.title}
29 29
diff --git a/src/views/index.pug b/src/views/index.pug
index f506c09..5367b41 100644
--- a/src/views/index.pug
+++ b/src/views/index.pug
@@ -9,7 +9,9 @@ html
9 meta(name="viewport" content="width=device-width, initial-scale=1.0") 9 meta(name="viewport" content="width=device-width, initial-scale=1.0")
10 meta(charset='UTF-8') 10 meta(charset='UTF-8')
11 title reddit 11 title reddit
12 link(rel='stylesheet', href='/styles.css') 12 link(rel="stylesheet", href="/styles.css")
13 link(rel="preconnect" href="https://rsms.me/")
14 link(rel="stylesheet" href="https://rsms.me/inter/inter.css")
13 script(src="https://cdn.dashjs.org/latest/dash.all.min.js") 15 script(src="https://cdn.dashjs.org/latest/dash.all.min.js")
14 16
15 +subMgmt() 17 +subMgmt()
@@ -71,4 +73,4 @@ html
71 div.footer 73 div.footer
72 div.footer-item 74 div.footer-item
73 - var newQuery = {...query, after: posts.after} 75 - var newQuery = {...query, after: posts.after}
74 a(href=`/r/${subreddit}?${encodeQueryParams(newQuery)}`) next ��� 76 a(href=`/r/${subreddit}?${encodeQueryParams(newQuery)}`) next ���