Prioritize the important parts of titles

This commit is contained in:
Tim Van Baak 2025-05-02 11:41:04 -07:00
parent 1a3309ae54
commit 111c35c0eb
7 changed files with 10 additions and 4 deletions

View File

@ -97,6 +97,8 @@ func (env *Env) getChannel(writer http.ResponseWriter, req *http.Request) {
Page: page,
Count: count,
LastUpdated: time.Time{},
Source: "",
Channel: channel,
}
html.Feed(writer, data)
}

View File

@ -1,4 +1,4 @@
{{ define "title" }}{{ if .Items }}({{ len .Items }}) {{ end }}Intake{{ end }}
{{ define "title" }}{{ if .Items }}({{ len .Items }}) {{ end }}{{ if .Source}}{{ .Source }} - {{ else if .Channel }}{{ .Channel }} - {{ end }}Intake{{ end }}
{{ define "content" -}}
<nav class="center">

View File

@ -1,4 +1,4 @@
{{ define "title" }}Intake - fetch result for {{ .Source }}{{ end }}
{{ define "title" }}{{ .Source }} fetch result - Intake{{ end }}
{{ define "content" -}}
<nav class="center">

View File

@ -124,6 +124,8 @@ type FeedData struct {
Count int
LastUpdated time.Time
EditLink string
Source string
Channel string
}
func Feed(writer io.Writer, data FeedData) {

View File

@ -1,4 +1,4 @@
{{ define "title" }}{{ if .Item.Title }}{{ .Item.Title }}{{ else }}{{ .Item.Source }}/{{ .Item.Id }}{{ end }} - Intake [{{ .Item.Source }}]{{ end }}
{{ define "title" }}{{ if .Item.Title }}{{ .Item.Title }} - {{ .Item.Source }}{{ else }}{{ .Item.Source }}/{{ .Item.Id }}{{ end }} - Intake{{ end }}
{{ define "content" -}}
<nav class="center">

View File

@ -1,4 +1,4 @@
{{ define "title" }}Intake - Login{{ end }}
{{ define "title" }}Login - Intake{{ end }}
{{ define "content" -}}
<nav class="center">

View File

@ -46,6 +46,8 @@ func (env *Env) getSource(writer http.ResponseWriter, req *http.Request) {
Count: count,
LastUpdated: lastUpdated,
EditLink: "/source/" + source + "/edit",
Source: source,
Channel: "",
}
html.Feed(writer, data)
}