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}}
diff --git a/templates/user/include/header.tmpl b/templates/user/include/header.tmpl index 1ebc6ac..2b522a8 100644 --- a/templates/user/include/header.tmpl +++ b/templates/user/include/header.tmpl @@ -47,6 +47,7 @@ {{if .SimpleNav}} About {{if and (and (not .SingleUser) .LocalTimeline) .CanViewReader}}Reader{{end}} + {{if and (and (and (not .SingleUser) .Chorus) .OpenRegistration) (not .Username)}}Sign up{{end}} {{if .Username}}Log out{{else}}Log in{{end}} {{else}} Blogs