CSS my beloathed.
This commit is contained in:
parent
45baa88a03
commit
33af8ac5b3
3 changed files with 14 additions and 5 deletions
2
nix-system-configs/modules/styling/forgejo/header.tmpl
Normal file
2
nix-system-configs/modules/styling/forgejo/header.tmpl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{{/* This will be injected into <head> via $FORGEJO_CUSTOM/templates/custom/header.tmpl */}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/assets/css/theme-custom.css">
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
@import "./theme-forgejo-auto.css";
|
||||
|
||||
@font-face {
|
||||
font-family: 'Maple Mono NF';
|
||||
src: url('/assets/fonts/MapleMonoNerd.ttf') format('truetype');
|
||||
|
|
@ -6,11 +8,7 @@
|
|||
font-display: swap;
|
||||
}
|
||||
|
||||
/* import base Forgejo theme so we only override what we need */
|
||||
@import "./theme-forgejo-auto.css";
|
||||
|
||||
:root {
|
||||
/* prefer the Maple Mono Nerd Font for monospace usage */
|
||||
--fonts-monospace: 'Maple Mono NF' !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -84,6 +84,9 @@ in {
|
|||
# Forgejo configuration
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
# Explicit custom directory where Forgejo will look for custom templates/assets
|
||||
# Ensure this matches what systemd.tmpfiles will populate below.
|
||||
customDir = "/var/lib/forgejo/custom";
|
||||
database = {
|
||||
createDatabase = false; # Database already created, DO NOT REMOVE THIS OR IT WILL DEFAULT INTO INTERNAL ONE
|
||||
type = "postgres";
|
||||
|
|
@ -126,6 +129,8 @@ in {
|
|||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${config.services.forgejo.customDir}/templates' - forgejo forgejo - -"
|
||||
# create the custom/templates/custom folder so header.tmpl can live under templates/custom
|
||||
"d '${config.services.forgejo.customDir}/templates/custom' - forgejo forgejo - -"
|
||||
"d '${config.services.forgejo.customDir}/public' - forgejo forgejo - -"
|
||||
"d '${config.services.forgejo.customDir}/public/assets' - forgejo forgejo - -"
|
||||
"d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -"
|
||||
|
|
@ -139,6 +144,10 @@ in {
|
|||
"C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${
|
||||
../styling/forgejo/home.tmpl
|
||||
}"
|
||||
# copy a small header.tmpl into templates/custom so we can force-include custom CSS into the <head>
|
||||
"C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${
|
||||
../styling/forgejo/header.tmpl
|
||||
}"
|
||||
];
|
||||
|
||||
# Open ports in the firewall.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue