habitica-self-host/website/views/shared/avatar/generated_avatar.jade
Alyssa Batula aac38dda91 Avatar's eyes can be set to open or closed in modals while in the Inn fixes #6282 (#7988)
* Avatar model can be set to have eyes open, eyes shut, or left to default by specifying the sleep parameter in generatedAvatar to be false, true, or null (respectively).

* Explicitly check true and false and switched to using triple equals for equality comparisons for avatar sleep setting.
2016-09-10 22:41:00 -05:00

30 lines
1.4 KiB
Text

mixin costumeSetting(type, options)
- options = options || {}
- var costume = (options.prefix || '') + 'profile.items.gear.costume.' + type + (options.suffix || '')
- var equipped = (options.prefix || '') + 'profile.items.gear.equipped.' + type + (options.suffix || '')
span(ng-class="profile.preferences.costume ? #{costume} : #{equipped}")
mixin generatedAvatar(options)
- options = options || {}
span(class='chair_{{profile.preferences.chair}}')
+costumeSetting('back')
if options.sleep === true
span(ng-class="'skin_' + profile.preferences.skin + '_sleep'")
else if options.sleep === false
span(ng-class="'skin_' + profile.preferences.skin")
else
span(ng-class="profile.preferences.sleep ? 'skin_' + profile.preferences.skin + '_sleep' : 'skin_' + profile.preferences.skin")
span(class='{{profile.preferences.size}}_shirt_{{profile.preferences.shirt}}')
+costumeSetting('armor', {prefix: "profile.preferences.size + '_' + "})
+costumeSetting('back', {suffix: " + '_collar'"})
+costumeSetting('body')
span.head_0
- var hairTypes = ['base', 'bangs', 'mustache', 'beard']
each type in hairTypes
span(class='hair_#{type}_{{profile.preferences.hair.#{type}}}_{{profile.preferences.hair.color}}')
+costumeSetting('eyewear')
+costumeSetting('head')
+costumeSetting('headAccessory')
span(class='hair_flower_{{profile.preferences.hair.flower}}')
+costumeSetting('shield')
+costumeSetting('weapon')