Display current tag on Reader

i.e. current tag a user is browsing, when they are.
This commit is contained in:
Matt Baer 2019-08-06 10:42:43 -04:00
parent 17f7bc1bec
commit cd27a37027
2 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,7 @@ type readPublication struct {
Posts *[]PublicPost
CurrentPage int
TotalPages int
SelTopic string
}
func initLocalTimeline(app *App) {
@ -201,6 +202,7 @@ func showLocalTimeline(app *App, w http.ResponseWriter, r *http.Request, page in
&posts,
page,
ttlPages,
tag,
}
err := templates["read"].ExecuteTemplate(w, "base", d)

View File

@ -76,7 +76,7 @@
{{define "content"}}
<div class="content-container snug" style="max-width: 40rem;">
<h1 style="text-align:center">Reader</h1>
<p>Read the latest posts from {{.SiteName}}. {{if .Username}}To showcase your writing here, go to your <a href="/me/c/">blog</a> settings and select the <em>Public</em> option.{{end}}</p>
<p{{if .SelTopic}} style="text-align:center"{{end}}>{{if .SelTopic}}#{{.SelTopic}} posts{{else}}Read the latest posts from {{.SiteName}}. {{if .Username}}To showcase your writing here, go to your <a href="/me/c/">blog</a> settings and select the <em>Public</em> option.{{end}}{{end}}</p>
</div>
<div id="wrapper">
{{ if gt (len .Posts) 0 }}