diff --git a/pkg/controller/account/signup.go b/pkg/controller/account/signup.go index 7d58806..69e13bc 100644 --- a/pkg/controller/account/signup.go +++ b/pkg/controller/account/signup.go @@ -12,6 +12,7 @@ import ( "code.nonshy.com/nonshy/website/pkg/mail" "code.nonshy.com/nonshy/website/pkg/middleware" "code.nonshy.com/nonshy/website/pkg/models" + "code.nonshy.com/nonshy/website/pkg/models/demographic" "code.nonshy.com/nonshy/website/pkg/redis" "code.nonshy.com/nonshy/website/pkg/session" "code.nonshy.com/nonshy/website/pkg/spam" @@ -285,6 +286,19 @@ func Signup() http.HandlerFunc { } } + // Especially for the main signup page: get the member demographics so we can warn people + // that the memberbase is largely made up of men. + if demo, err := demographic.Get(); err == nil { + var men demographic.MemberDemographic + for _, row := range demo.People.IterGenders() { + if row.Label == "Man" { + men = row + break + } + } + vars["DemographicMenCount"] = men + } + if err := tmpl.Execute(w, r, vars); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return diff --git a/web/templates/account/signup.html b/web/templates/account/signup.html index 8838885..c7baed4 100644 --- a/web/templates/account/signup.html +++ b/web/templates/account/signup.html @@ -28,6 +28,25 @@ and taking a selfie showing your face and clearly holding the sheet of paper. But we'll get to that a little later!

+ + {{if .DemographicMenCount}} +
+

+ + Before you sign up... +

+

+ Like most nudist websites on the Internet, the majority of our members + ({{.DemographicMenCount.Percent}}%) currently are men. +

+ +

+ If you are a straight man who is hoping to find a lot of women here, please first take a + peek inside the website to get a feel for our member demographics. +

+
+ {{end}} +

Site Rules