aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/output/html.scm12
-rw-r--r--static/dark.css12
-rw-r--r--static/light.css12
-rw-r--r--static/style.css1
4 files changed, 35 insertions, 2 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index 75586468..e8c0a266 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -156,11 +156,17 @@
,time ":00")))
(iota 12 0 2))))))
-(define (include-css path)
+(define (include-css path . extra-attributes)
`(link (@ (type "text/css")
(rel "stylesheet")
- (href ,path))))
+ (href ,path)
+ ,@extra-attributes)))
+(define (include-alt-css path . extra-attributes)
+ `(link (@ (type "text/css")
+ (rel "alternate stylesheet")
+ (href ,path)
+ ,@extra-attributes)))
(define (fmt-time-span ev)
(cond [(attr ev 'DTSTART) date?
@@ -304,6 +310,8 @@
(content "Calendar for the dates between " ,(date->string start-date)
" and " ,(date->string end-date))))
,(include-css "static/style.css")
+ ,(include-alt-css "static/dark.css" '(title "Dark"))
+ ,(include-alt-css "static/light.css" '(title "Light"))
(script (@ (src "static/script.js")) "")
(style ,(format #f "~:{.CAL_~a { background-color: ~a; color: ~a }~%.CAL_bg_~a { border-color: ~a }~%~}"
(map (lambda (c)
diff --git a/static/dark.css b/static/dark.css
new file mode 100644
index 00000000..f53d8027
--- /dev/null
+++ b/static/dark.css
@@ -0,0 +1,12 @@
+main {
+ background-color: black;
+ color: white;
+}
+
+main a {
+ color: lightblue;
+}
+
+main .day {
+ border-color: white;
+}
diff --git a/static/light.css b/static/light.css
new file mode 100644
index 00000000..05c05d56
--- /dev/null
+++ b/static/light.css
@@ -0,0 +1,12 @@
+main {
+ background-color: white;
+ color: black;
+}
+
+main a {
+ color: blue;
+}
+
+main .day {
+ border-color: black;
+}
diff --git a/static/style.css b/static/style.css
index e01eef32..ec249956 100644
--- a/static/style.css
+++ b/static/style.css
@@ -343,5 +343,6 @@ body {
width: calc(100% + 2em);
height: 4px;
background: blue;
+ border-color: blue;
left: -1em;
}