Skip to content

Commit 2320100

Browse files
committed
feat(tpl): add dark mode style
1 parent 1320d9c commit 2320100

File tree

2 files changed

+139
-0
lines changed

2 files changed

+139
-0
lines changed

src/tpl/asset/main.css

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,85 @@ em {
320320
background: #ffc;
321321
}
322322

323+
@media (prefers-color-scheme: dark) {
324+
html, body {
325+
background: #111;
326+
}
327+
328+
body {
329+
color: #ccc;
330+
}
331+
332+
a {
333+
color: #ddd;
334+
}
335+
336+
a:hover {
337+
background-color: #222;
338+
}
339+
340+
a:focus {
341+
background-color: #220;
342+
}
343+
344+
a:hover:focus {
345+
background-color: #2f2f0f;
346+
}
347+
348+
em {
349+
border-color: #555;
350+
}
351+
352+
.path-list {
353+
border-bottom-color: #999;
354+
}
355+
356+
.path-list a:after {
357+
border-color: #555 #555 transparent transparent;
358+
}
359+
360+
.panel {
361+
background-color: #222;
362+
}
363+
364+
.archive a {
365+
border-color: #222;
366+
}
367+
368+
.archive a:hover {
369+
border-color: #555;
370+
}
371+
372+
.item-list li:hover {
373+
background: #222;
374+
}
375+
376+
.item-list .detail,
377+
.item-list .delete {
378+
border-bottom-color: #222;
379+
}
380+
381+
.item-list .size {
382+
color: #999;
383+
}
384+
385+
.item-list .time {
386+
color: #666;
387+
}
388+
389+
.item-list .delete {
390+
color: #f99;
391+
}
392+
393+
.item-list .delete:hover {
394+
background-color: #433;
395+
}
396+
397+
.item-list .header .detail {
398+
background-color: #181818;
399+
}
400+
}
401+
323402
@media only screen and (max-width: 375px) {
324403
.item-list .header .time {
325404
width: 4.05em;

src/tpl/asset/main.css.go

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,66 @@ margin: 1em;
270270
padding: 1em;
271271
background: #ffc;
272272
}
273+
@media (prefers-color-scheme: dark) {
274+
html, body {
275+
background: #111;
276+
}
277+
body {
278+
color: #ccc;
279+
}
280+
a {
281+
color: #ddd;
282+
}
283+
a:hover {
284+
background-color: #222;
285+
}
286+
a:focus {
287+
background-color: #220;
288+
}
289+
a:hover:focus {
290+
background-color: #2f2f0f;
291+
}
292+
em {
293+
border-color: #555;
294+
}
295+
.path-list {
296+
border-bottom-color: #999;
297+
}
298+
.path-list a:after {
299+
border-color: #555 #555 transparent transparent;
300+
}
301+
.panel {
302+
background-color: #222;
303+
}
304+
.archive a {
305+
border-color: #222;
306+
}
307+
.archive a:hover {
308+
border-color: #555;
309+
}
310+
.item-list li:hover {
311+
background: #222;
312+
}
313+
.item-list .detail,
314+
.item-list .delete {
315+
border-bottom-color: #222;
316+
}
317+
.item-list .size {
318+
color: #999;
319+
}
320+
.item-list .time {
321+
color: #666;
322+
}
323+
.item-list .delete {
324+
color: #f99;
325+
}
326+
.item-list .delete:hover {
327+
background-color: #433;
328+
}
329+
.item-list .header .detail {
330+
background-color: #181818;
331+
}
332+
}
273333
@media only screen and (max-width: 375px) {
274334
.item-list .header .time {
275335
width: 4.05em;

0 commit comments

Comments
 (0)