docbrown/app/views/devise/registrations/_registration_form.html.erb
Jacob Herrington ff177b0c09
[deploy] Only show user count for large userbases (#11021)
This is a request from one of our early adopter Forems. We should only
render the user count that appears on most of our sign up CTAs when a
Forem has a large userbase (initially, I'm setting that to 1000 users).

The change also removes a lot of duplicated markup by using some
partials to render the copy in the various auth CTAs.

Hopefully, this is written in such a way that changing opening up more
fine-grained control of these partials is trivial.
2020-10-23 09:00:59 -05:00

55 lines
3 KiB
Text

<section class="crayons-layout">
<div class="registration crayons-card">
<div class="registration__content">
<h1 class="registration__title">
<% if params[:state] == "new-user" && invite_only_mode? %>
<%= community_name %> is invite only.
<% else %>
Welcome to <%= community_name %>
<% end %>
</h1>
<p class="registration__description">
<%= render "shared/authentication_title" %>
</p>
</div>
<div class="registration__actions">
<%= render partial: "shared/authentication/providers_registration_form" %>
<% if params[:state] == "new-user" %>
<div class="registration__hr">
<span class="registration__hr-label">
Already have an account? <a href="<%= sign_up_path %>">View more sign in options</a>.
</span>
</div>
<% else %>
<div class="registration__actions-email" id="sign-in-password-form">
<% if SiteConfig.allow_email_password_login %>
<div class="registration__hr">
<span class="registration__hr-label">
Have a password? Continue with your email address
</span>
</div>
<%= render partial: "shared/authentication/email_login_form" %>
<% end %>
</div>
<% end %>
</div>
</div>
<footer class="registration__footer">
<p class="registration__footer-content">
Open Source
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44" width="24" height="24">
<path fill="#FFCC4D" d="M36 18c0 9.941-8.059 18-18 18S0 27.941 0 18 8.059 0 18 0s18 8.059 18 18" /><path fill-rule="evenodd" clip-rule="evenodd" fill="#292F33" d="M1.24 11.018c.24.239 1.438.957 1.677 1.675.24.717.72 4.784 2.158 5.981 1.483 1.232 7.077.774 8.148.24 2.397-1.195 2.691-4.531 3.115-6.221.239-.957 1.677-.957 1.677-.957s1.438 0 1.678.956c.424 1.691.72 5.027 3.115 6.221 1.072.535 6.666.994 8.151-.238 1.436-1.197 1.915-5.264 2.155-5.982.238-.717 1.438-1.435 1.677-1.674.241-.239.241-1.196 0-1.436-.479-.478-6.134-.904-12.223-.239-1.215.133-1.677.478-4.554.478-2.875 0-3.339-.346-4.553-.478-6.085-.666-11.741-.24-12.221.238-.239.239-.239 1.197 0 1.436z" /><path fill="#664500" d="M27.335 23.629c-.178-.161-.444-.171-.635-.029-.039.029-3.922 2.9-8.7 2.9-4.766 0-8.662-2.871-8.7-2.9-.191-.142-.457-.13-.635.029-.177.16-.217.424-.094.628C8.7 24.472 11.788 29.5 18 29.5s9.301-5.028 9.429-5.243c.123-.205.084-.468-.094-.628z" />
</svg>
· Free Forever
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44" width="24" height="24">
<path fill="#DD2E44" d="M39.885 15.833c0-5.45-4.418-9.868-9.867-9.868-3.308 0-6.227 1.633-8.018 4.129-1.791-2.496-4.71-4.129-8.017-4.129-5.45 0-9.868 4.417-9.868 9.868 0 .772.098 1.52.266 2.241C5.751 26.587 15.216 35.568 22 38.034c6.783-2.466 16.249-11.447 17.617-19.959.17-.721.268-1.469.268-2.242z" />
</svg>
</p>
<p>
We strive for transparency and don't collect excess data.
</p>
</footer>
</section>