Commit CSS build pipeline

This commit is contained in:
RunasSudo 2025-05-14 22:01:53 +10:00
parent e4b108139e
commit 4b05ac8a56
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
5 changed files with 16 additions and 2 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ cgitrc.5.xml
*.d
/themed/themed.c
/themed/themed.css

View File

@ -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)

View File

@ -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 \

View File

@ -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 %}

9
themed/themed.in.css Normal file
View File

@ -0,0 +1,9 @@
@import "tailwindcss";
@theme {
--font-sans: "Noto Sans", Helvetica, Arial, sans-serif;
}
:root {
font-size: 11pt;
}