diff --git a/app/models/SuperModel.coffee b/app/models/SuperModel.coffee index 8c1f68e4d..c366d8285 100644 --- a/app/models/SuperModel.coffee +++ b/app/models/SuperModel.coffee @@ -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) diff --git a/app/styles/account/home.sass b/app/styles/account/home.sass index d8aa424cb..453b52e94 100644 --- a/app/styles/account/home.sass +++ b/app/styles/account/home.sass @@ -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 diff --git a/app/styles/base.sass b/app/styles/base.sass index c873d3d0f..cdf458557 100644 --- a/app/styles/base.sass +++ b/app/styles/base.sass @@ -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 diff --git a/app/styles/common/top_nav.sass b/app/styles/common/top_nav.sass index f4adc3a4e..7e0feece9 100644 --- a/app/styles/common/top_nav.sass +++ b/app/styles/common/top_nav.sass @@ -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 diff --git a/app/styles/user/home.sass b/app/styles/user/home.sass index 0e51f28b4..4da3c19a3 100644 --- a/app/styles/user/home.sass +++ b/app/styles/user/home.sass @@ -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 diff --git a/app/templates/account/home.jade b/app/templates/account/home.jade index a3afdb879..0645e0aa1 100644 --- a/app/templates/account/home.jade +++ b/app/templates/account/home.jade @@ -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 diff --git a/app/templates/base.jade b/app/templates/base.jade index c23bd7315..f3edd46a0 100644 --- a/app/templates/base.jade +++ b/app/templates/base.jade @@ -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 diff --git a/app/templates/user/home.jade b/app/templates/user/home.jade index f84b82442..9541450aa 100644 --- a/app/templates/user/home.jade +++ b/app/templates/user/home.jade @@ -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