diff --git a/lib/modules/gitea/default.nix b/lib/modules/gitea/default.nix index 4cf5e17..a4715c7 100644 --- a/lib/modules/gitea/default.nix +++ b/lib/modules/gitea/default.nix @@ -41,6 +41,7 @@ in { systemd.tmpfiles.rules = [ ''L+ ${cfg.stateDir}/custom/public/assets/img/logo.svg - - - - ${pkgs.logo.svg}'' ''L+ ${cfg.stateDir}/custom/public/assets/img/logo.png - - - - ${pkgs.logo.png."512x512"}'' + ''L+ ${cfg.stateDir}/custom/templates - - - - ${./templates}'' ]; environment.systemPackages = [ pkgs.gitea ]; diff --git a/lib/modules/gitea/templates/base/head.tmpl b/lib/modules/gitea/templates/base/head.tmpl new file mode 100644 index 0000000..2873d33 --- /dev/null +++ b/lib/modules/gitea/templates/base/head.tmpl @@ -0,0 +1,97 @@ + + + + + + {{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}}{{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} + {{if .ManifestData}}{{end}} + {{if ThemeColorMetaTag}}{{end}} + + + + + + +{{if .GoGetImport}} + + +{{end}} +{{if and .EnableFeed .FeedURL}} + + +{{end}} + + + + {{template "base/head_script" .}} + +{{if .PageIsUserProfile}} + + + + + {{if .Owner.Description}} + + {{end}} +{{else if .Repository}} + {{if .Issue}} + + + {{if .Issue.Content}} + + {{end}} + {{else}} + + + {{if .Repository.Description}} + + {{end}} + {{end}} + + {{if (.Repository.AvatarLink $.Context)}} + + {{else}} + + {{end}} +{{else}} + + + + + +{{end}} + +{{if .IsSigned}} + {{if ne .SignedUser.Theme "gitea"}} + + {{end}} +{{else if ne DefaultTheme "gitea"}} + +{{end}} +{{template "custom/header" .}} + + + {{template "custom/body_outer_pre" .}} + +
+ + + {{template "custom/body_inner_pre" .}} + + {{if and (not .PageIsInstall) .IsSigned }} + + {{end}} + +{{if false}} + {{/* to make html structure "likely" complete to prevent IDE warnings */}} +
+ + +{{end}} diff --git a/lib/modules/gitea/templates/explore/navbar.tmpl b/lib/modules/gitea/templates/explore/navbar.tmpl new file mode 100644 index 0000000..fc7c15f --- /dev/null +++ b/lib/modules/gitea/templates/explore/navbar.tmpl @@ -0,0 +1,18 @@ +