Browse Source

Merge pull request #937 from sharelatex/pr-login-signup-forms

Login and register forms styling
James Allen 8 năm trước cách đây
mục cha
commit
a451a0b3f8

+ 1 - 0
services/web/public/img/other-brands/logo_google.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 510.2"><title>Shape-Copy</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path id="Shape-Copy" d="M254.85,303.57v-94.9H493.62C497.19,224.74,500,239.8,500,261c0,145.66-97.7,249.23-244.9,249.23C114.29,510.2,0,395.92,0,255.1S114.29,0,255.1,0C324,0,381.63,25.26,425.77,66.58L353.32,137c-18.37-17.35-50.51-37.76-98.21-37.76-84.44,0-153.32,70.15-153.32,156.12S170.66,411.48,255.1,411.48c97.7,0,133.67-67.6,140.31-107.65H254.85Z" fill="#fff"/></g></g></svg>

+ 1 - 0
services/web/public/img/other-brands/logo_google_alt.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 510.2"><title>Shape-Copy</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path id="Shape-Copy" d="M254.85,303.57v-94.9H493.62C497.19,224.74,500,239.8,500,261c0,145.66-97.7,249.23-244.9,249.23C114.29,510.2,0,395.92,0,255.1S114.29,0,255.1,0C324,0,381.63,25.26,425.77,66.58L353.32,137c-18.37-17.35-50.51-37.76-98.21-37.76-84.44,0-153.32,70.15-153.32,156.12S170.66,411.48,255.1,411.48c97.7,0,133.67-67.6,140.31-107.65H254.85Z" fill="#4885ED"/></g></g></svg>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
services/web/public/img/other-brands/logo_ieee.svg


+ 1 - 0
services/web/public/img/other-brands/logo_orcid.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><title>Asset 1</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M289.06,181.64H242.77V336.72h47.85c68.16,0,83.79-51.76,83.79-77.54C374.41,217.19,347.66,181.64,289.06,181.64Z" fill="#fff"/><path d="M250,0C111.91,0,0,111.91,0,250S111.91,500,250,500,500,388.09,500,250,388.09,0,250,0ZM168.55,249V363.67H138.48V154.49h30.08Zm-15-118.36a19.73,19.73,0,1,1,19.73-19.73A19.8,19.8,0,0,1,153.52,130.66Zm140.82,233.2H212.7V154.49h81.25c77.34,0,111.33,55.27,111.33,104.69C405.27,312.89,363.28,363.87,294.34,363.87Z" fill="#fff"/></g></g></svg>

+ 1 - 0
services/web/public/img/other-brands/logo_orcid_alt.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><title>Asset 1</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M289.06,181.64H242.77V336.72h47.85c68.16,0,83.79-51.76,83.79-77.54C374.41,217.19,347.66,181.64,289.06,181.64Z" fill="#95ba2e"/><path d="M250,0C111.91,0,0,111.91,0,250S111.91,500,250,500,500,388.09,500,250,388.09,0,250,0ZM168.55,249V363.67H138.48V154.49h30.08Zm-15-118.36a19.73,19.73,0,1,1,19.73-19.73A19.8,19.8,0,0,1,153.52,130.66Zm140.82,233.2H212.7V154.49h81.25c77.34,0,111.33,55.27,111.33,104.69C405.27,312.89,363.28,363.87,294.34,363.87Z" fill="#95ba2e"/></g></g></svg>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
services/web/public/img/other-brands/logo_sharelatex.svg


+ 1 - 0
services/web/public/img/other-brands/logo_twitter.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 406.28"><title>Asset 3</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M157.24,406.28c188.68,0,291.88-156.32,291.88-291.88,0-4.44,0-8.86-.3-13.26A208.72,208.72,0,0,0,500,48a204.76,204.76,0,0,1-58.92,16.14,102.94,102.94,0,0,0,45.1-56.74A205.58,205.58,0,0,1,421,32.34,102.68,102.68,0,0,0,246.22,125.9,291.24,291.24,0,0,1,34.8,18.72,102.66,102.66,0,0,0,66.56,155.66,101.82,101.82,0,0,1,20,142.82v1.3a102.62,102.62,0,0,0,82.3,100.56A102.42,102.42,0,0,1,56,246.44a102.7,102.7,0,0,0,95.84,71.24,205.84,205.84,0,0,1-127.4,44A208.82,208.82,0,0,1,0,360.2a290.42,290.42,0,0,0,157.24,46" fill="#fff"/></g></g></svg>

+ 1 - 0
services/web/public/stylesheets/_ol_style_includes.less

@@ -2,3 +2,4 @@
 @import "app/front-chat-widget.less";
 @import "app/front-chat-widget.less";
 @import "app/ol-chat.less";
 @import "app/ol-chat.less";
 @import "app/templates-v2.less";
 @import "app/templates-v2.less";
+@import "app/login-register.less";

+ 61 - 9
services/web/public/stylesheets/app/homepage.less

@@ -1,3 +1,5 @@
+@register-v-spacing: 20px;
+
 .deprecated-sl-masthead {
 .deprecated-sl-masthead {
 	display: inline-block;
 	display: inline-block;
 	margin-top: @header-height;
 	margin-top: @header-height;
@@ -73,7 +75,7 @@
 	.register-banner {
 	.register-banner {
 		background-image: -webkit-linear-gradient(top,rgba(0,0,0,0.7),rgba(0,0,0,0.9));
 		background-image: -webkit-linear-gradient(top,rgba(0,0,0,0.7),rgba(0,0,0,0.9));
 		background-image: linear-gradient(to bottom,rgba(0,0,0,0.7),rgba(0,0,0,0.9));
 		background-image: linear-gradient(to bottom,rgba(0,0,0,0.7),rgba(0,0,0,0.9));
-		padding: @line-height-computed 0;
+		padding: @register-v-spacing 0;
 		position: absolute;
 		position: absolute;
 		bottom: 0;
 		bottom: 0;
 		width: 100%;
 		width: 100%;
@@ -83,13 +85,17 @@
 			font-family: @font-family-sans-serif;
 			font-family: @font-family-sans-serif;
 			font-weight: 500;
 			font-weight: 500;
 			letter-spacing: 1px;
 			letter-spacing: 1px;
+			margin-bottom: @register-v-spacing;
 		}
 		}
 		.form-group {
 		.form-group {
 			margin-left: @line-height-computed / 2;
 			margin-left: @line-height-computed / 2;
 		}
 		}
+		.input-lg {
+			border-radius: 9999px;
+		}
 	}
 	}
 	.screenshot {
 	.screenshot {
-		height: 550px;
+		height: 600px;
 		margin: auto;
 		margin: auto;
 		margin-bottom: -50px;
 		margin-bottom: -50px;
 		overflow-y: hidden;
 		overflow-y: hidden;
@@ -115,18 +121,64 @@
 			}
 			}
 		}
 		}
 	}
 	}
-	.btn-hero {
-		float: left;
-	}
 }
 }
-@media only screen and (max-width: @screen-sm-max) {
-	.masthead {
-		.btn-hero {
-			float: none;
+
+.hp-register-external-separator {
+	margin: 0 0 (@register-v-spacing / 2);
+	color: #FFF;
+}
+
+	.hp-register-external-separator-or {
+		vertical-align: middle;
+		&::before,
+		&::after {
+			content: "";
+			display: inline-block;
+			vertical-align: middle;
+			width: 5em;
+			height: 1px;
+			background-color: rgba(255, 255, 255, .3);
+		}
+		&::before {
+			margin-right: 1.25em;
+		}
+		&::after {
+			margin-left: 1.25em;
+		}
+	}
+
+.hp-register-newsletter-checkbox {
+	font-size: 90%;
+	& > .checkbox-newsletter {
+		text-align: left;
+		@media only screen and (min-width: @screen-sm-min) {
+			text-align: center;
 		}
 		}
 	}
 	}
 }
 }
 
 
+.hp-login-btn {
+	min-width: 220px;
+}
+
+.hp-register-form-email-pwd {
+	position: relative;
+}
+
+	.hp-register-form-email-pwd-btn-container.form-group {
+		display: block;
+		margin-top: (@register-v-spacing / 2);
+		@media only screen and (min-width: @screen-md-min) {
+			position: absolute;
+			display: inline-block;
+			height: 100%;
+			top: -(@register-v-spacing / 2);
+			& > .btn-hero {
+				height: 100%;
+			}
+		}
+	}
+
 .universities {
 .universities {
 	border-bottom: 1px solid @gray-lighter;
 	border-bottom: 1px solid @gray-lighter;
 	text-align: center;
 	text-align: center;

+ 195 - 0
services/web/public/stylesheets/app/login-register.less

@@ -0,0 +1,195 @@
+@brand-ieee-color       : #00629B;
+@brand-google-color     : #4885ED;
+@brand-twitter-color    : #1DA1F2;
+@brand-orcid-color      : #A6CE39;
+@brand-sharelatex-color : #A93529;
+
+.make-login-register-brand-btn(@bg-color) {
+	background-color: @bg-color;
+	text-indent: -10px;
+	padding-left: 0;
+	padding-right: 0;
+	&:focus,
+	&:hover {
+		background-color: darken(@bg-color, 8%);
+	}
+	&:active {
+		background-color: darken(@bg-color, 16%);
+	} 
+}
+
+.make-login-register-brand-btn-alt(@color) {
+	background-color: #FFF;
+	color: @color;
+	text-indent: -10px;
+	padding-left: 0;
+	padding-right: 0;
+	&:focus,
+	&:hover {
+		background-color: #FFF;
+		color: darken(@color, 8%);
+	}
+	&:active {
+		background-color: #FFF;
+		color: darken(@color, 16%);
+	} 
+}
+
+.login-register-container {
+	max-width: 400px;
+	margin: 0 auto;
+}
+	.login-register-header {
+		padding-top: @line-height-computed;
+		padding-bottom: @line-height-computed - 5;
+		border-bottom: solid 1px @hr-border;
+	}
+		.login-register-header-heading {
+			margin: 0;
+			color: @text-color;
+		}
+
+	.login-register-card {
+		padding-top: 0;
+		padding-bottom: 0;
+		text-align: center;
+	}
+
+		.login-register-form,
+		.login-register-sharelatex {
+			padding: @line-height-computed (@line-height-computed * 2);
+			border-bottom: solid 1px @hr-border;
+			&:last-child {
+				border-bottom-width: 0;
+			}
+		}
+		.login-register-other-links {
+			padding: @line-height-computed (@line-height-computed * 2);
+		}
+
+		.login-register-text,
+		.login-register-hr-text-container {
+			margin: 0;
+			line-height: 1;
+			font-size: 90%;
+		}
+
+		.login-register-text {
+			padding-bottom: 25px;
+			&:last-child {
+				padding-bottom: 0;
+			}
+		}
+
+		.login-register-hr-text-container {
+			position: relative;
+			padding: @line-height-computed 0;
+
+			&::before {
+				content: '';
+				position: absolute;
+				height: 1px;
+				background-color: @hr-border;
+				top: 50%;
+				left: 0;
+				right: 0;
+			}
+		}
+			.login-register-hr-text {
+				position: relative;
+				background-color: #FFF;
+				padding: 0 (@line-height-computed / 2);
+			}
+		.login-register-sharelatex-tooltip {
+			display: inline-block;
+			font-size: 135%;
+			position: relative;
+			top: 2px;
+			margin-left: 3px;
+			color: @link-color;
+			cursor: pointer;
+		}
+
+		.login-register-newsletter {
+			font-size: 90%;
+			margin: @line-height-computed -(2 * @line-height-computed) 0;
+			text-align: left;
+
+			& > .checkbox {
+				margin-bottom: 0;
+			}
+		}
+
+		.login-btn-ieee {
+			.make-login-register-brand-btn(@brand-ieee-color);
+		}
+
+		.login-btn-google {
+			.make-login-register-brand-btn(@brand-google-color);
+		} 
+
+		.login-btn-google-alt {
+			.make-login-register-brand-btn-alt(@brand-google-color);
+		} 
+
+		.login-btn-twitter {
+			.make-login-register-brand-btn(@brand-twitter-color);
+		} 
+
+		.login-btn-orcid {
+			.make-login-register-brand-btn(@brand-orcid-color);
+		} 
+
+		.login-btn-orcid-alt {
+			.make-login-register-brand-btn-alt(darken(@brand-orcid-color, 6%));
+		} 
+
+		.login-btn-sharelatex {
+			.make-login-register-brand-btn(@brand-sharelatex-color);
+		} 
+			.login-btn-icon {
+				display: inline-block;
+				float: left;
+				margin-left: 5px;
+				background: url(/img/brand/lion.svg) center/contain no-repeat;
+				width: 24px;
+
+				&::before {
+					content: '\00a0'; // Non-breakable space. A non-breakable character here makes this icon work like font-awesome.
+				}
+			}
+			.login-btn-icon-ieee {
+				background-image: url(/img/other-brands/logo_ieee.svg);
+			}
+			.login-btn-icon-google {
+				background-image: url(/img/other-brands/logo_google.svg);
+			}
+			.login-btn-icon-google-alt {
+				background-image: url(/img/other-brands/logo_google_alt.svg);
+			}
+			.login-btn-icon-twitter {
+				background-image: url(/img/other-brands/logo_twitter.svg);
+			}
+			.login-btn-icon-orcid {
+				background-image: url(/img/other-brands/logo_orcid.svg);
+			}
+			.login-btn-icon-orcid-alt {
+				background-image: url(/img/other-brands/logo_orcid_alt.svg);
+			}
+			.login-btn-icon-sharelatex {
+				background-image: url(/img/other-brands/logo_sharelatex.svg);
+			}
+
+		.login-register-header-heading {
+			margin: 0;
+			color: @text-color;
+		}
+
+.registration-message-heading {
+	color: @text-color;	
+}
+
+.registration-message-details {
+	font-size: 90%;
+}
+

+ 0 - 1
services/web/public/stylesheets/core/_common-variables.less

@@ -17,7 +17,6 @@
 //** Link hover color set via `darken()` function.
 //** Link hover color set via `darken()` function.
 @link-hover-color:      darken(@link-color, 15%);
 @link-hover-color:      darken(@link-color, 15%);
 
 
-
 //== Typography
 //== Typography
 //
 //
 //## Font, line-height, and color for body text, headings, and more.
 //## Font, line-height, and color for body text, headings, and more.

+ 1 - 0
services/web/public/stylesheets/core/ol-variables.less

@@ -52,6 +52,7 @@
 @link-color-alt         : @ol-green;
 @link-color-alt         : @ol-green;
 @link-active-color      : @ol-dark-green;
 @link-active-color      : @ol-dark-green;
 @link-hover-color       : @ol-dark-blue;
 @link-hover-color       : @ol-dark-blue;
+@hr-border              : @ol-blue-gray-1;
 
 
 // Button colors and sizing
 // Button colors and sizing
 @btn-border-width        : 0;
 @btn-border-width        : 0;

+ 1 - 1
services/web/test/acceptance/coffee/helpers/User.coffee

@@ -58,7 +58,7 @@ class User
 			@getCsrfToken (error) =>
 			@getCsrfToken (error) =>
 				return callback(error) if error?
 				return callback(error) if error?
 				@request.post {
 				@request.post {
-					url: "/login"
+					url: if settings.enableLegacyLogin then "/login/legacy" else "/login"
 					json: { email, @password }
 					json: { email, @password }
 				}, callback
 				}, callback
 
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác