From: Sergey Matveev Date: Wed, 4 Feb 2026 13:26:05 +0000 (+0300) Subject: #-prefixed topics X-Git-Tag: v0.38.0~1 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5401d03c5c9ba4031143db4d3d5cc98de5e5c126;p=sgblog.git #-prefixed topics --- diff --git a/cmd/sgblog/gemini-entry.tmpl b/cmd/sgblog/gemini-entry.tmpl index 02dc3e5..7d0c05a 100644 --- a/cmd/sgblog/gemini-entry.tmpl +++ b/cmd/sgblog/gemini-entry.tmpl @@ -2,7 +2,7 @@ # {{.Title}} {{$.T.Get "What"}}: {{.Commit.Hash.String}} {{$.T.Get "When"}}: {{.When}} -{{if .Topics}}{{$.T.Get "Topics"}}:{{range .Topics}} {{.}}{{end}}{{end}} +{{if .Topics}}{{range .Topics}}#{{.}} {{end}}{{end}} ``` {{.Commit.Message}}``` {{- if .Note}} diff --git a/cmd/sgblog/gemini-menu.tmpl b/cmd/sgblog/gemini-menu.tmpl index c6a294e..4d6b648 100644 --- a/cmd/sgblog/gemini-menu.tmpl +++ b/cmd/sgblog/gemini-menu.tmpl @@ -1,5 +1,5 @@ {{$CR := printf "\r"}}20 text/gemini{{$CR}} -# {{.Cfg.Title}} {{if .Topic}}({{$.T.Get "topic"}}: {{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}}) +# {{.Cfg.Title}} {{if .Topic}}({{$.T.Get "topic"}}: #{{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}}) {{if .Cfg.AboutURL}}=> {{.Cfg.AboutURL}} {{$.T.Get "about"}}{{end}} {{if .Offset}}=> /?offset={{.OffsetPrev}}{{if .Topic}}&topic={{.Topic}}{{end}} {{$.T.Get "prev"}}{{end}} {{if not .LogEnded}}=> /?offset={{.OffsetNext}}{{if .Topic}}&topic={{.Topic}}{{end}} {{$.T.Get "next"}}{{end}} @@ -12,5 +12,5 @@ => /{{.Commit.Hash.String}} {{.Commit.Author.When.Format "2006-01-02"}} {{.Title}} {{end}} -{{range .Topics -}}=> /?topic={{.}} Topic: {{.}} +{{range .Topics -}}=> /?topic={{.}} #{{.}} {{end}} diff --git a/cmd/sgblog/gopher-entry.tmpl b/cmd/sgblog/gopher-entry.tmpl index aface6a..7464d96 100644 --- a/cmd/sgblog/gopher-entry.tmpl +++ b/cmd/sgblog/gopher-entry.tmpl @@ -1,7 +1,7 @@ {{$Cfg := .Cfg -}}{{$.T.Get "What"}}: {{.Commit.Hash.String}} {{$.T.Get "When"}}: {{.When}} ------------------------------------------------------------------------ -{{if .Topics}}{{$.T.Get "Topics"}}:{{range .Topics}} {{.}}{{end}}{{end}} +{{if .Topics}}{{range .Topics}}#{{.}} {{end}}{{end}} ------------------------------------------------------------------------ {{.Commit.Message -}} {{- if .Images}} diff --git a/cmd/sgblog/gopher-menu.tmpl b/cmd/sgblog/gopher-menu.tmpl index df39c82..d3c2436 100644 --- a/cmd/sgblog/gopher-menu.tmpl +++ b/cmd/sgblog/gopher-menu.tmpl @@ -11,5 +11,5 @@ i{{.Cfg.Title}} {{if .Topic}}({{$.T.Get "topic"}}: {{.Topic}}) {{end}}({{.Offset i{{$dateCur}} err{{template "domainPort" $Cfg}}{{$CR}}{{end}} 0{{.Title}} /{{.Commit.Hash.String}}{{template "domainPort" $Cfg}}{{$CR}}{{end}} {{range .Topics}} -1{{$.T.Get "topic"}}: {{.}} {{.}}/offset/0{{template "domainPort" $Cfg}}{{$CR}}{{end}} +1#{{.}} {{.}}/offset/0{{template "domainPort" $Cfg}}{{$CR}}{{end}} .{{$CRLF}} diff --git a/cmd/sgblog/http-entry.tmpl b/cmd/sgblog/http-entry.tmpl index 83bfc24..84fe761 100644 --- a/cmd/sgblog/http-entry.tmpl +++ b/cmd/sgblog/http-entry.tmpl @@ -17,7 +17,7 @@ {{if .Topics}} -{{$.T.Get "Topics"}}: {{range .Topics}}[{{.}}]{{end}} +{{range .Topics}}#{{.}} {{end}} {{end}}

{{.Title}}

diff --git a/cmd/sgblog/http-index.tmpl b/cmd/sgblog/http-index.tmpl index aca42fd..1116aaa 100644 --- a/cmd/sgblog/http-index.tmpl +++ b/cmd/sgblog/http-index.tmpl @@ -3,7 +3,7 @@ - {{.Cfg.Title}} {{if .Topic}}(topic: {{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}}) + {{.Cfg.Title}} {{if .Topic}}(#{{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}}) {{with .Cfg.CSS}}{{end}} {{with .Cfg.Webmaster}}{{end}} {{range .Cfg.GitURLs}}{{end}} @@ -15,9 +15,9 @@ {{if not .LogEnded}}{{end}} -{{if .Topics}}
-{{$.T.Get "Topics"}}: [{{$.T.Get "ALL"}}] -{{range .Topics}}[{{.}}] +{{if .Topics}} +{{$.T.Get "ALL"}}  +{{range .Topics}}#{{.}}  {{end}} {{end}} {{- $TopicsEnabled := .TopicsEnabled -}} @@ -45,7 +45,7 @@ {{if .ImagesNum}}{{.ImagesNum}}{{else}} {{end}} {{if .CommentsNum}}{{.CommentsNum}}{{else}} {{end}} {{if .DomainURLs}}{{range .DomainURLs}} {{.}} {{end}}{{else}} {{end}} - {{if $TopicsEnabled}}{{if .Topics}}{{range .Topics}} {{.}} {{end}}{{else}} {{end}}{{end}} + {{if $TopicsEnabled}}{{if .Topics}}{{range .Topics}} #{{.}} {{end}}{{else}} {{end}}{{end}} {{end}}