templates: explicitly allow overriding logo via cmdline/override in config, have bundled templates support it

This commit is contained in:
WeebDataHoarder
2025-05-03 04:14:11 +02:00
parent 1ea19c5a6c
commit 606f8ec3a0
5 changed files with 16 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
<!DOCTYPE html>
{{$logo := print .Path "/assets/static/logo.png?cacheBust=" .Random }}{{ if .Logo }}{{$logo = .Logo}}{{ end }}
<html>
<head>
<title>{{ .Title }}</title>
@@ -25,7 +26,7 @@
<img
id="image"
style="width:100%;max-width:256px;"
src="{{ .Path }}/assets/static/logo.png?cacheBust={{ .Random }}"
src="{{ $logo }}"
/>
{{if .Challenge }}
<p id="status">{{ .Strings.Get "status_loading_challenge" }} <em>{{ .Challenge }}</em>...</p>

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
{{$theme := "forgejo-auto"}}{{ if .Theme }}{{$theme = .Theme}}{{ end }}
{{$logo := "/assets/img/logo.png"}}{{ if .Logo }}{{$logo = .Logo}}{{ end }}
<html lang="en-US" data-theme="{{ $theme }}">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -48,7 +49,7 @@
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" id="image" src="/assets/img/logo.png" />
<img class="logo" id="image" src="{{ $logo }}" />
</div>
<div class="hero">
<h2 class="ui icon header title" id="title">