Skip to content

Commit

Permalink
Merge pull request #8285 from Flaburgan/revamped-registrations
Browse files Browse the repository at this point in the history
New registration page
  • Loading branch information
SuperTux88 committed Jan 24, 2024
2 parents 389b187 + 89f906b commit 7cc48be
Show file tree
Hide file tree
Showing 15 changed files with 226 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .scss-lint.yml
Expand Up @@ -70,7 +70,7 @@ linters:
enabled: true

IdSelector:
enabled: true
enabled: false

ImportantRule:
enabled: true
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -82,6 +82,7 @@ We recommend setting up new pods using Ruby 3.1, and updating existing pods to t
* Add Smart App Banner on iOS devices [#8409](https://github.com/diaspora/diaspora/pull/8409)
* Add a more detailed modal when reporting a post or a comment [#8035](https://github.com/diaspora/diaspora/pull/8035)
* Re-introduce likes on comments [#8203](https://github.com/diaspora/diaspora/pull/8203)
* New redesigned registration page [#8285](https://github.com/diaspora/diaspora/pull/8285)

# 0.7.18.2

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

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

0 comments on commit 7cc48be

Please sign in to comment.