From 4b05ac8a56a11b4a98933f3dbc9c79d00052f352 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Wed, 14 May 2025 22:01:53 +1000 Subject: [PATCH] Commit CSS build pipeline --- .gitignore | 1 + Makefile | 3 ++- cgit.mk | 3 +++ themed/base.html | 2 +- themed/themed.in.css | 9 +++++++++ 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 themed/themed.in.css diff --git a/.gitignore b/.gitignore index 203799b..b474cf5 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 cd58592..9dd08f1 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 566a2ad..e4a619c 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 5905df7..f030932 100644 --- a/themed/base.html +++ b/themed/base.html @@ -5,7 +5,7 @@ {{ ctx.page.title }}{# ctx.page.title is usually set by prepare_repo_cmd #} - + {% endblock %} diff --git a/themed/themed.in.css b/themed/themed.in.css new file mode 100644 index 0000000..c1214d3 --- /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; +}