Add custom template

This commit is contained in:
Michael Huebner 2025-06-16 09:16:01 +02:00
parent 0b0bae3f9d
commit 91092c3cda
3 changed files with 33 additions and 5 deletions

View file

@ -1,5 +0,0 @@
#!/bin/bash
openssl passwd -6 $1 > dev_user_password.pw
colmena apply

View file

@ -105,4 +105,17 @@ in
}; };
}; };
}; };
package = pkgs.forgejo.overrideAttrs (
prev: {
postInstall = builtins.concatStringsSep "\n" [
prev.postInstall
''
chmod -R u+w $data/templates/custom/
cp ${./home.tmpl} $data/templates/custom/
chmod -R u-w $data/templates/custom/
''
];
}
);
} }

20
home.tmpl Normal file
View file

@ -0,0 +1,20 @@
{{template "base/head" .}}
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr " dashboard"}}{{else}}{{ctx.Locale.Tr "home" }}{{end}}"
class="page-content home">
<div class="tw-mb-8 tw-px-8">
<div class="center">
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "
logo"}}">
<div class="hero">
<h1 class="ui icon header title">
{{AppDisplayName}}
</h1>
<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
<h2>Das ist der Entwicklungsserver der PTS.</h2>
<h2>Zur PTS-Website geht es <a href="https://www.ptspaper.de/de/">hier</a></h2>
</div>
</div>
</div>
{{template "home_forgejo" .}}
</div>
{{template "base/footer" .}}