From f663b7057c255369979dbc1702afae7595b4eec3 Mon Sep 17 00:00:00 2001
From: sejo
Date: Sun, 26 Nov 2023 15:08:26 +0100
Subject: [PATCH] implemented dark/light css theme based on
prefers-color-scheme
---
templates/estilo.css | 108 ++++++++++++++++++++++++++---------
templates/pagefooter.html | 10 +++-
templates/pagefooter_es.html | 8 ++-
3 files changed, 95 insertions(+), 31 deletions(-)
diff --git a/templates/estilo.css b/templates/estilo.css
index b5e9d3f..de997d0 100644
--- a/templates/estilo.css
+++ b/templates/estilo.css
@@ -1,43 +1,46 @@
-/* colors by https://www.colourlovers.com/palette/1078634/Sentences */
+/* colors by
+ * https://www.colourlovers.com/palette/3025559/Desert_Beauty
+ * */
/* links externos */
a[rel^=external]:after{ content: "⭷"; }
-/* gemini headers
-main h1:before{
- content: "#";
- font-size: smaller;
- padding-right:1em;
-}
-main h2:before{
- content: "##";
- font-size: smaller;
- padding-right:1em;
-}
-main h3:before{
- content: "###";
- font-size: smaller;
- padding-right:1em;
-}*/
a{
- color: #C04E43;
+ color: #A00C0A;
}
a:visited{
- color: #872645;
+ font-style: italic;
}
a.icon{
-/* background-color: #fff; */
+color: #EFD7BB;
}
a.arrow:before{ content: "⇒ "; }
+
body{
- color: #563850;
- max-width:36em;
+ color: #030400;
+ background-color: #AA7E4D;
+ max-width:800px;
margin:0 auto;
font-size:18px;
padding: 0 1em;
font-family:sans-serif;
}
-#header-icon { float:left; padding: 0.5em 1em 0 0em }
+
+main,header,footer{
+ background-color: #EFD7BB;
+ padding: 0.5em 3em 0.5em 3em;
+}
+
+hr{ color: #A00C0A }
+h1,h2,h3{
+ text-shadow: 1px 1px #A00C0A;
+}
+
+.mono-icon{
+ stroke: #030400;
+}
+
+#header-icon { float:left; padding: 1.8em 1em 0 0em }
footer{
font-size: x-small;
@@ -48,14 +51,14 @@ footer img{
margin:0;
}
-hr{ color: #872645 }
pre{
- background-color: #F4F6CF;
- color: #872645;
+ background-color: #36030C;
+ color: #EFD7BB;
padding:1em;
overflow-x: auto;
font-family: monospace;
+ box-shadow: 2px 2px #A00C0A;
}
blockquote{
@@ -103,7 +106,7 @@ table {
text-align:left;
}
table th {
- border-bottom: 1px solid black;
+ border-bottom: 1px solid #36030C;
padding: 0.1em 1em;
}
table td {
@@ -123,7 +126,10 @@ td.num{
/* desktop */
@media screen and (min-width: 600px) {
- nav { float: right; width:30% }
+ nav {
+ float: right;
+ width:30%;
+ }
nav ul { margin-top:0; padding-left: 3em }
#incoming li{
display:inline;
@@ -132,3 +138,49 @@ td.num{
nav, #incoming{ font-size:0.7em; }
img{ max-width: 100%; }
}
+
+@media (prefers-color-scheme: light) {
+a{
+ color: #A00C0A;
+}
+body{
+ color: #030400;
+ background-color: #AA7E4D;
+}
+main,header,footer{
+ background-color: #EFD7BB;
+}
+pre{
+ background-color: #36030C;
+ color: #EFD7BB;
+}
+table th {
+ border-bottom: 1px solid #36030C;
+}
+}
+
+@media (prefers-color-scheme: dark) {
+a{
+ color: #AA7E4D;
+}
+a.icon{
+color: #030400;
+}
+body{
+ color: #EFD7BB;
+ background-color: #36030C;
+}
+main,header,footer{
+ background-color: #030400;
+}
+pre{
+ background-color: #EFD7BB;
+ color: #36030C;
+}
+table th {
+ border-bottom: 1px solid #A00C0A;
+}
+.mono-icon{
+ stroke: #EFD7BB;
+}
+}
diff --git a/templates/pagefooter.html b/templates/pagefooter.html
index 13e68a0..ca29b5a 100644
--- a/templates/pagefooter.html
+++ b/templates/pagefooter.html
@@ -7,9 +7,15 @@ most recent update:
home about pages contact support log
-
texts, images, and code are shared with the peer production license
-
+
+
+
+
diff --git a/templates/pagefooter_es.html b/templates/pagefooter_es.html
index 19f34e8..84bcf04 100644
--- a/templates/pagefooter_es.html
+++ b/templates/pagefooter_es.html
@@ -9,7 +9,13 @@ actualización más reciente::
inicio acerca contacto apoyo log
textos, imágenes y código compartidos bajo la licencia de producción de pares
-
+
+
+