Demographic men disclaimer on the signup page

This commit is contained in:
Noah Petherbridge 2025-01-04 12:41:50 -08:00
parent 0d0cabb75d
commit 61b047feaa
2 changed files with 39 additions and 0 deletions

View File

@ -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

View File

@ -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!
</p>
<!-- Before-signup disclaimer that the site is mainly made up of men -->
{{if .DemographicMenCount}}
<div class="notification is-warning is-light content">
<p>
<i class="fa fa-info-circle mr-1"></i>
<strong>Before you sign up...</strong>
</p>
<p>
Like <em>most</em> nudist websites on the Internet, <strong>the majority of our members</strong>
<small>({{.DemographicMenCount.Percent}}%)</small> currently are <strong>men.</strong>
</p>
<p>
If you are a straight man who is hoping to find a lot of women here, please first take a
<a href="/insights">peek inside the website</a> to get a feel for our member demographics.
</p>
</div>
{{end}}
<h1>Site Rules</h1>
<ul>
@ -90,10 +109,16 @@
<h1>Sign Up</h1>
{{if or .SkipEmailVerification (not .SignupToken)}}
<p>
To start the process, enter your e-mail address below. You will be sent an e-mail to verify you
control that address and then you can create a username and password.
</p>
{{else}}
<p>
Your e-mail address has been verified! You may now pick a username and finish creating your {{PrettyTitle}} account.
</p>
{{end}}
<form action="/signup" method="POST">
{{ InputCSRF }}