From 1181ee6acfdb9a02c6bbb0367f1d9ef715b8bdd1 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 23 Jun 2019 22:43:47 -0400 Subject: [PATCH] a few more urls for ease of use --- honk.go | 7 ++++--- views/header.html | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/honk.go b/honk.go index 2b34242..46f5f4d 100644 --- a/honk.go +++ b/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 @@ func homepage(w http.ResponseWriter, r *http.Request) { honks = osmosis(honks, u.UserID) } templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r) - } else { - honks = getpublichonks() } reverbolate(honks) @@ -1364,6 +1364,7 @@ func serve() { 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) diff --git a/views/header.html b/views/header.html index 544940c..0f3974d 100644 --- a/views/header.html +++ b/views/header.html @@ -19,6 +19,8 @@ combos
more +about +front xzone zonkzone account