Split the view into partials
This commit is contained in:
@ -19,56 +19,8 @@ html
|
|||||||
script(src='/js/main.js?v=#{cacheBuster}')
|
script(src='/js/main.js?v=#{cacheBuster}')
|
||||||
body
|
body
|
||||||
#wrap
|
#wrap
|
||||||
.navbar.navbar-default.navbar-fixed-top
|
include partials/navigation
|
||||||
.container
|
|
||||||
.navbar-header
|
|
||||||
button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
|
|
||||||
span.sr-only Toggle navigation
|
|
||||||
span.icon-bar
|
|
||||||
span.icon-bar
|
|
||||||
span.icon-bar
|
|
||||||
a.navbar-brand(href='/') Project name
|
|
||||||
.collapse.navbar-collapse
|
|
||||||
ul.nav.navbar-nav
|
|
||||||
li(class=title=='Home'?'active':undefined)
|
|
||||||
a(href='/') Home
|
|
||||||
li(class=title=='API Browser'?'active':undefined)
|
|
||||||
a(href='/api') API Browser
|
|
||||||
li(class=title=='Contact'?'active':undefined)
|
|
||||||
a(href='/contact') Contact
|
|
||||||
ul.nav.navbar-nav.navbar-right
|
|
||||||
if !user
|
|
||||||
li(class=title=='Login'?'active':undefined)
|
|
||||||
a(href='/login') Login
|
|
||||||
li(class=title=='Create Account'?'active':undefined)
|
|
||||||
a(href='/signup') Create Account
|
|
||||||
else
|
|
||||||
li.dropdown(class=title=='Account Management'?'active':undefined)
|
|
||||||
a.dropdown-toggle(href='#', data-toggle='dropdown')
|
|
||||||
if user.profile.picture
|
|
||||||
img(src='#{user.profile.picture}')
|
|
||||||
| #{user.profile.name || user.id}
|
|
||||||
i.caret
|
|
||||||
ul.dropdown-menu
|
|
||||||
li: a(href='/account') My Account
|
|
||||||
li.divider
|
|
||||||
li: a(href='/logout') Logout
|
|
||||||
.container
|
.container
|
||||||
|
include partials/flash
|
||||||
block content
|
block content
|
||||||
#footer
|
include partials/footer
|
||||||
.container.text-center
|
|
||||||
div
|
|
||||||
| © 2014 Company, Inc.
|
|
||||||
div
|
|
||||||
strong Hackathon Starter
|
|
||||||
| Project
|
|
||||||
| ·
|
|
||||||
| Created by
|
|
||||||
a(href='http://sahatyalkabov.com') Sahat Yalkabov
|
|
||||||
div
|
|
||||||
| Code licensed under
|
|
||||||
a(href='http://opensource.org/licenses/mit-license.html') MIT License
|
|
||||||
div
|
|
||||||
a(href='https://github.com/sahat/hackathon-starter') GitHub Project
|
|
||||||
| ·
|
|
||||||
a(href='https://github.com/sahat/hackathon-starter/issues') Issues
|
|
||||||
|
13
views/partials/flash.jade
Normal file
13
views/partials/flash.jade
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#flash
|
||||||
|
if messages.errors
|
||||||
|
.alert.alert-danger.animated.fadeIn
|
||||||
|
for error in messages.errors
|
||||||
|
div= error.msg
|
||||||
|
if messages.info
|
||||||
|
.alert.alert-info.animated.fadeIn
|
||||||
|
for info in messages.info
|
||||||
|
div= info.msg
|
||||||
|
if messages.success
|
||||||
|
.alert.alert-success.animated.fadeIn
|
||||||
|
for success in messages.success
|
||||||
|
div= success.msg
|
17
views/partials/footer.jade
Normal file
17
views/partials/footer.jade
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#footer
|
||||||
|
.container.text-center
|
||||||
|
div
|
||||||
|
| © 2014 Company, Inc.
|
||||||
|
div
|
||||||
|
strong Hackathon Starter
|
||||||
|
| Project
|
||||||
|
| ·
|
||||||
|
| Created by
|
||||||
|
a(href='http://sahatyalkabov.com') Sahat Yalkabov
|
||||||
|
div
|
||||||
|
| Code licensed under
|
||||||
|
a(href='http://opensource.org/licenses/mit-license.html') MIT License
|
||||||
|
div
|
||||||
|
a(href='https://github.com/sahat/hackathon-starter') GitHub Project
|
||||||
|
| ·
|
||||||
|
a(href='https://github.com/sahat/hackathon-starter/issues') Issues
|
34
views/partials/navigation.jade
Normal file
34
views/partials/navigation.jade
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
.navbar.navbar-default.navbar-fixed-top
|
||||||
|
.container
|
||||||
|
.navbar-header
|
||||||
|
button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
|
||||||
|
span.sr-only Toggle navigation
|
||||||
|
span.icon-bar
|
||||||
|
span.icon-bar
|
||||||
|
span.icon-bar
|
||||||
|
a.navbar-brand(href='/') Project name
|
||||||
|
.collapse.navbar-collapse
|
||||||
|
ul.nav.navbar-nav
|
||||||
|
li(class=title=='Home'?'active':undefined)
|
||||||
|
a(href='/') Home
|
||||||
|
li(class=title=='API Browser'?'active':undefined)
|
||||||
|
a(href='/api') API Browser
|
||||||
|
li(class=title=='Contact'?'active':undefined)
|
||||||
|
a(href='/contact') Contact
|
||||||
|
ul.nav.navbar-nav.navbar-right
|
||||||
|
if !user
|
||||||
|
li(class=title=='Login'?'active':undefined)
|
||||||
|
a(href='/login') Login
|
||||||
|
li(class=title=='Create Account'?'active':undefined)
|
||||||
|
a(href='/signup') Create Account
|
||||||
|
else
|
||||||
|
li.dropdown(class=title=='Account Management'?'active':undefined)
|
||||||
|
a.dropdown-toggle(href='#', data-toggle='dropdown')
|
||||||
|
if user.profile.picture
|
||||||
|
img(src='#{user.profile.picture}')
|
||||||
|
| #{user.profile.name || user.id}
|
||||||
|
i.caret
|
||||||
|
ul.dropdown-menu
|
||||||
|
li: a(href='/account') My Account
|
||||||
|
li.divider
|
||||||
|
li: a(href='/logout') Logout
|
Reference in New Issue
Block a user