diff --git a/config/config.go b/config/config.go index 78892bf..a616401 100644 --- a/config/config.go +++ b/config/config.go @@ -183,6 +183,16 @@ func (ac *AppCfg) LandingPath() string { return ac.Landing } +func (ac AppCfg) SignupPath() string { + if !ac.OpenRegistration { + return "" + } + if ac.Chorus || ac.Private || (ac.Landing != "" && ac.Landing != "/") { + return "/signup" + } + return "/" +} + // Load reads the given configuration file, then parses and returns it as a Config. func Load(fname string) (*Config, error) { if fname == "" { diff --git a/pages/login.tmpl b/pages/login.tmpl index 345b171..79875c6 100644 --- a/pages/login.tmpl +++ b/pages/login.tmpl @@ -65,7 +65,7 @@ hr.short { - {{if and (not .SingleUser) .OpenRegistration}}

{{if .Message}}{{.Message}}{{else}}No account yet? Sign up to start a blog.{{end}}

{{end}} + {{if and (not .SingleUser) .OpenRegistration}}

{{if .Message}}{{.Message}}{{else}}No account yet? Sign up to start a blog.{{end}}

{{end}}