habitica-self-host/website/views/shared/avatar/generated_avatar.jade

28 lines
1.3 KiB
Text
Raw Normal View History

2015-06-27 21:08:38 +00:00
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}")
2015-07-27 21:35:06 +00:00
mixin generatedAvatar(options)
- options = options || {}
span(class='chair_{{profile.preferences.chair}}')
2015-07-27 21:35:06 +00:00
+costumeSetting('back')
if options.sleep
span(ng-class="'skin_' + profile.preferences.skin + '_sleep'")
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')
2015-07-29 21:28:23 +00:00
span.head_0
2015-07-27 21:35:06 +00:00
- 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')
+costumeSetting('shield')
+costumeSetting('weapon')