aboutsummaryrefslogtreecommitdiff
path: root/src/public
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-11-02 12:47:59 +0000
committerAkshay <[email protected]>2024-11-02 12:47:59 +0000
commit0d0cfdd280379ea1799cd423ad15392d417fcfb7 (patch)
tree3d787ec1251130f2dd38ea8d4b240f6379328eb8 /src/public
parentbd78cbc3642d9495c407e15ac955a2d8efd5a69e (diff)
add dark mode, add time for comments and posts
Diffstat (limited to 'src/public')
-rw-r--r--src/public/styles.css88
1 files changed, 71 insertions, 17 deletions
diff --git a/src/public/styles.css b/src/public/styles.css
index 3a0cb8b..b9da7a1 100644
--- a/src/public/styles.css
+++ b/src/public/styles.css
@@ -1,8 +1,32 @@
1@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); 1@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
2 2
3:root {
4 /* Light mode colors */
5 --bg-color: white;
6 --text-color: black;
7 --text-color-muted: #999;
8 --blockquote-color: green;
9 --link-color: blue;
10 --link-visited-color: purple;
11}
12
13@media (prefers-color-scheme: dark) {
14 :root {
15 --bg-color: black;
16 --text-color: white;
17 --text-color-muted: #999;
18 --blockquote-color: green;
19 --link-color: lightblue;
20 --link-visited-color: violet;
21 }
22}
23
24
3body { 25body {
4 font-family: 'Inter', sans-serif; 26 font-family: 'Inter', sans-serif;
5 overflow-x: hidden; 27 overflow-x: hidden;
28 background-color: var(--bg-color);
29 color: var(--text-color);
6} 30}
7 31
8main { 32main {
@@ -12,6 +36,20 @@ main {
12 align-items: center; 36 align-items: center;
13} 37}
14 38
39a {
40 color: var(--link-color);
41 text-decoration: none;
42}
43
44a:hover {
45 color: var(--link-color);
46 text-decoration: underline;
47}
48
49a:visited {
50 color: var(--link-visited-color);
51}
52
15.header { 53.header {
16 display: flex; 54 display: flex;
17 flex-direction: row; 55 flex-direction: row;
@@ -38,7 +76,7 @@ nav {
38 width: 100%; 76 width: 100%;
39} 77}
40 78
41.post { 79.post, .hero {
42 font-size: 1rem; 80 font-size: 1rem;
43} 81}
44 82
@@ -46,14 +84,21 @@ nav {
46 font-size: 1rem; 84 font-size: 1rem;
47} 85}
48 86
87.info-container a,
88.info-container,
89.comment-info-container,
90.more,
91hr {
92 color: var(--text-color-muted)
93}
94
49.info-container, .comment-info-container, .more { 95.info-container, .comment-info-container, .more {
50 color: #777;
51 font-size: 0.8rem; 96 font-size: 0.8rem;
52 display: flex; 97 display: flex;
53} 98}
54 99
55.domain { 100.domain {
56 color: #777; 101 color: var(--text-color-muted);
57 font-size: 0.8rem; 102 font-size: 0.8rem;
58} 103}
59 104
@@ -62,7 +107,8 @@ nav {
62} 107}
63 108
64 109
65.media-preview img { 110.media-preview img,
111.media-preview video {
66 object-fit: cover; 112 object-fit: cover;
67} 113}
68 114
@@ -81,11 +127,11 @@ nav {
81 flex: 1 1 90%; 127 flex: 1 1 90%;
82 width: 90%; 128 width: 90%;
83 } 129 }
84 .post { 130 .post, .hero {
85 font-size: 1.3rem; 131 font-size: 1.3rem;
86 } 132 }
87 .comments-container { 133 .comments-container {
88 font-size: 1.1rem; 134 font-size: 1.3rem;
89 } 135 }
90 .info-container, .comment-info-container, .more { 136 .info-container, .comment-info-container, .more {
91 font-size: 1rem; 137 font-size: 1rem;
@@ -106,14 +152,14 @@ nav {
106 152
107@media (min-width: 1080px) { 153@media (min-width: 1080px) {
108 .post, .comments-container, .hero, .header, .footer { 154 .post, .comments-container, .hero, .header, .footer {
109 flex: 1 1 50%; 155 flex: 1 1 60%;
110 width: 50%; 156 width: 60%;
111 } 157 }
112 .post { 158 .post, .hero {
113 font-size: 1.3rem; 159 font-size: 1.3rem;
114 } 160 }
115 .comments-container { 161 .comments-container {
116 font-size: 1.1rem; 162 font-size: 1.3rem;
117 } 163 }
118 .info-container, .comment-info-container, .more { 164 .info-container, .comment-info-container, .more {
119 font-size: 1rem; 165 font-size: 1rem;
@@ -138,7 +184,7 @@ nav {
138 184
139.comment, .more { 185.comment, .more {
140 width: 100%; 186 width: 100%;
141 border-left: 1px dashed; 187 border-left: 1px dashed var(--text-color-muted);
142 padding: 10px 0px 0px 24px; 188 padding: 10px 0px 0px 24px;
143 box-sizing: border-box; 189 box-sizing: border-box;
144} 190}
@@ -149,7 +195,6 @@ nav {
149 195
150.more { 196.more {
151 margin-bottom: 0px; 197 margin-bottom: 0px;
152 color: #777;
153} 198}
154 199
155.first { 200.first {
@@ -189,19 +234,27 @@ nav {
189 padding: 5px; 234 padding: 5px;
190} 235}
191 236
192.title-container,.info-container, .comment-info-container { 237.title-container, .comment-info-container {
193 flex: 1; 238 flex: 1;
194 margin-top: 10px; 239 margin-top: 10px;
195 margin-bottom: 10px; 240 margin-bottom: 10px;
196} 241}
197 242
243.info-container {
244 flex: 1;
245}
246
198.title-container > a { 247.title-container > a {
199 color: black; 248 color: var(--text-color);
200 text-decoration: none; 249 text-decoration: none;
201} 250}
202 251
203.title-container > a:visited { 252.title-container > a:visited {
204 color: #999; 253 color: var(--text-color-muted)
254}
255
256.header a {
257 color: var(--text-color);
205} 258}
206 259
207hr { 260hr {
@@ -211,8 +264,8 @@ hr {
211blockquote { 264blockquote {
212 margin: 0px; 265 margin: 0px;
213 padding-left: 10px; 266 padding-left: 10px;
214 border-left: 4px solid green; 267 border-left: 4px solid var(--blockquote-color);
215 color: green; 268 color: var(--blockquote-color);
216} 269}
217 270
218pre, code { 271pre, code {
@@ -254,6 +307,7 @@ a {
254.gallery { 307.gallery {
255 display: flex; 308 display: flex;
256 overflow-x: auto; 309 overflow-x: auto;
310 position: relative;
257 scroll-snap-type: x mandatory; 311 scroll-snap-type: x mandatory;
258 padding: 5px; 312 padding: 5px;
259} 313}