From c6622bff46f491cb251c0d777920fb62b3cda6ed Mon Sep 17 00:00:00 2001 From: amodolo Date: Thu, 19 Jul 2018 11:10:54 +0200 Subject: [PATCH] porting bootstrap 4 --- src/public/css/main.scss | 2 -- views/account/profile.pug | 20 ++++++++++---------- views/account/reset.pug | 7 ++++--- views/partials/footer.pug | 2 +- views/partials/header.pug | 10 +++++----- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/public/css/main.scss b/src/public/css/main.scss index 3fc220f..8902da9 100644 --- a/src/public/css/main.scss +++ b/src/public/css/main.scss @@ -22,8 +22,6 @@ footer { position: absolute; bottom: 0; width: 100%; - height: 45px; - line-height: 45px; p, ul { margin-bottom: 0; diff --git a/views/account/profile.pug b/views/account/profile.pug index caaabf9..56cf2d3 100644 --- a/views/account/profile.pug +++ b/views/account/profile.pug @@ -15,18 +15,18 @@ block content label.col-sm-3.col-form-label.text-right.font-weight-bold(for='name') Name .col-sm-7 input.form-control(type='text', name='name', id='name', value=user.profile.name) - .form-group.row.justify-content-md-center + .form-group.row.justify-content-md-center.align-items-center label.col-sm-3.col-form-label.text-right.font-weight-bold Gender .col-sm-7 - label.radio.col-sm-3 - input(type='radio', checked=user.profile.gender=='male', name='gender', value='male', data-toggle='radio') - span Male - label.radio.col-sm-3 - input(type='radio', checked=user.profile.gender=='female', name='gender', value='female', data-toggle='radio') - span Female - label.radio.col-sm-3 - input(type='radio', checked=user.profile.gender=='other', name='gender', value='other', data-toggle='radio') - span Other + .form-check.form-check-inline + input#option-male.form-check-input(type='radio', checked=user.profile.gender==='male', name='gender', value='male', data-toggle='radio') + label.form-check-label(for="option-male") Male + .form-check.form-check-inline + input#option-female.form-check-input(type='radio', checked=user.profile.gender==='female', name='gender', value='female', data-toggle='radio') + label.form-check-label(for="option-female") Female + .form-check.form-check-inline + input#option-other.form-check-input(type='radio', checked=user.profile.gender==='other', name='gender', value='other', data-toggle='radio') + label.form-check-label(for="option-other") Other .form-group.row.justify-content-md-center label.col-sm-3.col-form-label.text-right.font-weight-bold(for='location') Location .col-sm-7 diff --git a/views/account/reset.pug b/views/account/reset.pug index 9461475..6b8f9e4 100644 --- a/views/account/reset.pug +++ b/views/account/reset.pug @@ -1,15 +1,16 @@ extends ../layout block content - .col-sm-8.col-sm-offset-2 + .col-sm-8.offset-sm-2 form(method='POST') legend Reset Password + hr input(type='hidden', name='_csrf', value=_csrf) .form-group - label(for='password') New Password + label.col-form-label.font-weight-bold(for='password') New Password input.form-control(type='password', name='password', id='password', placeholder='New password', autofocus, required) .form-group - label(for='confirm') Confirm Password + label.col-form-label.font-weight-bold(for='confirm') Confirm Password input.form-control(type='password', name='confirm', id='confirm', placeholder='Confirm password', required) .form-group button.btn.btn-primary.btn-reset(type='submit') diff --git a/views/partials/footer.pug b/views/partials/footer.pug index 8dba91e..c319e3b 100644 --- a/views/partials/footer.pug +++ b/views/partials/footer.pug @@ -1,4 +1,4 @@ footer .container.text-center p.pull-left © 2018 Company, Inc. All Rights Reserved - a.github-button.pull-right(href="https://github.com/microsoft/typescript-node-starter", data-icon="octicon-star", data-show-count="true", aria-label="Star microsoft/typescript-node-starter on GitHub") Star + a.github-button.float-right(href="https://github.com/microsoft/typescript-node-starter", data-icon="octicon-star", data-show-count="true", aria-label="Star microsoft/typescript-node-starter on GitHub") Star diff --git a/views/partials/header.pug b/views/partials/header.pug index 8096ead..d9306d0 100644 --- a/views/partials/header.pug +++ b/views/partials/header.pug @@ -1,10 +1,10 @@ nav.navbar.navbar-expand-lg.navbar-light.bg-light.fixed-top .container - button.navbar-toggler(type='button', data-toggle='collapse', data-target='.navbar-collapse') - span.navbar-toggler-icon a.navbar-brand(href='/') i.fa.fa-cube | Project name + button.navbar-toggler(type='button', data-toggle='collapse', data-target='.navbar-collapse') + span.navbar-toggler-icon .collapse.navbar-collapse ul.nav.navbar-nav.mr-auto @@ -16,12 +16,12 @@ nav.navbar.navbar-expand-lg.navbar-light.bg-light.fixed-top a.nav-link(href='/contact') Contact ul.nav.navbar-nav if !user - li.nav-item(class=(title == 'Login') ? 'active' : undefined) + li.nav-item(class=(title === 'Login') ? 'active' : undefined) a.nav-link(href='/login') Login - li.nav-item(class=(title == 'Create Account') ? 'active' : undefined) + li.nav-item(class=(title === 'Create Account') ? 'active' : undefined) a.nav-link(href='/signup') Create Account else - li.nav-item.dropdown(class=(title == 'Account Management') ? 'active' : undefined) + li.nav-item.dropdown(class=(title === 'Account Management') ? 'active' : undefined) a.nav-link.dropdown-toggle(href='#', data-toggle='dropdown') if user.profile.picture img(src=user.profile.picture, alt=(user.profile.name || user.email || user.id))