a few more urls for ease of use
Ted Unangst tedu@tedunangst.com
Sun, 23 Jun 2019 22:43:47 -0400
2 files changed,
6 insertions(+),
3 deletions(-)
M
honk.go
→
honk.go
@@ -111,7 +111,9 @@ func homepage(w http.ResponseWriter, r *http.Request) {
templinfo := getInfo(r) u := login.GetUserInfo(r) var honks []*Honk - if u != nil { + if r.URL.Path == "/front" || u == nil { + honks = getpublichonks() + } else { if r.URL.Path == "/atme" { honks = gethonksforme(u.UserID) } else {@@ -119,8 +121,6 @@ honks = gethonksforuser(u.UserID)
honks = osmosis(honks, u.UserID) } templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r) - } else { - honks = getpublichonks() } reverbolate(honks)@@ -1364,6 +1364,7 @@ posters := mux.Methods("POST").Subrouter()
getters := mux.Methods("GET").Subrouter() getters.HandleFunc("/", homepage) + getters.HandleFunc("/front", homepage) getters.HandleFunc("/robots.txt", nomoroboto) getters.HandleFunc("/rss", showrss) getters.HandleFunc("/u/{name:[[:alnum:]]+}", showuser)
M
views/header.html
→
views/header.html
@@ -19,6 +19,8 @@ <span><a href="/honkers">honkers</a></span>
<span><a href="/c">combos</a></span> <details> <summary>more</summary> +<span><a href="/about">about</a></span> +<span><a href="/front">front</a></span> <span><a href="/xzone">xzone</a></span> <span><a href="/zonkzone">zonkzone</a></span> <span><a href="/account">account</a></span>