From 9c6146d2c1b48f7f24ad5bfd4eee770759cba3cb Mon Sep 17 00:00:00 2001 From: Marie Date: Mon, 9 Sep 2024 23:18:27 +0200 Subject: [PATCH] add branch and source link to template --- build.mb | 2 ++ data/template.sgt | 2 +- test.css | 10 ++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build.mb b/build.mb index 84a31de..0c872ee 100644 --- a/build.mb +++ b/build.mb @@ -24,11 +24,13 @@ sector c_rules bin/fpc-sitegen -i $(%input%) -o $(%output%) COMMIT_SHORT=\$(git rev-parse --short HEAD) +BRANCH=\$(git rev-parse --abbrev-ref HEAD) DATE=\$(date +%d.%m.%Y) TIME=\$(date +%H:%M:%S) sed -i ''s/\\\$\\\$DATE\\\$\\\$/''"\$DATE/g" $(%output%) sed -i ''s/\\\$\\\$TIME\\\$\\\$/''"\$TIME/g" $(%output%) +sed -i ''s@\\\$\\\$BRANCH\\\$\\\$@''"\$BRANCH@g" $(%output%) sed -i ''s@\\\$\\\$SOURCE\\\$\\\$@$(%input%)@g'' $(%output%) sed -i ''s/\\\$\\\$COMMIT\\\$\\\$/''"\$COMMIT_SHORT/g" $(%output%) ' diff --git a/data/template.sgt b/data/template.sgt index f615493..6e527f6 100644 --- a/data/template.sgt +++ b/data/template.sgt @@ -58,7 +58,7 @@ output-format:
-

Last generated @ $$DATE$$, $$TIME$$ ; source $$SOURCE$$ @ commit $$COMMIT$$

+

Last generated @ $$DATE$$, $$TIME$$ ; source $$SOURCE$$ @ commit $$COMMIT$$

diff --git a/test.css b/test.css index afcbf27..4740db5 100644 --- a/test.css +++ b/test.css @@ -102,8 +102,14 @@ body { font-size: 12pt; } - - #banner { width:100%; } + +#gen-info { + font-size: 9.3pt; +} + +#gen-info a { + font-size: 9.3pt; +}