CSS my beloathed. UGHH

This commit is contained in:
Root User 2026-02-12 23:20:45 +01:00
parent 59dac432d9
commit 45bd2e975f
Signed by: root
GPG key ID: 087F0A95E5766D72
4 changed files with 20 additions and 13 deletions

View file

@ -1,2 +1,14 @@
{{/* This will be injected into <head> via $FORGEJO_CUSTOM/templates/custom/header.tmpl */}} {{/* Custom header content - inject custom fonts that apply to all themes */}}
<link rel="stylesheet" href="{{AppSubUrl}}/assets/css/theme-custom.css"> <style>
@font-face {
font-family: 'Maple Mono NF';
src: url('{{AppSubUrl}}/assets/fonts/MapleMonoNerd.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
:root {
--fonts-monospace: 'Maple Mono NF' !important;
}
</style>

View file

@ -1,5 +1,5 @@
[[:Template:Template "base/head" .]] {{template "base/head" .}}
<div role="main" aria-label='[[:Template:If .IsSigned]][[:Template:Ctx.Locale.Tr "dashboard"]][[:Template:Else]][[:Template:Ctx.Locale.Tr "home"]][[:Template:End]]' class="page-content home"> <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="tw-mb-8 tw-px-8">
<div class="center"> <div class="center">
<div class="hero"> <div class="hero">
@ -10,4 +10,4 @@
</div> </div>
</div> </div>
</div> </div>
[[:Template:Template "base/footer" .]] {{template "base/footer" .}}

View file

@ -1,4 +1,3 @@
@import "./theme-forgejo-auto.css";
@font-face { @font-face {
font-family: 'Maple Mono NF'; font-family: 'Maple Mono NF';

View file

@ -122,8 +122,8 @@ in {
}; };
settings.ui = { settings.ui = {
DEFAULT_THEME = "custom"; DEFAULT_THEME = "forgejo-auto";
THEMES = "forgejo-auto,forgejo-light,forgejo-dark,custom"; THEMES = "forgejo-auto,forgejo-light,forgejo-dark";
}; };
}; };
@ -133,18 +133,14 @@ in {
"d '${config.services.forgejo.customDir}/templates/custom' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/templates/custom' - forgejo forgejo - -"
"d '${config.services.forgejo.customDir}/public' - 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' - forgejo forgejo - -"
"d '${config.services.forgejo.customDir}/public/assets/css' - forgejo forgejo - -"
# ensure fonts directory exists # ensure fonts directory exists
"d '${config.services.forgejo.customDir}/public/assets/fonts' - forgejo forgejo - -" "d '${config.services.forgejo.customDir}/public/assets/fonts' - forgejo forgejo - -"
# install the TTF from the Nix store into the Forgejo customDir # install the TTF from the Nix store into the Forgejo customDir
"C+ '${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf' - forgejo forgejo - ${mapleFonts}/fonts/MapleMonoNerd.ttf" "C+ '${config.services.forgejo.customDir}/public/assets/fonts/MapleMonoNerd.ttf' - forgejo forgejo - ${mapleFonts}/fonts/MapleMonoNerd.ttf"
"C+ '${config.services.forgejo.customDir}/public/assets/css/theme-custom.css' - forgejo forgejo - ${
../styling/forgejo/theme-custom.css
}"
"C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${ "C+ '${config.services.forgejo.customDir}/templates/home.tmpl' - forgejo forgejo - ${
../styling/forgejo/home.tmpl ../styling/forgejo/home.tmpl
}" }"
# copy a small header.tmpl into templates/custom so we can force-include custom CSS into the <head> # copy header.tmpl into templates/custom so we can inject custom CSS into the <head>
"C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${ "C+ '${config.services.forgejo.customDir}/templates/custom/header.tmpl' - forgejo forgejo - ${
../styling/forgejo/header.tmpl ../styling/forgejo/header.tmpl
}" }"