From d45990330fbc14ad0863b91130dc650ec7a36474 Mon Sep 17 00:00:00 2001 From: Pete Nawara Date: Thu, 19 Jun 2014 14:12:28 -0500 Subject: [PATCH] Added some basic styling to views --- public/images/anvil.svg | 43 ++++++ public/stylesheets/app.css | 268 +++++++++++++++++++++++++++++++++++++ views/authorize.jade | 97 ++++++++------ views/signin.jade | 59 +++++--- views/signup.jade | 60 +++++---- 5 files changed, 444 insertions(+), 83 deletions(-) create mode 100644 public/images/anvil.svg create mode 100644 public/stylesheets/app.css diff --git a/public/images/anvil.svg b/public/images/anvil.svg new file mode 100644 index 00000000..1a434045 --- /dev/null +++ b/public/images/anvil.svg @@ -0,0 +1,43 @@ + + + + + + + + + + diff --git a/public/stylesheets/app.css b/public/stylesheets/app.css new file mode 100644 index 00000000..7d8f783c --- /dev/null +++ b/public/stylesheets/app.css @@ -0,0 +1,268 @@ +body { + background: #fafafa; + font-family: 'Roboto', sans-serif; +} + +* { + box-sizing: border-box; +} + +:hover { + transition: .3s background; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Raleway', sans-serif; + text-transform: uppercase; + font-weight: 300; +} + +a { + text-decoration: none; + color: #00a35f; +} + +.logomark { + width: 140px; + background-origin: content-box; + margin: 0 auto; + display: block; +} + +.logotype { + font-family: 'Playfair Display', sans-serif; + font-weight: 800; + font-size: 72px; + color: #00d97f; + width: 100%; + margin: -.2em auto 30px; +} + +.thin { + font-weight: 100; + display: block; + font-size: 18px; + color: #000; + letter-spacing: 1.3em; + margin-right: -1.3em; + line-height: 0em; +} + +.anvilform { + width: 500px; + margin: 0 auto; + margin-top: 60px; + min-height: 200px; + position: relative; +} + +.anvilform h1 { + text-align: center; +} + +.anvilform .textsep { + color: #999; + border: solid 1px #ccc; + text-align: center; + position: relative; + height: 0px; + border-width: 1px 0 0; +} + +.anvilform .textsep:before { + content: ''; + display: inline-block; + position: relative; + top: -14px; + padding: 0 10px; + background: #fff; + color: #8c8b8b; + font-size: 16px; + font-style: italic; +} + +.anvilform .textsep.signinwith:before { + content: 'sign in with'; +} + +.anvilform .textsep.signupwith:before { + content: 'sign up with'; +} + +.anvilform .textsep.or:before { + content: 'or'; +} + +.anvilform .panel { + background: #ffffff; + border: 1px solid #ccc; + padding: 30px; + width: 400px; + margin: 0 auto; + position: relative; +} + +.anvilform .error { + background: #f15a24; + color: #fff; + padding: 10px; + position: relative; + top: -16px; +} + +.anvilform .panel .providers { + padding: 0px; + list-style-type: none; +} + +.anvilform form input[type="text"], .anvilform form input[type="password"] { + background: #fafafa; + border: 1px solid #ccc; + height: 65px; + display: block; + padding: 20px; + width: 100%; + margin: 10px 0 0; + font-size: 18px; +} + +.singlebutton { + display: inline-block; + margin-right: 2px; +} + +.singlebutton.cancel { + margin-right: 0; +} + +.anvilform button { + height: 65px; + margin: 10px 2px 0 0; + border: 0px solid #ccc; + background: #ccc; + cursor: pointer; + font-size: 24px; + text-transform: uppercase; + font-family: 'Raleway', sans-serif; + text-decoration: none; + font-weight: 100; + padding: 20px; + width: 168px; + transition: .3s background; + -webkit-user-select: none; + /* Chrome all / Safari all */ + -moz-user-select: none; + /* Firefox all */ + -ms-user-select: none; + /* IE 10+ */ + -o-user-select: none; + user-select: none; +} + +.anvilform button:hover { + background: #aaa; +} + +.anvilform button.callout { + background: #21d782; + font-weight: 400; + color: #fff; +} + +.anvilform button.full { + width: 100%; +} + +.anvilform button.smalltext { + font-size: 12px; + position: relative; + top: -7px; +} + +.anvilform button.callout:hover { + background: #4ddf9b; +} + +.anvilform button:last-child { + margin-right: 0px; +} + +.anvilform button a { + text-decoration: none; + color: #000; + font-weight: 100; +} + +.providers li { + display: inline-block; + margin: 0 2px 4px; + height: 63px; + width: 63px; +} + +.provider { + background: #aaa; + color: #fff; + display: inline-block; + padding: 15px; + height: 100%; + width: 100%; + text-align: center; + transition: .3s background; +} + +.provider.google { + background: #dd4b39; +} + +.provider.google:hover { + background: #a6382b; +} + +.provider.facebook { + background: #3b5998; +} + +.provider.facebook:hover { + background: #2c4372; +} + +.provider.twitter { + background: #55acee; +} + +.provider.twitter:hover { + background: #4993CC; +} + +.provider.github, .provider.codepen { + background: #000; +} + +.provider.github:hover, .provider.codepen:hover { + background: #333; +} + +.provider.dribbble { + background: #ea4c89; +} + +.provider.dribbble:hover { + background: #c06185; +} + +.provider.instagram { + background: #517fa4; +} + +.provider.instagram:hover { + background: #24557b; +} + +.provider.wordpress { + background: #21759b; +} + +.provider.wordpress:hover { + background: #195874; +} \ No newline at end of file diff --git a/views/authorize.jade b/views/authorize.jade index 3649be15..30f0defc 100644 --- a/views/authorize.jade +++ b/views/authorize.jade @@ -1,40 +1,57 @@ -h1 Authorize - - -p= user.name || user.email - -if client.logo_uri - img(src=client.logo_uri) - -h3= client.client_name || client._id - -p This app would like to: - -ul - each scope in scopes - li= scope.description - -form(action='/authorize', method='POST') - input(type='hidden', name='response_type', value=request.response_type) - input(type='hidden', name='client_id', value=request.client_id) - input(type='hidden', name='redirect_uri', value=request.redirect_uri) - input(type='hidden', name='scope', value=request.scope) - input(type='hidden', name='nonce', value=request.nonce) - input(type='hidden', name='state', value=request.state) - input(type='hidden', name='authorize', value='true') - input(type='submit', value='Accept') - - -form(action='/authorize', method='POST') - input(type='hidden', name='response_type', value=request.response_type) - input(type='hidden', name='client_id', value=request.client_id) - input(type='hidden', name='redirect_uri', value=request.redirect_uri) - input(type='hidden', name='scope', value=request.scope) - input(type='hidden', name='nonce', value=request.nonce) - input(type='hidden', name='state', value=request.state) - input(type='hidden', name='authorize', value='false') - input(type='submit', value='Cancel') - - -p= 'Not ' + user.email + '? ' - a(href='/signout') Signout +html(lang="en") + head + title + | Sign in to Anvil Connect + + link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css') + link(rel='stylesheet', href='/stylesheets/app.css') + link(rel='stylesheet', href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,400italic,700,700italic|Raleway:400,100,600,300') + body + + .anvilform + img.logomark(src='/images/anvil.svg') + h1.logotype Anvil + span.thin Connect + .panel + h2 + | Hello + = user.name || user.email + | , + + //- if client.logo_uri + //- img(src=client.logo_uri) + + //- h3= client.client_name || client._id + + p This app would like to: + + ul + each scope in scopes + li= scope.description + + form.singlebutton(action='/authorize', method='POST') + input(type='hidden', name='response_type', value=request.response_type) + input(type='hidden', name='client_id', value=request.client_id) + input(type='hidden', name='redirect_uri', value=request.redirect_uri) + input(type='hidden', name='scope', value=request.scope) + input(type='hidden', name='nonce', value=request.nonce) + input(type='hidden', name='state', value=request.state) + input(type='hidden', name='authorize', value='true') + button.callout(type='submit', value='Accept') + | Accept + + + form.singlebutton.cancel(action='/authorize', method='POST') + input(type='hidden', name='response_type', value=request.response_type) + input(type='hidden', name='client_id', value=request.client_id) + input(type='hidden', name='redirect_uri', value=request.redirect_uri) + input(type='hidden', name='scope', value=request.scope) + input(type='hidden', name='nonce', value=request.nonce) + input(type='hidden', name='state', value=request.state) + input(type='hidden', name='authorize', value='false') + button(type='submit', value='Cancel') + | Cancel + + + p= 'Not ' + user.email + '? ' + a(href='/signout') Signout diff --git a/views/signin.jade b/views/signin.jade index 0661b518..614d6df8 100644 --- a/views/signin.jade +++ b/views/signin.jade @@ -1,25 +1,44 @@ -h1 Sign In +doctype html +html(lang="en") + head + title + | Sign in to Anvil Connect + + link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css') + link(rel='stylesheet', href='/stylesheets/app.css') + link(rel='stylesheet', href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,400italic,700,700italic|Raleway:400,100,600,300') + body -ul - each provider in Object.keys(providers) - li - a(href='/connect/' + provider + '?' + params)= provider + .anvilform + img.logomark(src='/images/anvil.svg') + h1.logotype Anvil + span.thin Connect + form.panel(method='POST', action='/signin') + // adding a class of error to this paragraph will add error styling + p= error + input(type='hidden', name='response_type', value=request.response_type) + input(type='hidden', name='client_id', value=request.client_id) + input(type='hidden', name='redirect_uri', value=request.redirect_uri) + input(type='hidden', name='scope', value=request.scope) + input(type='hidden', name='state', value=request.state) + hr.textsep.signinwith + ul.providers + each provider in Object.keys(providers) + li + a(href='/connect/' + provider + '?' + params) + i(class='provider fa-2x fa fa-' + provider + ' ' + provider) + hr.textsep.or + input(type='text', name='email', placeholder='Email') + input(type='password', name='password', placeholder='Password') + button.callout.full(type='submit', value='Sign in') + | Sign in + p + | Don't have an account? + a(href='/signup?' + params) + | Get Registered in Seconds -form(method='POST', action='/signin') - p= error - input(type='hidden', name='response_type', value=request.response_type) - input(type='hidden', name='client_id', value=request.client_id) - input(type='hidden', name='redirect_uri', value=request.redirect_uri) - input(type='hidden', name='scope', value=request.scope) - input(type='hidden', name='state', value=request.state) + - input(type='text', name='email', placeholder='Email') - br - input(type='password', name='password', placeholder='Password') - br - input(type='submit', value='Sign in') - -p= 'New here? ' - a(href='/signup?' + params) Create a new account. + diff --git a/views/signup.jade b/views/signup.jade index 3e78d2f2..b7d4eef1 100644 --- a/views/signup.jade +++ b/views/signup.jade @@ -1,26 +1,40 @@ -h1 Sign up +doctype html +html(lang="en") + head + title + | Sign in to Anvil Connect + + link(rel='stylesheet', href='//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css') + link(rel='stylesheet', href='/stylesheets/app.css') + link(rel='stylesheet', href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,400italic,700,700italic|Raleway:400,100,600,300|Playfair+Display+SC:900,400') + body -ul - each provider in Object.keys(providers) - li - a(href='/connect/' + provider + '?' + params)= provider + .anvilform + img.logomark(src='/images/anvil.svg') + h1.logotype Anvil + span.thin Connect + form.panel(method='POST', action='/signup') + p= error + input(type='hidden', name='response_type', value=request.response_type) + input(type='hidden', name='client_id', value=request.client_id) + input(type='hidden', name='redirect_uri', value=request.redirect_uri) + input(type='hidden', name='scope', value=request.scope) + input(type='hidden', name='state', value=request.state) + hr.textsep.signupwith + ul.providers + each provider in Object.keys(providers) + li + a(href='/connect/' + provider + '?' + params) + i(class='provider fa-2x fa fa-' + provider + ' ' + provider) + hr.textsep.or + input(type='text', name='firstname', placeholder='First Name') + input(type='text', name='lastname', placeholder='Last Name') + input(type='text', name='email', placeholder='Email') + input(type='password', name='password', placeholder='Password') + button.callout.full(type='submit', value='Sign up') + | Sign up -form(method='POST', action='/signup') - p= error - input(type='hidden', name='response_type', value=request.response_type) - input(type='hidden', name='client_id', value=request.client_id) - input(type='hidden', name='redirect_uri', value=request.redirect_uri) - input(type='hidden', name='scope', value=request.scope) - input(type='hidden', name='state', value=request.state) - - input(type='text', name='name', placeholder='Name') - br - input(type='text', name='email', placeholder='Email') - br - input(type='password', name='password', placeholder='Password') - br - input(type='submit', value='Sign up') - -p= 'Already have an account? ' - a(href='/signin?' + params) Sign in. + p + | Already have an account? + a(href='/signin?' + params) Sign in here