mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
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()
|
||||
return res
|
||||
else
|
||||
console.debug 'adding collection', collection
|
||||
@addCollection collection
|
||||
@listenTo collection, 'sync', (c) ->
|
||||
@listenToOnce collection, 'sync', (c) ->
|
||||
console.debug 'Registering collection', url
|
||||
@registerCollection c
|
||||
res = @addModelResource(collection, name, fetchOptions, value)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
@import "../bootstrap/variables"
|
||||
@import "../bootstrap/mixins"
|
||||
|
||||
#account-home-view
|
||||
dl
|
||||
margin-bottom: 0px
|
||||
|
@ -10,3 +13,6 @@
|
|||
|
||||
h2
|
||||
margin-bottom: 0px
|
||||
|
||||
.panel-title > a
|
||||
margin-left: 5px
|
||||
|
|
|
@ -21,7 +21,8 @@ h1 h2 h3 h4
|
|||
margin: 56px auto 0
|
||||
min-height: 600px
|
||||
padding: 14px 12px 5px 12px
|
||||
@include box-sizing(border-box)
|
||||
+box-sizing(border-box)
|
||||
+clearfix()
|
||||
|
||||
#outer-content-wrapper
|
||||
background: #B4B4B4
|
||||
|
|
|
@ -73,29 +73,33 @@ a.disabled
|
|||
border-radius: 0px
|
||||
font-family: Bangers
|
||||
|
||||
li.user-dropdown-header
|
||||
.user-dropdown-header
|
||||
background: #E4CF8C
|
||||
height: 160px
|
||||
padding: 10px
|
||||
text-align: center
|
||||
color: black
|
||||
border-bottom: #32281e 1px solid
|
||||
a:hover
|
||||
background-color: transparent
|
||||
img
|
||||
border: #e3be7a 8px solid
|
||||
height: 98px // Includes the border
|
||||
h3
|
||||
&:hover
|
||||
box-shadow: 0 0 20px #e3be7a
|
||||
> h3
|
||||
margin-top: 10px
|
||||
text-shadow: 2px 2px 3px white
|
||||
color: #31281E
|
||||
|
||||
li.user-dropdown-body
|
||||
.user-dropdown-body
|
||||
color: black
|
||||
padding: 15px
|
||||
letter-spacing: 1px
|
||||
font: 15px 'Helvetica Neue', Helvetica, Arial, sans-serif
|
||||
+clearfix()
|
||||
|
||||
li.user-dropdown-footer
|
||||
.user-dropdown-footer
|
||||
padding: 10px
|
||||
margin-left: 0px
|
||||
font-size: 14px
|
||||
|
|
|
@ -27,3 +27,28 @@
|
|||
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
|
||||
|
||||
.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
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
i.glyphicon.glyphicon-user.pull-left
|
||||
h3.panel-title
|
||||
a(href="account/settings#me") Me
|
||||
.panel-body
|
||||
|
@ -17,18 +18,21 @@ block content
|
|||
dd abe@lincoln
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
i.glyphicon.glyphicon-picture.pull-left
|
||||
h3.panel-title
|
||||
a(href="account/settings#picture") Picture
|
||||
.panel-body.text-center
|
||||
img#picture(src="#{me.getPhotoURL(150)}" alt="")
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
i.glyphicon.glyphicon-user.pull-left
|
||||
h3.panel-title
|
||||
a(href="account/settings#wizard") Wizard
|
||||
//.panel-body
|
||||
| Lorem Ipsum
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
i.glyphicon.glyphicon-envelope.pull-left
|
||||
h3.panel-title
|
||||
a(href="account/settings#emails") Emails
|
||||
.panel-body
|
||||
|
@ -82,10 +86,12 @@ block content
|
|||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
i.glyphicon.glyphicon-wrench.pull-left
|
||||
h3.panel-title
|
||||
a(href="account/settings#password") Password
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
i.glyphicon.glyphicon-briefcase.pull-left
|
||||
h3.panel-title
|
||||
a(href="account/settings#job-profile") Job Profile
|
||||
.col-sm-6
|
||||
|
|
|
@ -27,14 +27,6 @@ body
|
|||
|
||||
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
|
||||
li.play
|
||||
a.header-font(href='/play', data-i18n="nav.play") Levels
|
||||
|
@ -51,11 +43,12 @@ body
|
|||
span.caret
|
||||
ul.dropdown-menu(role="menu")
|
||||
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'
|
||||
li.user-dropdown-body
|
||||
.col-xs-4.text-center
|
||||
a(href="#") Profile
|
||||
a(href="/user/#{me.get('slug') || me.get('_id')}") Profile
|
||||
.col-xs-4.text-center
|
||||
a(href="#") Stats
|
||||
.col-xs-4.text-center
|
||||
|
|
|
@ -2,20 +2,64 @@ extends /templates/kinds/user
|
|||
|
||||
block append content
|
||||
if user
|
||||
.left-column
|
||||
.picture-wrapper
|
||||
img.picture(src="#{me.getPhotoURL(150)}" alt="")
|
||||
h3.name= user.get('name')
|
||||
.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
|
||||
.vertical-buffer
|
||||
.row
|
||||
.left-column
|
||||
.picture-wrapper
|
||||
img.picture(src="#{me.getPhotoURL(150)}" alt="")
|
||||
h3.name= user.get('name')
|
||||
hr
|
||||
ul.list-group
|
||||
li.list-group-item
|
||||
i.glyphicon.glyphicon-briefcase
|
||||
a(href="profile") Job Profile
|
||||
li.list-group-item
|
||||
i.glyphicon.glyphicon-pencil
|
||||
a(href="") Code
|
||||
- var emails = user.get('emails')
|
||||
if emails
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue