diff --git a/app.go b/app.go index 002bd6e..8b630df 100644 --- a/app.go +++ b/app.go @@ -213,6 +213,12 @@ func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error { } } + return handleViewLanding(app, w, r) +} + +func handleViewLanding(app *App, w http.ResponseWriter, r *http.Request) error { + forceLanding := r.FormValue("landing") == "1" + p := struct { page.StaticPage Flashes []template.HTML diff --git a/routes.go b/routes.go index 724c532..777492b 100644 --- a/routes.go +++ b/routes.go @@ -150,6 +150,7 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router { // Handle special pages first write.HandleFunc("/login", handler.Web(viewLogin, UserLevelNoneRequired)) + write.HandleFunc("/signup", handler.Web(handleViewLanding, UserLevelNoneRequired)) write.HandleFunc("/invite/{code}", handler.Web(handleViewInvite, UserLevelNoneRequired)).Methods("GET") // TODO: show a reader-specific 404 page if the function is disabled write.HandleFunc("/read", handler.Web(viewLocalTimeline, UserLevelReader)) diff --git a/templates/base.tmpl b/templates/base.tmpl index 41b0f2a..34fcf22 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -38,6 +38,7 @@ {{if .SimpleNav}}{{if .Username}}