Added contributor categories to user profile page
This commit is contained in:
parent
ebdbc0f891
commit
411bb87985
8 changed files with 112 additions and 34 deletions
app
models
styles
templates
|
@ -57,9 +57,8 @@ module.exports = class SuperModel extends Backbone.Model
|
||||||
res.markLoading()
|
res.markLoading()
|
||||||
return res
|
return res
|
||||||
else
|
else
|
||||||
console.debug 'adding collection', collection
|
|
||||||
@addCollection collection
|
@addCollection collection
|
||||||
@listenTo collection, 'sync', (c) ->
|
@listenToOnce collection, 'sync', (c) ->
|
||||||
console.debug 'Registering collection', url
|
console.debug 'Registering collection', url
|
||||||
@registerCollection c
|
@registerCollection c
|
||||||
res = @addModelResource(collection, name, fetchOptions, value)
|
res = @addModelResource(collection, name, fetchOptions, value)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
@import "../bootstrap/variables"
|
||||||
|
@import "../bootstrap/mixins"
|
||||||
|
|
||||||
#account-home-view
|
#account-home-view
|
||||||
dl
|
dl
|
||||||
margin-bottom: 0px
|
margin-bottom: 0px
|
||||||
|
@ -10,3 +13,6 @@
|
||||||
|
|
||||||
h2
|
h2
|
||||||
margin-bottom: 0px
|
margin-bottom: 0px
|
||||||
|
|
||||||
|
.panel-title > a
|
||||||
|
margin-left: 5px
|
||||||
|
|
|
@ -21,7 +21,8 @@ h1 h2 h3 h4
|
||||||
margin: 56px auto 0
|
margin: 56px auto 0
|
||||||
min-height: 600px
|
min-height: 600px
|
||||||
padding: 14px 12px 5px 12px
|
padding: 14px 12px 5px 12px
|
||||||
@include box-sizing(border-box)
|
+box-sizing(border-box)
|
||||||
|
+clearfix()
|
||||||
|
|
||||||
#outer-content-wrapper
|
#outer-content-wrapper
|
||||||
background: #B4B4B4
|
background: #B4B4B4
|
||||||
|
|
|
@ -73,29 +73,33 @@ a.disabled
|
||||||
border-radius: 0px
|
border-radius: 0px
|
||||||
font-family: Bangers
|
font-family: Bangers
|
||||||
|
|
||||||
li.user-dropdown-header
|
.user-dropdown-header
|
||||||
background: #E4CF8C
|
background: #E4CF8C
|
||||||
height: 160px
|
height: 160px
|
||||||
padding: 10px
|
padding: 10px
|
||||||
text-align: center
|
text-align: center
|
||||||
color: black
|
color: black
|
||||||
border-bottom: #32281e 1px solid
|
border-bottom: #32281e 1px solid
|
||||||
|
a:hover
|
||||||
|
background-color: transparent
|
||||||
img
|
img
|
||||||
border: #e3be7a 8px solid
|
border: #e3be7a 8px solid
|
||||||
height: 98px // Includes the border
|
height: 98px // Includes the border
|
||||||
h3
|
&:hover
|
||||||
|
box-shadow: 0 0 20px #e3be7a
|
||||||
|
> h3
|
||||||
margin-top: 10px
|
margin-top: 10px
|
||||||
text-shadow: 2px 2px 3px white
|
text-shadow: 2px 2px 3px white
|
||||||
color: #31281E
|
color: #31281E
|
||||||
|
|
||||||
li.user-dropdown-body
|
.user-dropdown-body
|
||||||
color: black
|
color: black
|
||||||
padding: 15px
|
padding: 15px
|
||||||
letter-spacing: 1px
|
letter-spacing: 1px
|
||||||
font: 15px 'Helvetica Neue', Helvetica, Arial, sans-serif
|
font: 15px 'Helvetica Neue', Helvetica, Arial, sans-serif
|
||||||
+clearfix()
|
+clearfix()
|
||||||
|
|
||||||
li.user-dropdown-footer
|
.user-dropdown-footer
|
||||||
padding: 10px
|
padding: 10px
|
||||||
margin-left: 0px
|
margin-left: 0px
|
||||||
font-size: 14px
|
font-size: 14px
|
||||||
|
|
|
@ -27,3 +27,28 @@
|
||||||
color: white
|
color: white
|
||||||
text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 1px 1px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000
|
text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 1px 1px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000
|
||||||
|
|
||||||
|
.list-group-item > a
|
||||||
|
color: #555555
|
||||||
|
margin-left: 5px
|
||||||
|
|
||||||
|
.contributor-categories
|
||||||
|
list-style: none
|
||||||
|
padding: 0px
|
||||||
|
|
||||||
|
> .contributor-category
|
||||||
|
outline: 1px solid black
|
||||||
|
margin-bottom: 15px
|
||||||
|
|
||||||
|
> .contributor-image
|
||||||
|
border: none
|
||||||
|
width: 100%
|
||||||
|
border-bottom: 1px solid black
|
||||||
|
|
||||||
|
> .contributor-title
|
||||||
|
text-align: center
|
||||||
|
padding: 5px 0px
|
||||||
|
margin: 0px
|
||||||
|
background: white
|
||||||
|
|
||||||
|
.vertical-buffer
|
||||||
|
padding: 10px 0px
|
||||||
|
|
|
@ -7,6 +7,7 @@ block content
|
||||||
hr
|
hr
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
|
i.glyphicon.glyphicon-user.pull-left
|
||||||
h3.panel-title
|
h3.panel-title
|
||||||
a(href="account/settings#me") Me
|
a(href="account/settings#me") Me
|
||||||
.panel-body
|
.panel-body
|
||||||
|
@ -17,18 +18,21 @@ block content
|
||||||
dd abe@lincoln
|
dd abe@lincoln
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
|
i.glyphicon.glyphicon-picture.pull-left
|
||||||
h3.panel-title
|
h3.panel-title
|
||||||
a(href="account/settings#picture") Picture
|
a(href="account/settings#picture") Picture
|
||||||
.panel-body.text-center
|
.panel-body.text-center
|
||||||
img#picture(src="#{me.getPhotoURL(150)}" alt="")
|
img#picture(src="#{me.getPhotoURL(150)}" alt="")
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
|
i.glyphicon.glyphicon-user.pull-left
|
||||||
h3.panel-title
|
h3.panel-title
|
||||||
a(href="account/settings#wizard") Wizard
|
a(href="account/settings#wizard") Wizard
|
||||||
//.panel-body
|
//.panel-body
|
||||||
| Lorem Ipsum
|
| Lorem Ipsum
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
|
i.glyphicon.glyphicon-envelope.pull-left
|
||||||
h3.panel-title
|
h3.panel-title
|
||||||
a(href="account/settings#emails") Emails
|
a(href="account/settings#emails") Emails
|
||||||
.panel-body
|
.panel-body
|
||||||
|
@ -82,10 +86,12 @@ block content
|
||||||
|
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
|
i.glyphicon.glyphicon-wrench.pull-left
|
||||||
h3.panel-title
|
h3.panel-title
|
||||||
a(href="account/settings#password") Password
|
a(href="account/settings#password") Password
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
|
i.glyphicon.glyphicon-briefcase.pull-left
|
||||||
h3.panel-title
|
h3.panel-title
|
||||||
a(href="account/settings#job-profile") Job Profile
|
a(href="account/settings#job-profile") Job Profile
|
||||||
.col-sm-6
|
.col-sm-6
|
||||||
|
|
|
@ -27,14 +27,6 @@ body
|
||||||
|
|
||||||
select.language-dropdown
|
select.language-dropdown
|
||||||
|
|
||||||
//button.btn.btn-primary.navbuttontext.header-font#logout-button(data-i18n="login.log_out") Log Out
|
|
||||||
//a.btn.btn-primary.navbuttontext.header-font(href=me.get('jobProfile') ? "/account/profile/#{me.id}" : "/account/settings")
|
|
||||||
div.navbuttontext-account(data-i18n="nav.account") Account
|
|
||||||
if me.get('photoURL')
|
|
||||||
img.account-settings-image(src=me.getPhotoURL(18), alt="")
|
|
||||||
else
|
|
||||||
span.glyphicon.glyphicon-user
|
|
||||||
|
|
||||||
ul(class='navbar-link-text').nav.navbar-nav.pull-right
|
ul(class='navbar-link-text').nav.navbar-nav.pull-right
|
||||||
li.play
|
li.play
|
||||||
a.header-font(href='/play', data-i18n="nav.play") Levels
|
a.header-font(href='/play', data-i18n="nav.play") Levels
|
||||||
|
@ -51,11 +43,12 @@ body
|
||||||
span.caret
|
span.caret
|
||||||
ul.dropdown-menu(role="menu")
|
ul.dropdown-menu(role="menu")
|
||||||
li.user-dropdown-header
|
li.user-dropdown-header
|
||||||
img.img-circle(src="#{me.getPhotoURL()}" alt="")
|
a(href="/user/#{me.get('slug') || me.get('_id')}")
|
||||||
|
img.img-circle(src="#{me.getPhotoURL()}" alt="")
|
||||||
h3=me.get('name') || 'Anoner'
|
h3=me.get('name') || 'Anoner'
|
||||||
li.user-dropdown-body
|
li.user-dropdown-body
|
||||||
.col-xs-4.text-center
|
.col-xs-4.text-center
|
||||||
a(href="#") Profile
|
a(href="/user/#{me.get('slug') || me.get('_id')}") Profile
|
||||||
.col-xs-4.text-center
|
.col-xs-4.text-center
|
||||||
a(href="#") Stats
|
a(href="#") Stats
|
||||||
.col-xs-4.text-center
|
.col-xs-4.text-center
|
||||||
|
|
|
@ -2,20 +2,64 @@ extends /templates/kinds/user
|
||||||
|
|
||||||
block append content
|
block append content
|
||||||
if user
|
if user
|
||||||
.left-column
|
.vertical-buffer
|
||||||
.picture-wrapper
|
.row
|
||||||
img.picture(src="#{me.getPhotoURL(150)}" alt="")
|
.left-column
|
||||||
h3.name= user.get('name')
|
.picture-wrapper
|
||||||
.right-column
|
img.picture(src="#{me.getPhotoURL(150)}" alt="")
|
||||||
.panel.panel-default
|
h3.name= user.get('name')
|
||||||
.panel-heading
|
hr
|
||||||
h3.panel-title Achievements
|
ul.list-group
|
||||||
.panel-body
|
li.list-group-item
|
||||||
.panel.panel-default
|
i.glyphicon.glyphicon-briefcase
|
||||||
.panel-heading
|
a(href="profile") Job Profile
|
||||||
h3.panel-title S. Levels
|
li.list-group-item
|
||||||
.panel-body
|
i.glyphicon.glyphicon-pencil
|
||||||
.panel.panel-default
|
a(href="") Code
|
||||||
.panel-heading
|
- var emails = user.get('emails')
|
||||||
h3.panel-title M. Levels
|
if emails
|
||||||
.panel-body
|
hr
|
||||||
|
ul.contributor-categories
|
||||||
|
//li.contributor-category
|
||||||
|
img.contributor-image(src="/images/pages/user/general.png")
|
||||||
|
h4.contributor-title CodeCombateer
|
||||||
|
if emails.adventurerNews
|
||||||
|
li.contributor-category
|
||||||
|
img.contributor-image(src="/images/pages/user/adventurer.png")
|
||||||
|
h4.contributor-title
|
||||||
|
a(href="/contribute#adventurer") Adventurer
|
||||||
|
if emails.ambassadorNews
|
||||||
|
li.contributor-category
|
||||||
|
img.contributor-image(src="/images/pages/user/ambassador.png")
|
||||||
|
h4.contributor-title
|
||||||
|
a(href="/contribute#ambassador") Ambassador
|
||||||
|
if emails.archmageNews
|
||||||
|
li.contributor-category
|
||||||
|
img.contributor-image(src="/images/pages/user/archmage.png")
|
||||||
|
h4.contributor-title
|
||||||
|
a(href="/contribute#archmage") Archmage
|
||||||
|
if emails.artisanNews
|
||||||
|
li.contributor-category
|
||||||
|
img.contributor-image(src="/images/pages/user/artisan.png")
|
||||||
|
h4.contributor-title
|
||||||
|
a(href="/contribute#artisan") Artisan
|
||||||
|
if emails.scribeNews
|
||||||
|
li.contributor-category
|
||||||
|
img.contributor-image(src="/images/pages/user/scribe.png")
|
||||||
|
h4.contributor-title
|
||||||
|
a(href="/contribute#scribe") Scribe
|
||||||
|
|
||||||
|
|
||||||
|
.right-column
|
||||||
|
.panel.panel-default
|
||||||
|
.panel-heading
|
||||||
|
h3.panel-title Achievements
|
||||||
|
.panel-body
|
||||||
|
.panel.panel-default
|
||||||
|
.panel-heading
|
||||||
|
h3.panel-title S. Levels
|
||||||
|
.panel-body
|
||||||
|
.panel.panel-default
|
||||||
|
.panel-heading
|
||||||
|
h3.panel-title M. Levels
|
||||||
|
.panel-body
|
||||||
|
|
Reference in a new issue