From 53241f2fb95539e3db4f05e89a2123e7cd57eadb Mon Sep 17 00:00:00 2001
From: Joss <joss@jossco.de>
Date: Sat, 1 Mar 2025 00:14:32 +0100
Subject: [PATCH] Added css preprocessor system

---
 README.md         |  1 +
 build.sh          |  6 ++++++
 static/style.css  | 54 -----------------------------------------------
 static/style.rcss | 16 ++++++++++++++
 4 files changed, 23 insertions(+), 54 deletions(-)
 delete mode 100644 static/style.css
 create mode 100644 static/style.rcss

diff --git a/README.md b/README.md
index c0045b5..f50c841 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ Any half-recent version should suffice, I added a tested version in parentheses.
 * Delete the `dist` folder if it exists
 * Create a dist folder
 * Copy over all static files
+	* .rcss files will be put through cpp
 * Compile the website from `src` into `dist`
 
 ## Templates
diff --git a/build.sh b/build.sh
index 453b2f5..ade0989 100755
--- a/build.sh
+++ b/build.sh
@@ -6,6 +6,12 @@ shopt -s globstar
 rm -rf dist/
 mkdir dist&&cd dist
 cp -r ../static/*  .
+
+for file in *.rcss; do
+	cpp -P $file > ${file%.*}.css
+	rm $file
+done
+
 for file in $(du -a ../src/ | cut -f2 | grep -E '.md$'); do
 	target="$(echo $file | source_to_target)"
 	export CONTENT="$(pandoc --from markdown+emoji --wrap=none -i $file)"
diff --git a/static/style.css b/static/style.css
deleted file mode 100644
index 56402af..0000000
--- a/static/style.css
+++ /dev/null
@@ -1,54 +0,0 @@
-* {
-	box-sizing: border-box;
-}
-
-body {
-	margin: 0;
-	padding: 0;
-	font-family: sans-serif;
-	overflow: clip;
-}
-
-.nav-name {
-	font-weight: 1000;
-	font-size: 1.25em;
-}
-
-.sidebar {
-	background-color: Purple;
-	color: #FFF;
-	height: 100%;
-	width: 15%;
-	float: left;
-	border-right: 1px solid #AAAAAA;
-	padding: 1%;
-}
-
-.sidemenu li {
-	list-style-type: "\02386";
-	list-style-position: outside;
-	padding-left: 0.5em;
-}
-
-.sidemenu li a {
-	display: block;
-	text-decoration: none;
-	font-weight: bold;
-	color: #FFF;
-	margin-bottom: 10px;
-}
-
-.clearfix::after {
-	content: "";
-	clear: both;
-	display: table;
-}
-
-.content {
-	padding: 20px;
-	float: left;
-	width: 85%;
-	height: 100%;
-	color: #000040;
-	overflow: auto;
-}
diff --git a/static/style.rcss b/static/style.rcss
new file mode 100644
index 0000000..9f331b6
--- /dev/null
+++ b/static/style.rcss
@@ -0,0 +1,16 @@
+#define COL1 #FFB5A7
+#define COL2 #FCD5CE
+#define COL3 #F8EDEB
+#define COL4 #F9DCC4
+#define COL5 #FEC89A
+
+body {
+	font-family: serif;
+	max-width: 600px;
+	margin: auto;
+}
+
+.content {
+	color: #101010;
+	overflow: auto;
+}