Display current tag on Reader

i.e. current tag a user is browsing, when they are.
customize-reader
Matt Baer 5 years ago
parent 17f7bc1bec
commit cd27a37027
  1. 2
      read.go
  2. 2
      templates/read.tmpl

@ -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)

@ -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 }}

Loading…
Cancel
Save