Refactored contribute views to share some templates and link to users' profile photos and GitHub accounts when available.

This commit is contained in:
Nick Winter 2014-04-12 14:53:09 -07:00
parent 072729acc3
commit 08616def10
21 changed files with 162 additions and 265 deletions

View file

@ -49,9 +49,15 @@
&:hover
background-color: rgba(200, 244, 255, 0.2)
h4
text-align: center
a:not(.has-github)
cursor: default
text-decoration: none
img
max-width: 100px
max-height: 100px
.caption
background-color: transparent
h4
text-align: center

View file

@ -53,30 +53,12 @@ block content
span(data-i18n="contribute.adventurer_join_suf")
| so if you prefer to be notified those ways, sign up there!
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
.contributor-signup(data-contributor-class-id="tester", data-contributor-class-name="adventurer")
label.checkbox(for="tester").well
input(type='checkbox', name="tester", id="tester")
span(data-i18n="contribute.adventurer_subscribe_desc")
| Get emails when there are new levels to test.
.saved-notification ✓ Saved
//#Contributors
// h3(data-i18n="contribute.brave_adventurers")
// | Our Brave Adventurers:
// ul.adventurers
// li Kieizroe
// li ... many, many more
//h3(data-i18n="contribute.brave_adventurers")
// | Our Brave Adventurers:
//
//#contributor-list
div.clearfix

View file

@ -47,29 +47,12 @@ block content
| solving levels can summon higher level wizards to help them.
| This will be a great way for ambassadors to do their thing. We'll keep you posted!
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
.contributor-signup(data-contributor-class-id="support", data-contributor-class-name="ambassador")
label.checkbox(for="support").well
input(type='checkbox', name="support", id="support")
span(data-i18n="contribute.ambassador_subscribe_desc")
| Get emails on support updates and multiplayer developments.
.saved-notification ✓ Saved
//#Contributors
// h3(data-i18n="contribute.helpful_ambassadors")
// | Our Helpful Ambassadorsd:
// ul.ambassadors
// li
//h3(data-i18n="contribute.helpful_ambassadors")
// | Our Helpful Ambassadorsd:
//
//#contributor-list
div.clearfix

View file

@ -57,37 +57,12 @@ block content
span(data-i18n="contribute.join_desc_4")
| and we'll go from there!
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
.contributor-signup(data-contributor-class-id="developer", data-contributor-class-name="archmage")
label.checkbox(for="developer").well
input(type='checkbox', name="developer", id="developer")
span(data-i18n="contribute.archmage_subscribe_desc")
| Get emails on new coding opportunities and announcements.
.saved-notification ✓ Saved
h3(data-i18n="contribute.powerful_archmages")
| Our Powerful Archmages:
#Contributors
h3(data-i18n="contribute.powerful_archmages")
| Our Powerful Archmages:
.row
for contributor in contributors
.col-xs-6.col-md-3
.thumbnail
if contributor.avatar
img.img-responsive(src="/images/pages/contribute/archmage/" + contributor.avatar + "_small.png", alt="")
else
img.img-responsive(src="/images/pages/contribute/archmage.png", alt="")
.caption
h4= contributor.name
#contributor-list
div.clearfix

View file

@ -54,38 +54,13 @@ block content
li
a(href="http://discourse.codecombat.com", data-i18n="contribute.artisan_join_step4") Post your levels on the forum for feedback.
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
.contributor-signup(data-contributor-class-id="level_creator", data-contributor-class-name="artisan")
label.checkbox(for="level_creator").well
input(type='checkbox', name="level_creator", id="level_creator")
span(data-i18n="contribute.artisan_subscribe_desc")
| Get emails on level editor updates and announcements.
.saved-notification ✓ Saved
h3(data-i18n="contribute.creative_artisans")
| Our Creative Artisans:
#Contributors
h3(data-i18n="contribute.creative_artisans")
| Our Creative Artisans:
.row
for contributor in contributors
.col-xs-6.col-md-3
.thumbnail
if contributor.avatar
img.img-responsive(src="/images/pages/contribute/artisan/" + contributor.avatar + "_small.png", alt="")
else
img.img-responsive(src="/images/pages/contribute/artisan.png", alt="")
.caption
h4= contributor.name
#contributor-list
div.clearfix

View file

@ -37,18 +37,7 @@ block content
| - Nick, George, Scott, Michael, Jeremy and Glen
hr
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
#archmage.header-scrolling-fix
.class_image
@ -69,13 +58,7 @@ block content
p.lead(data-i18n="contribute.more_about_archmage")
| Learn More About Becoming an Archmage
label.checkbox(for="developer").well
input(type='checkbox', name="developer", id="developer")
span(data-i18n="contribute.archmage_subscribe_desc")
| Get emails on new coding opportunities and announcements.
.saved-notification
| ✓
span(data-i18n="contribute.saved") Saved
.contributor-signup(data-contributor-class-id="developer", data-contributor-class-name="archmage")
#artisan.header-scrolling-fix
@ -102,13 +85,7 @@ block content
p.lead(data-i18n="contribute.more_about_artisan")
| Learn More About Becoming An Artisan
label.checkbox(for="level_creator").well
input(type='checkbox', name="level_creator", id="level_creator")
span(data-i18n="contribute.artisan_subscribe_desc")
| Get emails on level editor updates and announcements.
.saved-notification
| ✓
span(data-i18n="contribute.saved") Saved
.contributor-signup(data-contributor-class-id="level_creator", data-contributor-class-name="artisan")
#adventurer.header-scrolling-fix
@ -130,13 +107,7 @@ block content
p.lead(data-i18n="contribute.more_about_adventurer")
| Learn More About Becoming an Adventurer
label.checkbox(for="tester").well
input(type='checkbox', name="tester", id="tester")
span(data-i18n="contribute.adventurer_subscribe_desc")
| Get emails when there are new levels to test.
.saved-notification
| ✓
span(data-i18n="contribute.saved") Saved
.contributor-signup(data-contributor-class-id="tester", data-contributor-class-name="adventurer")
#scribe.header-scrolling-fix
@ -162,13 +133,7 @@ block content
p.lead(data-i18n="contribute.more_about_scribe")
| Learn More About Becoming a Scribe
label.checkbox(for="article_editor").well
input(type='checkbox', name="article_editor", id="article_editor")
span(data-i18n="contribute.scribe_subscribe_desc")
| Get emails about article writing announcements.
.saved-notification
| ✓
span(data-i18n="contribute.saved") Saved
.contributor-signup(data-contributor-class-id="article_editor", data-contributor-class-name="scribe")
#diplomat.header-scrolling-fix
@ -191,14 +156,8 @@ block content
p.lead(data-i18n="contribute.more_about_diplomat")
| Learn More About Becoming a Diplomat
label.checkbox(for="translator").well
input(type='checkbox', name="translator", id="translator")
span(data-i18n="contribute.diplomat_subscribe_desc")
| Get emails about i18n developments and levels to translate.
.saved-notification
| ✓
span(data-i18n="contribute.saved") Saved
.contributor-signup(data-contributor-class-id="translator", data-contributor-class-name="diplomat")
#ambassador.header-scrolling-fix
.class_image
@ -218,13 +177,7 @@ block content
p.lead(data-i18n="contribute.more_about_ambassador")
| Learn More About Becoming an Ambassador
label.checkbox(for="support").well
input(type='checkbox', name="support", id="support")
span(data-i18n="contribute.ambassador_subscribe_desc")
| Get emails on support updates and multiplayer developments.
.saved-notification
| ✓
span(data-i18n="contribute.saved") Saved
.contributor-signup(data-contributor-class-id="support", data-contributor-class-name="ambassador")
#counselor.header-scrolling-fix

View file

@ -0,0 +1,13 @@
.row
for contributor in contributors
.col-xs-6.col-md-3
.thumbnail
- var src = "/images/pages/contribute/" + contributorClassName + ".png";
- if(contributor.avatar)
- src = src.replace(contributorClassName, contributorClassName + "/" + contributor.avatar + "_small");
- if(contributor.id)
- src = "/db/user/" + contributor.id + "/avatar?s=100&fallback=" + src;
a(href=contributor.github ? "https://github.com/codecombat/codecombat/commits?author=" + contributor.github : null, class=contributor.github ? 'has-github' : '')
img.img-responsive(src=src, alt=contributor.name)
.caption
h4= contributor.name

View file

@ -0,0 +1,5 @@
label.checkbox(for=contributorClassID).well
input(type='checkbox', name=contributorClassID, id=contributorClassID)
span(data-i18n="contribute.#{contributorClassName}_subscribe_desc")
.saved-notification ✓ Saved

View file

@ -0,0 +1,12 @@
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.

View file

@ -44,51 +44,37 @@ block content
| , edit it online, and submit a pull request. Also, check this box below to
| keep up-to-date on new internationalization developments!
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
.contributor-signup(data-contributor-class-id="translator", data-contributor-class-name="diplomat")
label.checkbox(for="translator").well
input(type='checkbox', name="translator", id="translator")
span(data-i18n="contribute.diplomat_subscribe_desc")
| Get emails about i18n developments and levels to translate.
.saved-notification ✓ Saved
h3(data-i18n="contribute.translating_diplomats")
| Our Translating Diplomats:
#Contributors
h3(data-i18n="contribute.translating_diplomats")
| Our Translating Diplomats:
ul.diplomats
li Turkish - Nazım Gediz Aydındoğmuş, cobaimelan, wakeup
li Brazilian Portuguese - Gutenberg Barros, Kieizroe, Matthew Burt, brunoporto, cassiocardoso
li Portugal Portuguese - Matthew Burt, ReiDuKuduro
li German - Dirk, faabsen, HiroP0, Anon, bkimminich
li Thai - Kamolchanok Jittrepit
li Vietnamese - An Nguyen Hoang Thien
li Dutch - Glen De Cauwsemaecker, Guido Zuidhof, Ruben Vereecken, Jasper D'haene
li Greek - Stergios
li Latin American Spanish - Jesús Ruppel, Matthew Burt, Mariano Luzza
li Spain Spanish - Matthew Burt, DanielRodriguezRivero, Anon, Pouyio
li French - Xeonarno, Elfisen, Armaldio, MartinDelille, pstweb, veritable, jaybi, xavismeh, Anon, Feugy
li Hungarian - ferpeter, csuvsaregal, atlantisguru, Anon
li Japanese - g1itch, kengos
li Chinese - Adam23, spacepope, yangxuan8282, Cheng Zheng
li Polish - Anon, Kacper Ciepielewski
li Danish - Einar Rasmussen, sorsjen, Randi Hillerøe, Anon
li Slovak - Anon
li Persian - Reza Habibi (Rehb)
li Czech - vanous
li Russian - fess89, ser-storchak, Mr A
li Ukrainian - fess89
li Italian - flauta
li Norwegian - bardeh
//#contributor-list
// TODO: collect CodeCombat userids for these guys so we can include a tiled list
ul.diplomats
li Turkish - Nazım Gediz Aydındoğmuş, cobaimelan, wakeup
li Brazilian Portuguese - Gutenberg Barros, Kieizroe, Matthew Burt, brunoporto, cassiocardoso
li Portugal Portuguese - Matthew Burt, ReiDuKuduro
li German - Dirk, faabsen, HiroP0, Anon, bkimminich
li Thai - Kamolchanok Jittrepit
li Vietnamese - An Nguyen Hoang Thien
li Dutch - Glen De Cauwsemaecker, Guido Zuidhof, Ruben Vereecken, Jasper D'haene
li Greek - Stergios
li Latin American Spanish - Jesús Ruppel, Matthew Burt, Mariano Luzza
li Spain Spanish - Matthew Burt, DanielRodriguezRivero, Anon, Pouyio
li French - Xeonarno, Elfisen, Armaldio, MartinDelille, pstweb, veritable, jaybi, xavismeh, Anon, Feugy
li Hungarian - ferpeter, csuvsaregal, atlantisguru, Anon
li Japanese - g1itch, kengos
li Chinese - Adam23, spacepope, yangxuan8282, Cheng Zheng
li Polish - Anon, Kacper Ciepielewski
li Danish - Einar Rasmussen, sorsjen, Randi Hillerøe, Anon
li Slovak - Anon
li Persian - Reza Habibi (Rehb)
li Czech - vanous
li Russian - fess89, ser-storchak, Mr A
li Ukrainian - fess89
li Italian - flauta
li Norwegian - bardeh
div.clearfix

View file

@ -44,37 +44,12 @@ block content
| tell us a little about yourself, your experience with programming and
| what sort of things you'd like to write about. We'll go from there!
if me.attributes.anonymous
div#sign-up.alert.alert-info
strong(data-i18n="contribute.alert_account_message_intro")
| Hey there!
span
span(data-i18n="contribute.alert_account_message_pref")
| To subscribe for class emails, you'll need to
a(data-toggle="coco-modal", data-target="modal/signup", data-i18n="contribute.alert_account_message_create_url")
| create an account
span
span(data-i18n="contribute.alert_account_message_suf")
| first.
.contributor-signup-anonymous
.contributor-signup(data-contributor-class-id="article_editor", data-contributor-class-name="scribe")
label.checkbox(for="article_editor").well
input(type='checkbox', name="article_editor", id="article_editor")
span(data-i18n="contribute.scribe_subscribe_desc")
| Get emails about article writing announcements.
.saved-notification ✓ Saved
#Contributors
h3(data-i18n="contribute.diligent_scribes")
| Our Diligent Scribes:
ul.scribes
li Ryan Faidley
li Glen De Cauwsemaecker
li Mischa Lewis-Norelle
li Tavio
li Ronnie Cheng
li engstrom
li Dman19993
li mattinsler
h3(data-i18n="contribute.diligent_scribes")
| Our Diligent Scribes:
#contributor-list(data-contributor-class-name="scribe")
div.clearfix

View file

@ -81,6 +81,7 @@ module.exports = class SettingsView extends View
schema = _.cloneDeep me.schema()
schema.properties = _.pick me.schema().properties, 'photoURL'
schema.required = ['photoURL']
console.log 'have data', data, 'schema', schema
treemaOptions =
filePath: "db/user/#{me.id}"
schema: schema
@ -88,8 +89,8 @@ module.exports = class SettingsView extends View
callbacks: {change: @onPictureChanged}
@pictureTreema = @$el.find('#picture-treema').treema treemaOptions
@pictureTreema.build()
@pictureTreema.open()
@pictureTreema?.build()
@pictureTreema?.open()
@$el.find('.gravatar-fallback').toggle not me.get 'photoURL'
onPictureChanged: (e) =>

View file

@ -4,4 +4,5 @@ template = require 'templates/contribute/adventurer'
module.exports = class AdventurerView extends ContributeClassView
id: "adventurer-view"
template: template
template: template
contributorClassName: 'adventurer'

View file

@ -5,3 +5,4 @@ template = require 'templates/contribute/ambassador'
module.exports = class AmbassadorView extends ContributeClassView
id: "ambassador-view"
template: template
contributorClassName: 'ambassador'

View file

@ -4,28 +4,30 @@ template = require 'templates/contribute/archmage'
module.exports = class ArchmageView extends ContributeClassView
id: "archmage-view"
template: template
contributorClassName: 'archmage'
contributors: [
{name: "Tom Steinbrecher", avatar: "tom"}
{name: "Sébastien Moratinos", avatar: "sebastien"}
{name: "deepak1556", avatar: "deepak"}
{name: "Ronnie Cheng", avatar: "ronald"}
{name: "Chloe Fan", avatar: "chloe"}
{name: "Rachel Xiang", avatar: "rachel"}
{name: "Dan Ristic", avatar: "dan"}
{name: "Brad Dickason", avatar: "brad"}
{id: "52bfc3ecb7ec628868001297", name: "Tom Steinbrecher", github: "TomSteinbrecher"}
{id: "5272806093680c5817033f73", name: "Sébastien Moratinos", github: "smoratinos"}
{name: "deepak1556", avatar: "deepak", github: "deepak1556"}
{name: "Ronnie Cheng", avatar: "ronald", github: "rhc2104"}
{name: "Chloe Fan", avatar: "chloe", github: "chloester"}
{name: "Rachel Xiang", avatar: "rachel", github: "rdxiang"}
{name: "Dan Ristic", avatar: "dan", github: "dristic"}
{name: "Brad Dickason", avatar: "brad", github: "bdickason"}
{name: "Rebecca Saines", avatar: "becca"}
{name: "Laura Watiker", avatar: "laura"}
{name: "Shiying Zheng", avatar: "shiying"}
{name: "Mischa Lewis-Norelle", avatar: "mischa"}
{name: "Laura Watiker", avatar: "laura", github: "lwatiker"}
{name: "Shiying Zheng", avatar: "shiying", github: "shiyingzheng"}
{name: "Mischa Lewis-Norelle", avatar: "mischa", github: "mlewisno"}
{name: "Paul Buser", avatar: "paul"}
{name: "Benjamin Stern", avatar: "ben"}
{name: "Alex Cotsarelis", avatar: "alex"}
{name: "Ken Stanley", avatar: "ken"}
{name: "devast8a", avatar: ""}
{name: "phansch", avatar: ""}
{name: "Zach Martin", avatar: ""}
{name: "devast8a", avatar: "", github: "devast8a"}
{name: "phansch", avatar: "", github: "phansch"}
{name: "Zach Martin", avatar: "", github: "zachster01"}
{name: "David Golds", avatar: ""}
{name: "gabceb", avatar: ""}
{name: "MDP66", avatar: ""}
{name: "gabceb", avatar: "", github: "gabceb"}
{name: "MDP66", avatar: "", github: "MDP66"}
{name: "Alexandru Caciulescu", avatar: "", github: "Darredevil"}
]

View file

@ -5,10 +5,11 @@ template = require 'templates/contribute/artisan'
module.exports = class ArtisanView extends ContributeClassView
id: "artisan-view"
template: template
contributorClassName: 'artisan'
contributors: [
{name: "Sootn", avatar: ""}
{name: "Zach Martin", avatar: ""}
{name: "Zach Martin", avatar: "", github: "zachster01"}
{name: "Aftermath", avatar: ""}
{name: "mcdavid1991", avatar: ""}
{name: "dwhittaker", avatar: ""}
@ -19,6 +20,6 @@ module.exports = class ArtisanView extends ContributeClassView
{name: "Axandre Oge", avatar: "axandre"}
{name: "Katharine Chan", avatar: "katharine"}
{name: "Derek Wong", avatar: "derek"}
{name: "Alexandru Caciulescu", avatar: ""}
{name: "Prabh Simran Singh Baweja", avatar: ""}
{name: "Alexandru Caciulescu", avatar: "", github: "Darredevil"}
{name: "Prabh Simran Singh Baweja", avatar: "", github: "prabh27"}
]

View file

@ -1,6 +1,9 @@
SignupModalView = require 'views/modal/signup_modal'
View = require 'views/kinds/RootView'
{me} = require('lib/auth')
contributorSignupAnonymousTemplate = require 'templates/contribute/contributor_signup_anonymous'
contributorSignupTemplate = require 'templates/contribute/contributor_signup'
contributorListTemplate = require 'templates/contribute/contributor_list'
module.exports = class ContributeClassView extends View
navPrefix: '/contribute'
@ -16,6 +19,12 @@ module.exports = class ContributeClassView extends View
afterRender: ->
super()
@$el.find('.contributor-signup-anonymous').replaceWith(contributorSignupAnonymousTemplate(me: me))
@$el.find('.contributor-signup').each ->
context = me: me, contributorClassID: $(@).data('contributor-class-id'), contributorClassName: $(@).data('contributor-class-name')
$(@).replaceWith(contributorSignupTemplate(context))
@$el.find('#contributor-list').replaceWith(contributorListTemplate(contributors: @contributors, contributorClassName: @contributorClassName))
checkboxes = @$el.find('input[type="checkbox"]').toArray()
_.forEach checkboxes, (el) ->
el = $(el)

View file

@ -5,3 +5,4 @@ template = require 'templates/contribute/counselor'
module.exports = class CounselorView extends ContributeClassView
id: "counselor-view"
template: template
contributorClassName: 'counselor'

View file

@ -5,3 +5,4 @@ template = require 'templates/contribute/diplomat'
module.exports = class DiplomatView extends ContributeClassView
id: "diplomat-view"
template: template
contributorClassName: 'diplomat'

View file

@ -5,3 +5,14 @@ template = require 'templates/contribute/scribe'
module.exports = class ScribeView extends ContributeClassView
id: "scribe-view"
template: template
contributorClassName: 'scribe'
contributors: [
{name: "Ryan Faidley"}
{name: "Mischa Lewis-Norelle", github: "mlewisno"}
{name: "Tavio"}
{name: "Ronnie Cheng", github: "rhc2104"}
{name: "engstrom"}
{name: "Dman19993"}
{name: "mattinsler"}
]

View file

@ -198,7 +198,10 @@ UserHandler = class UserHandler extends Handler
@modelClass.findById(id).exec (err, document) =>
return @sendDatabaseError(res, err) if err
photoURL = document?.get('photoURL')
photoURL ||= @buildGravatarURL document
if photoURL
photoURL = "/file/#{photoURL}"
else
photoURL = @buildGravatarURL document, req.query.s, req.query.fallback
res.redirect photoURL
res.end()
@ -239,10 +242,11 @@ UserHandler = class UserHandler extends Handler
obj.jobProfile = _.pick obj.jobProfile, subfields
obj
buildGravatarURL: (user) ->
buildGravatarURL: (user, size, fallback) ->
emailHash = @buildEmailHash user
defaultAvatar = "http://codecombat.com/file/db/thang.type/52a00d55cf1818f2be00000b/portrait.png"
"https://www.gravatar.com/avatar/#{emailHash}?default=#{defaultAvatar}"
fallback ?= "http://codecombat.com/file/db/thang.type/52a00d55cf1818f2be00000b/portrait.png"
fallback = "http://codecombat.com#{fallback}" unless /^http/.test fallback
"https://www.gravatar.com/avatar/#{emailHash}?s=#{size}&default=#{fallback}"
buildEmailHash: (user) ->
# emailHash is used by gravatar