Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New registration page #8285

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ linters:
enabled: true

IdSelector:
enabled: true
enabled: false

ImportantRule:
enabled: true
Expand Down
10 changes: 0 additions & 10 deletions app/assets/javascripts/app/pages/registration.js

This file was deleted.

4 changes: 0 additions & 4 deletions app/assets/javascripts/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ app.Router = Backbone.Router.extend({
});
},

registration: function() {
app.page = new app.pages.Registration();
},

settings: function() {
app.page = new app.pages.Settings();
},
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/_application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
// font overrides
@import 'typography';

// New design, can be used adding the .modern-design class to a <div> around the page which is ported
@import 'modern-design';

// layout
@import 'sidebar';

Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/mobile/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

@import 'typography';

// New design, can be used adding the .modern-design class to a <div> around the page which is ported
@import 'modern-design';
@import 'registration';

a {
color: #2489ce;
text-decoration: none;
Expand Down
66 changes: 66 additions & 0 deletions app/assets/stylesheets/modern-design.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
$breakpoint: 700px;

$subtle: $text-dark-grey;

$default-size: 16px;
$smaller: .9em;

$default-margin: 16px; // Will be 1rem once the default-size will be set on <html>
$double-margin: $default-margin * 2;
$triple-margin: $default-margin * 3;

$radius: 4px;


.modern-design {
font-size: $default-size;

// Style
h1 {
font-size: 3em;
margin: $double-margin 0;

@media screen and (max-width: $breakpoint) {
font-size: 2em;
margin: $default-margin 0;
}
}

section {
margin-bottom: $double-margin;
}

section:last-child {
margin-bottom: 0;
}

.advice {
color: $subtle;
font-size: $smaller;
font-style: italic;
}
// End of style

// Layout
// This cleans the famous children "margin-top" problem
.small-container::before,
.small-container::after {
content: ' ';
display: table;
}

.small-container {
margin: auto;
max-width: 800px;

@media screen and (max-width: $breakpoint) {
padding: 10px;
}
}

.flex-container {
display: flex;
justify-content: space-between;
}
// End of layout
}
95 changes: 60 additions & 35 deletions app/assets/stylesheets/registration.scss
Original file line number Diff line number Diff line change
@@ -1,54 +1,79 @@
.page-registrations {
.ball {
background: image-url('branding/ball.png') no-repeat;
background-size: contain;
height: 633px;
max-width: 100%;
// For the mobile version which doesn't have the same global CSS
background: $body-bg;

#main {
padding: 0;
padding-top: 46px;
}
// End specific mobile

.v-center {
display: table;
height: 633px;
// Overriding bootstrap
.form-control {
display: inline-block;
width: 320px;
}
// End Overriding bootstrap

@media (max-width: $screen-xs-max) {
.v-center {
height: auto;
.fields {
margin: $triple-margin 0;

@media screen and (max-width: $breakpoint) {
flex-direction: column-reverse;
margin: $double-margin 0;
}

section {
border-left: solid 3px $brand-primary;
padding-left: 10px;
}
}

.content {
display: table-cell;
vertical-align: middle;
.advice {
max-width: 450px;
}

.captcha {
align-items: center;
display: flex;

h1 {
font-size: 35px;
margin: 12px 0;
.captcha-img {
margin-left: 5px;
order: 2;
SuperTux88 marked this conversation as resolved.
Show resolved Hide resolved
}
}

form {
max-width: 500px;
.import-and-ball-container {
display: flex;
flex-direction: column;
justify-content: space-between;
}

.captcha-img {
left: 10px;
position: absolute;
top: 169px;
width: 120px;
}
.import-instructions {
align-self: flex-start;
background-color: lighten($brand-primary, 40);
border: 2px solid lighten($brand-primary, 20);
border-radius: $radius;
font-size: $smaller;
margin-left: $default-margin;
padding: $default-margin;
width: 240px;

.form-control.captcha-input {
border-bottom: 1px solid $input-border;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
box-sizing: border-box;
line-height: $line-height-base;
padding-left: 130px;
@media screen and (max-width: $breakpoint) {
margin-bottom: $double-margin;
margin-left: 0;
width: 100%;
}
}

.terms > a {
color: inherit;
text-decoration: underline;
.ball {
background: image-url('branding/ball.png') no-repeat;
background-size: contain;
height: 250px;
width: 250px;

@media screen and (max-width: $breakpoint) {
display: none;
}
}
}
2 changes: 1 addition & 1 deletion app/views/layouts/application.mobile.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%meta{name: "MobileOptimized", content: "320"}/
%meta{"http-equiv" => "cleartype", :content => "on"}/

%body
%body{class: "page-#{controller_name} action-#{action_name}"}
#app
= render "layouts/header"
- if user_signed_in?
Expand Down
81 changes: 0 additions & 81 deletions app/views/registrations/_form.haml

This file was deleted.