mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 09:19:33 -05:00
Style login and register forms
This commit is contained in:
parent
ead812eacc
commit
d3221f1cf1
11 changed files with 121 additions and 84 deletions
|
@ -2,7 +2,6 @@ metrics = require("metrics-sharelatex")
|
||||||
logger = require('logger-sharelatex')
|
logger = require('logger-sharelatex')
|
||||||
_ = require('underscore')
|
_ = require('underscore')
|
||||||
User = require('../../models/User').User
|
User = require('../../models/User').User
|
||||||
Quote = require('../../models/Quote').Quote
|
|
||||||
Project = require('../../models/Project').Project
|
Project = require('../../models/Project').Project
|
||||||
DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
|
DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
|
||||||
Settings = require('settings-sharelatex')
|
Settings = require('settings-sharelatex')
|
||||||
|
@ -108,13 +107,6 @@ module.exports = AdminController =
|
||||||
logger.log "all docs have been saved to mongo"
|
logger.log "all docs have been saved to mongo"
|
||||||
res.send()
|
res.send()
|
||||||
|
|
||||||
addQuote : (req, res)->
|
|
||||||
quote = new Quote
|
|
||||||
author: req.body.author
|
|
||||||
quote: req.body.quote
|
|
||||||
quote.save (err)->
|
|
||||||
res.send 200
|
|
||||||
|
|
||||||
syncUserToSubscription: (req, res)->
|
syncUserToSubscription: (req, res)->
|
||||||
{user_id, subscription_id} = req.body
|
{user_id, subscription_id} = req.body
|
||||||
RecurlyWrapper.getSubscription subscription_id, {}, (err, subscription)->
|
RecurlyWrapper.getSubscription subscription_id, {}, (err, subscription)->
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
logger = require('logger-sharelatex')
|
logger = require('logger-sharelatex')
|
||||||
_ = require('underscore')
|
_ = require('underscore')
|
||||||
Quotes = require('../../models/Quote').Quote
|
|
||||||
|
|
||||||
Path = require "path"
|
Path = require "path"
|
||||||
fs = require "fs"
|
fs = require "fs"
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
mongoose = require 'mongoose'
|
|
||||||
Settings = require 'settings-sharelatex'
|
|
||||||
|
|
||||||
Schema = mongoose.Schema
|
|
||||||
ObjectId = Schema.ObjectId
|
|
||||||
|
|
||||||
QuoteSchema = new Schema
|
|
||||||
author : {type:String, default:'new quote'}
|
|
||||||
quote : {type:String}
|
|
||||||
|
|
||||||
mongoose.model 'Quote', QuoteSchema
|
|
||||||
exports.Quote = mongoose.model 'Quote'
|
|
||||||
exports.QuoteSchema = QuoteSchema
|
|
|
@ -62,6 +62,7 @@ module.exports = class Router
|
||||||
app.get '/security', HomeController.externalPage("security", "Security")
|
app.get '/security', HomeController.externalPage("security", "Security")
|
||||||
app.get '/privacy_policy', HomeController.externalPage("privacy", "Privacy Policy")
|
app.get '/privacy_policy', HomeController.externalPage("privacy", "Privacy Policy")
|
||||||
app.get '/planned_maintenance', HomeController.externalPage("planned_mainteance", "Planned Maintenance")
|
app.get '/planned_maintenance', HomeController.externalPage("planned_mainteance", "Planned Maintenance")
|
||||||
|
app.get '/style', HomeController.externalPage("style_guide", "Style Guide")
|
||||||
|
|
||||||
app.get '/themes', InfoController.themes
|
app.get '/themes', InfoController.themes
|
||||||
app.get '/advisor', InfoController.advisor
|
app.get '/advisor', InfoController.advisor
|
||||||
|
@ -160,7 +161,6 @@ module.exports = class Router
|
||||||
app.post '/admin/closeEditor', SecurityManager.requestIsAdmin, AdminController.closeEditor
|
app.post '/admin/closeEditor', SecurityManager.requestIsAdmin, AdminController.closeEditor
|
||||||
app.post '/admin/dissconectAllUsers', SecurityManager.requestIsAdmin, AdminController.dissconectAllUsers
|
app.post '/admin/dissconectAllUsers', SecurityManager.requestIsAdmin, AdminController.dissconectAllUsers
|
||||||
app.post '/admin/writeAllDocsToMongo', SecurityManager.requestIsAdmin, AdminController.writeAllToMongo
|
app.post '/admin/writeAllDocsToMongo', SecurityManager.requestIsAdmin, AdminController.writeAllToMongo
|
||||||
app.post '/admin/addquote', SecurityManager.requestIsAdmin, AdminController.addQuote
|
|
||||||
app.post '/admin/syncUserToSubscription', SecurityManager.requestIsAdmin, AdminController.syncUserToSubscription
|
app.post '/admin/syncUserToSubscription', SecurityManager.requestIsAdmin, AdminController.syncUserToSubscription
|
||||||
app.post '/admin/flushProjectToTpds', SecurityManager.requestIsAdmin, AdminController.flushProjectToTpds
|
app.post '/admin/flushProjectToTpds', SecurityManager.requestIsAdmin, AdminController.flushProjectToTpds
|
||||||
app.post '/admin/pollUsersWithDropbox', SecurityManager.requestIsAdmin, AdminController.pollUsersWithDropbox
|
app.post '/admin/pollUsersWithDropbox', SecurityManager.requestIsAdmin, AdminController.pollUsersWithDropbox
|
||||||
|
|
62
services/web/app/views/external/style_guide.jade
vendored
Normal file
62
services/web/app/views/external/style_guide.jade
vendored
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
extends ../layout
|
||||||
|
|
||||||
|
block content
|
||||||
|
.content
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-8.col-md-offset-2
|
||||||
|
h1 ShareLaTeX CSS Style Guide
|
||||||
|
|
||||||
|
h2 Headings
|
||||||
|
|
||||||
|
p Here are our heading styles:
|
||||||
|
|
||||||
|
h1 Heading level 1
|
||||||
|
p Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
|
||||||
|
|
||||||
|
h2 Heading level 2
|
||||||
|
p Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
|
||||||
|
|
||||||
|
h3 Heading level 3
|
||||||
|
p Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
|
||||||
|
|
||||||
|
h4 Heading level 4
|
||||||
|
p Lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
|
||||||
|
|
||||||
|
h2 Buttons
|
||||||
|
|
||||||
|
p Our primary button is red:
|
||||||
|
p
|
||||||
|
a.btn.btn-primary(href="#") Primary Button
|
||||||
|
p Our secondary button is blue:
|
||||||
|
p
|
||||||
|
a.btn.btn-info(href="#") Secondary Button
|
||||||
|
p All button styles
|
||||||
|
p
|
||||||
|
.btn-toolbar
|
||||||
|
a.btn.btn-primary(href="#") Primary
|
||||||
|
a.btn.btn-info(href="#") Info (secondary)
|
||||||
|
a.btn.btn-default(href="#") Default
|
||||||
|
a.btn.btn-success(href="#") Success
|
||||||
|
a.btn.btn-warning(href="#") Warning
|
||||||
|
a.btn.btn-danger(href="#") Danger
|
||||||
|
|
||||||
|
h2 Hyperlinks
|
||||||
|
|
||||||
|
p Hyperlinks are highlighted
|
||||||
|
a(href="#") as shown
|
||||||
|
|.
|
||||||
|
|
||||||
|
h2 Alerts
|
||||||
|
|
||||||
|
.alert.alert-danger An <code>.alert-danger</code> alert
|
||||||
|
.alert.alert-success An <code>.alert-success</code> alert
|
||||||
|
.alert.alert-info An <code>.alert-info</code> alert
|
||||||
|
.alert.alert-warning An <code>.alert-warning</code> alert
|
||||||
|
|
||||||
|
.content.content-alt
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-8.col-md-offset-2
|
||||||
|
.card
|
||||||
|
p Cards look best on a <code>.content.content-alt</code> background
|
|
@ -12,12 +12,10 @@ block content
|
||||||
form.validate#loginForm(enctype='multipart/form-data', method='post')
|
form.validate#loginForm(enctype='multipart/form-data', method='post')
|
||||||
input(name='_csrf', type='hidden', value=csrfToken)
|
input(name='_csrf', type='hidden', value=csrfToken)
|
||||||
input(name='redir', type='hidden', value=redir)
|
input(name='redir', type='hidden', value=redir)
|
||||||
.clearfix
|
.form-group
|
||||||
.input
|
input#email.email.required.form-control(type='email', autofocus="autofocus", name='email', placeholder='your@email.com')
|
||||||
input.span4#email.email.required(type='email', autofocus="autofocus", name='email', placeholder='your@email.com')
|
.form-group
|
||||||
.clearfix
|
input#password.required.form-control(type='password', name='password', placeholder='********')
|
||||||
.input
|
|
||||||
input.span4#password.required(type='password', name='password', placeholder='********')
|
|
||||||
.actions
|
.actions
|
||||||
button.btn-primary.btn.btn-large#login(type='submit') Login
|
button.btn-primary.btn#login(type='submit') Login
|
||||||
a#passwordReset(href='/user/passwordreset') Forgot your password?
|
a#passwordReset.pull-right(href='/user/passwordreset') Forgot your password?
|
||||||
|
|
|
@ -1,37 +1,33 @@
|
||||||
extends ../layout
|
extends ../layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.container
|
.content.content-alt
|
||||||
.row
|
.container
|
||||||
.registration_message
|
.row
|
||||||
if sharedProjectData.user_first_name !== undefined
|
.registration_message
|
||||||
h1 #{sharedProjectData.user_first_name} would like you to view '#{sharedProjectData.project_name}'
|
if sharedProjectData.user_first_name !== undefined
|
||||||
div Join ShareLaTeX to view this project
|
h1 #{sharedProjectData.user_first_name} would like you to view '#{sharedProjectData.project_name}'
|
||||||
else if newTemplateData.templateName !== undefined
|
div Join ShareLaTeX to view this project
|
||||||
h1 Please register to edit the '#{newTemplateData.templateName}' template
|
else if newTemplateData.templateName !== undefined
|
||||||
div Already have a ShareLaTeX account?
|
h1 Please register to edit the '#{newTemplateData.templateName}' template
|
||||||
a(href="/login") Login here
|
div Already have a ShareLaTeX account?
|
||||||
|
a(href="/login") Login here
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.span-box.span4.offset4
|
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
|
||||||
.page-header
|
.card
|
||||||
h1 Register
|
.page-header
|
||||||
.messageArea
|
h1 Register
|
||||||
form#registerFormShort(method="post")
|
.messageArea
|
||||||
input(name='_csrf', type='hidden', value=csrfToken)
|
form#registerFormShort(method="post")
|
||||||
input(name='redir', type='hidden', value=redir)
|
input(name='_csrf', type='hidden', value=csrfToken)
|
||||||
.clearfix
|
input(name='redir', type='hidden', value=redir)
|
||||||
label(for='xlInput') Email
|
.form-group
|
||||||
.input
|
label(for='email') Email
|
||||||
input#email.span4.email.required(type='email', name='email', value='#{new_email}')
|
input#email.email.required.form-control(type='email', name='email', value='#{new_email}')
|
||||||
.clearfix
|
.form-group
|
||||||
label(for='xlInput') Password
|
label(for='password') Password
|
||||||
.input
|
input#password.required.form-control(type='password', name='password')
|
||||||
input#password.span4.required(type='password', name='password')
|
.actions
|
||||||
.actions
|
button#registerButton.btn-primary.btn(type='submit') Register
|
||||||
button#registerButton.btn-primary.btn.btn-xlarge(type='submit') Register
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include ../general/small-footer
|
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ require [
|
||||||
|
|
||||||
class Message
|
class Message
|
||||||
constructor: (message)->
|
constructor: (message)->
|
||||||
aClose = $('<a></a>').addClass('close').attr('href','#').text('x')
|
aClose = $('<a></a>').addClass('close').attr('href','#').html('×')
|
||||||
pTitle = $('<strong></strong>').text(message.title)
|
pTitle = $('<strong></strong>').text(message.title)
|
||||||
pText = $('<span></span>').html(' '+message.text)
|
pText = $('<span></span>').html(' '+message.text)
|
||||||
div = $('<div></div>')
|
div = $('<div></div>')
|
||||||
|
@ -209,7 +209,7 @@ require [
|
||||||
.append(pTitle)
|
.append(pTitle)
|
||||||
.append(pText)
|
.append(pText)
|
||||||
if message.type == "error"
|
if message.type == "error"
|
||||||
div.addClass("alert-error")
|
div.addClass("alert-danger")
|
||||||
else
|
else
|
||||||
div.addClass("alert-info")
|
div.addClass("alert-info")
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
.alert {
|
.alert {
|
||||||
padding: @alert-padding;
|
padding: @alert-padding;
|
||||||
margin-bottom: @line-height-computed;
|
margin-bottom: @line-height-computed;
|
||||||
border: 1px solid transparent;
|
border-left: 3px solid transparent;
|
||||||
border-radius: @alert-border-radius;
|
// border-radius: @alert-border-radius;
|
||||||
|
|
||||||
// Headings for larger alerts
|
// Headings for larger alerts
|
||||||
h4 {
|
h4 {
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
padding: @line-height-computed;
|
padding: @line-height-computed;
|
||||||
.page-header {
|
.page-header {
|
||||||
margin: 0 0 1.5625rem;
|
margin: 0 0 1.5625rem;
|
||||||
|
h1 {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
@brand-success: @green;
|
@brand-success: @green;
|
||||||
@brand-info: @blue;
|
@brand-info: @blue;
|
||||||
@brand-warning: @orange;
|
@brand-warning: @orange;
|
||||||
@brand-danger: #d9534f;
|
@brand-danger: #E03A06;
|
||||||
|
|
||||||
//== Scaffolding
|
//== Scaffolding
|
||||||
//
|
//
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
//** Background color for `<body>`.
|
//** Background color for `<body>`.
|
||||||
@body-bg: #fff;
|
@body-bg: #fff;
|
||||||
//** Global text color on `<body>`.
|
//** Global text color on `<body>`.
|
||||||
@text-color: @gray-dark;
|
@text-color: @gray-darker;
|
||||||
|
|
||||||
//** Global textual link color.
|
//** Global textual link color.
|
||||||
@link-color: @brand-primary;
|
@link-color: @brand-primary;
|
||||||
|
@ -59,9 +59,9 @@
|
||||||
@font-size-large: ceil((@font-size-base * 1.25)); // ~18px
|
@font-size-large: ceil((@font-size-base * 1.25)); // ~18px
|
||||||
@font-size-small: ceil((@font-size-base * 0.85)); // ~12px
|
@font-size-small: ceil((@font-size-base * 0.85)); // ~12px
|
||||||
|
|
||||||
@font-size-h1: floor((@font-size-base * 2.6)); // ~36px
|
@font-size-h1: floor((@font-size-base * 2)); // ~36px
|
||||||
@font-size-h2: floor((@font-size-base * 2.15)); // ~30px
|
@font-size-h2: floor((@font-size-base * 1.8)); // ~30px
|
||||||
@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px
|
@font-size-h3: ceil((@font-size-base * 1.6)); // ~24px
|
||||||
@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px
|
@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px
|
||||||
@font-size-h5: @font-size-base;
|
@font-size-h5: @font-size-base;
|
||||||
@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px
|
@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px
|
||||||
|
@ -448,21 +448,21 @@
|
||||||
//
|
//
|
||||||
//## Define colors for form feedback states and, by default, alerts.
|
//## Define colors for form feedback states and, by default, alerts.
|
||||||
|
|
||||||
@state-success-text: #3c763d;
|
@state-success-text: darken(@brand-success, 20%);
|
||||||
@state-success-bg: #dff0d8;
|
@state-success-bg: lighten(@brand-success, 50%);
|
||||||
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
|
@state-success-border: darken(@brand-success, 5%);
|
||||||
|
|
||||||
@state-info-text: #31708f;
|
@state-info-text: darken(@brand-info, 20%);
|
||||||
@state-info-bg: #d9edf7;
|
@state-info-bg: lighten(@brand-info, 47%);
|
||||||
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
|
@state-info-border: darken(@brand-info, 7%);
|
||||||
|
|
||||||
@state-warning-text: #8a6d3b;
|
@state-warning-text: darken(@brand-warning, 10%);
|
||||||
@state-warning-bg: #fcf8e3;
|
@state-warning-bg: lighten(@brand-warning, 45%);
|
||||||
@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);
|
@state-warning-border: @brand-warning;
|
||||||
|
|
||||||
@state-danger-text: #a94442;
|
@state-danger-text: darken(@brand-danger, 10%);
|
||||||
@state-danger-bg: #f2dede;
|
@state-danger-bg: lighten(@brand-danger, 50%);
|
||||||
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
|
@state-danger-border: darken(@brand-danger, 5%);
|
||||||
|
|
||||||
|
|
||||||
//== Tooltips
|
//== Tooltips
|
||||||
|
|
Loading…
Reference in a new issue