hugo-djem-so

Hugo theme for my blog

git clone git://git.shimmy1996.com/hugo-djem-so.git
commit 429640eabc2ffde76d116dcbf520ee556eb918ca
parent 940be3d29417042e609432ab0f29f09afaaa6d0d
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sun,  5 Jan 2020 17:29:32 -0600

Separate style and color CSS

Diffstat:
Mlayouts/partials/css/color.css | 14+++++++++-----
Mlayouts/partials/css/custom.css | 7+++++++
Mlayouts/partials/css/style.css | 12------------
3 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/layouts/partials/css/color.css b/layouts/partials/css/color.css
@@ -1,6 +1,10 @@
-:root {
-    --accent-color: #00F;
-    --text-color: #000;
-    --background-color: #FFF;
-    --alt-background-color: #CF6;
+body {
+    background: var(--background-color);
+    color: var(--text-color);
+}
+a {
+    color: var(--accent-color);
+}
+thead, tfoot, tr:nth-child(even), pre, code, kbd {
+    background: var(--alt-background-color);
 }
diff --git a/layouts/partials/css/custom.css b/layouts/partials/css/custom.css
@@ -0,0 +1,7 @@
+{{ partial "css/color.css" . | safeCSS }}
+:root {
+    --accent-color: #00F;
+    --text-color: #000;
+    --background-color: #FFF;
+    --alt-background-color: #CF6;
+}
diff --git a/layouts/partials/css/style.css b/layouts/partials/css/style.css
@@ -1,17 +1,9 @@
 body {
-    background: var(--background-color);
-    color: var(--text-color);
     margin: auto;
     max-width: 70ch;
     padding: 1em;
     line-height: 1.5;
 }
-a {
-    color: var(--accent-color);
-}
-nav a {
-    text-decoration: none;
-}
 img, video {
     max-width: 100%;
 }
@@ -21,14 +13,10 @@ table {
 th, td, pre {
     padding: 5px;
 }
-thead, tfoot, tr:nth-child(even), pre, code, kbd {
-    background: var(--alt-background-color);
-}
 pre {
     overflow-x: auto;
 }
 code, kbd {
     font-size: 80%;
 }
-{{ partial "css/color.css" . | safeCSS }}
 {{ partial "css/custom.css" . | safeCSS }}