the repository which powers this website
Commit CSS build pipeline
RunasSudo 10 months ago
parent e4b1081 · commit 4b05ac8
-rw-r--r--.gitignore1
-rw-r--r--Makefile3
-rw-r--r--cgit.mk3
-rw-r--r--themed/base.html2
-rw-r--r--themed/themed.in.css9
5 files changed, 16 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 203799bf..b474cf57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ cgitrc.5.xml
*.d
/themed/themed.c
+/themed/themed.css
diff --git a/Makefile b/Makefile
index cd585927..9dd08f18 100644
--- a/Makefile
+++ b/Makefile
@@ -73,7 +73,7 @@ endif
all:: cgit
cgit:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1
+ $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit ../themed/themed.css $(EXTRA_GIT_TARGETS) NO_CURL=1
sparse:
$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk NO_CURL=1 cgit-sparse
@@ -89,6 +89,7 @@ install: all
$(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css
$(INSTALL) -m 0644 cgit.js $(DESTDIR)$(CGIT_DATA_PATH)/cgit.js
$(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png
+ $(INSTALL) -m 0644 themed/themed.css $(DESTDIR)$(CGIT_DATA_PATH)/themed.css
$(INSTALL) -m 0644 favicon.ico $(DESTDIR)$(CGIT_DATA_PATH)/favicon.ico
$(INSTALL) -m 0644 robots.txt $(DESTDIR)$(CGIT_DATA_PATH)/robots.txt
$(INSTALL) -m 0755 -d $(DESTDIR)$(filterdir)
diff --git a/cgit.mk b/cgit.mk
index 566a2adc..e4a619c7 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -132,6 +132,9 @@ $(CGIT_PREFIX)themed/.depend:
$(CGIT_PREFIX)themed/themed.c: $(CGIT_PREFIX)themed/base.html $(CGIT_PREFIX)themed/index.html $(CGIT_PREFIX)themed/refs.html
cd $(CGIT_PREFIX)themed; python -m htmlcc $^ > $@
+$(CGIT_PREFIX)themed/themed.css: $(CGIT_PREFIX)themed/themed.in.css
+ cd $(CGIT_PREFIX)themed; tailwindcss -i $^ -o $@
+
$(CGIT_PREFIX)CGIT-CFLAGS: FORCE
@FLAGS='$(subst ','\'',$(CGIT_CFLAGS))'; \
if test x"$$FLAGS" != x"`cat ../CGIT-CFLAGS 2>/dev/null`" ; then \
diff --git a/themed/base.html b/themed/base.html
index 5905df7b..f030932f 100644
--- a/themed/base.html
+++ b/themed/base.html
@@ -5,7 +5,7 @@
<meta charset="utf-8">
<title>{{ ctx.page.title }}</title>{# ctx.page.title is usually set by prepare_repo_cmd #}
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap">
- <link rel="stylesheet" href="/style.css">
+ <link rel="stylesheet" href="/themed.css">
</head>
<body class="text-gray-900">
{% endblock %}
diff --git a/themed/themed.in.css b/themed/themed.in.css
new file mode 100644
index 00000000..c1214d32
--- /dev/null
+++ b/themed/themed.in.css
@@ -0,0 +1,9 @@
+@import "tailwindcss";
+
+@theme {
+ --font-sans: "Noto Sans", Helvetica, Arial, sans-serif;
+}
+
+:root {
+ font-size: 11pt;
+}