2013-02-17 05:42:42 +00:00
|
|
|
<modals:>
|
2013-02-17 06:51:40 +00:00
|
|
|
<app:modals:modal modalId="avatar-modal">
|
2013-02-17 06:22:34 +00:00
|
|
|
{#if _profileActiveMain}
|
|
|
|
|
{#with _user.preferences}
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
|
<li class="active"><a data-toggle='tab' href="#profileCustomize">Avatar</a></li>
|
|
|
|
|
<li><a data-toggle='tab' href="#profileEdit">Profile</a></li>
|
2013-03-09 18:33:57 +00:00
|
|
|
{#if _user.flags.dropsEnabled}
|
|
|
|
|
<li><a data-toggle='tab' href="#profileInventory">Inventory</a></li>
|
2013-03-09 20:34:48 +00:00
|
|
|
<li><a data-toggle='tab' href="#profileStable">Stable</a></li>
|
2013-03-09 18:33:57 +00:00
|
|
|
{/if}
|
2013-02-17 06:22:34 +00:00
|
|
|
</ul>
|
2013-02-17 05:42:42 +00:00
|
|
|
|
2013-02-17 06:22:34 +00:00
|
|
|
<div class="tab-content">
|
|
|
|
|
<div class="tab-pane active" id="profileCustomize">
|
|
|
|
|
<app:avatar:customize />
|
|
|
|
|
</div>
|
2013-02-17 05:42:42 +00:00
|
|
|
|
2013-03-08 04:23:18 +00:00
|
|
|
<div class="tab-pane" id="profileEdit">
|
|
|
|
|
<app:avatar:profile user="{_user}" main="true" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-pane" id="profileInventory">
|
|
|
|
|
<app:avatar:inventory user="{_user}" main="true" />
|
|
|
|
|
</div>
|
2013-03-09 20:34:48 +00:00
|
|
|
<div class="tab-pane" id="profileStable">
|
2013-03-23 04:17:25 +00:00
|
|
|
<app:pets:stable />
|
2013-03-09 20:34:48 +00:00
|
|
|
</div>
|
2013-02-17 06:22:34 +00:00
|
|
|
</div>
|
2013-03-21 19:51:38 +00:00
|
|
|
{/}
|
2013-02-17 06:22:34 +00:00
|
|
|
{else}
|
|
|
|
|
<app:avatar:profile profile={_profileActive} />
|
2013-02-17 05:55:52 +00:00
|
|
|
{/}
|
|
|
|
|
<@footer>
|
|
|
|
|
<button data-dismiss="modal" class="btn btn-success">Ok</button>
|
|
|
|
|
</@footer>
|
|
|
|
|
</app:modals:modal>
|
|
|
|
|
|
2013-02-17 06:22:34 +00:00
|
|
|
<avatar:>
|
2013-03-19 03:42:03 +00:00
|
|
|
<figure class="herobox"
|
2013-03-21 22:50:27 +00:00
|
|
|
data-name="{username(@profile.auth)}"
|
2013-03-19 03:42:03 +00:00
|
|
|
data-level="{@profile.stats.lvl}"
|
2013-03-19 04:04:24 +00:00
|
|
|
data-checkpet="{#if @profile.items.pet}hasPet{/}"
|
|
|
|
|
data-checkuser="{#if equal(@profile.id, _user.id)}isUser{/}"
|
2013-03-21 18:36:05 +00:00
|
|
|
data-toggle='modal' data-target='#avatar-modal' data-uid="{@profile.id}" x-bind="click:profileChangeActive"
|
2013-03-21 18:55:35 +00:00
|
|
|
rel="popover" data-placement="bottom" data-trigger="hover" data-html="true" data-content="
|
2013-03-21 18:36:05 +00:00
|
|
|
<div>
|
|
|
|
|
<div class='progress progress-danger' style='height:5px;'>
|
|
|
|
|
<div class='bar' style='height: 5px; width: {percent(@profile.stats.hp, 50)}%;'></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='progress progress-warning' style='height:5px;'>
|
|
|
|
|
<div class='bar' style='height: 5px; width: {percent(@profile.stats.exp, tnl(@profile.stats.lvl))}%;'></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>GP: {{floor(@profile.stats.gp)}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
">
|
2013-02-17 06:22:34 +00:00
|
|
|
<div class='character-sprites'>
|
2013-03-21 19:51:38 +00:00
|
|
|
{#if and(@profile.items.currentPet, not(@minimal))}
|
|
|
|
|
<span class="Pet-{_user.items.currentPet.name}-{_user.items.currentPet.modifier}" ></span>
|
|
|
|
|
{/}
|
2013-02-17 06:22:34 +00:00
|
|
|
{#with @profile.preferences as :p}
|
|
|
|
|
<span class='{:p.gender}_skin_{:p.skin}'></span>
|
|
|
|
|
<span class='{:p.gender}_hair_{:p.hair}'></span>
|
|
|
|
|
<span class="{equipped(@profile, 'armor')}"></span>
|
2013-03-15 21:20:01 +00:00
|
|
|
{#if :p.showHelm}
|
|
|
|
|
<span class="{equipped(@profile, 'head')}"></span>
|
|
|
|
|
{else}
|
|
|
|
|
<span class="{:p.gender}_head_0"></span>
|
|
|
|
|
{/}
|
2013-02-17 06:22:34 +00:00
|
|
|
<span class='{:p.gender}_shield_{@profile.items.shield}'></span>
|
|
|
|
|
<span class='{:p.gender}_weapon_{@profile.items.weapon}'></span>
|
|
|
|
|
{/}
|
|
|
|
|
</div>
|
2013-03-19 03:42:03 +00:00
|
|
|
</figure>
|
2013-02-17 06:22:34 +00:00
|
|
|
|
2013-02-17 05:55:52 +00:00
|
|
|
<customize:>
|
|
|
|
|
<!-- user avatar preview -->
|
|
|
|
|
<figure class="avatar-window">
|
|
|
|
|
<app:avatar:avatar profile={_user} minimal="true" />
|
|
|
|
|
</figure>
|
|
|
|
|
|
|
|
|
|
<!-- customization options -->
|
2013-03-18 19:43:02 +00:00
|
|
|
{#with _user.preferences as :p}
|
2013-02-17 05:55:52 +00:00
|
|
|
<menu type="list">
|
2013-03-18 19:43:02 +00:00
|
|
|
<!-- gender -->
|
2013-02-17 05:55:52 +00:00
|
|
|
<li class="customize-menu">
|
2013-03-18 19:43:02 +00:00
|
|
|
<menu label="Head">
|
|
|
|
|
<button type="button" class="m_head_0 customize-option" data-value="m" x-bind="click:customizeGender"></button>
|
|
|
|
|
<button type="button" class="f_head_0 customize-option" data-value="f" x-bind="click:customizeGender"></button>
|
|
|
|
|
</menu>
|
|
|
|
|
<label class="checkbox">
|
|
|
|
|
<input type=checkbox checked="{_user.preferences.showHelm}" /> Show Helm
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<!-- hair -->
|
|
|
|
|
<li class="customize-menu">
|
|
|
|
|
<menu label="Hair">
|
|
|
|
|
<button type="button" class="{:p.gender}_hair_blond customize-option" data-value="blond" x-bind="click:customizeHair"></button>
|
|
|
|
|
<button type="button" class="{:p.gender}_hair_black customize-option" data-value="black" x-bind="click:customizeHair"></button>
|
|
|
|
|
<button type="button" class="{:p.gender}_hair_brown customize-option" data-value="brown" x-bind="click:customizeHair"></button>
|
|
|
|
|
<button type="button" class="{:p.gender}_hair_white customize-option" data-value="white" x-bind="click:customizeHair"></button>
|
|
|
|
|
</menu>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<!-- skin -->
|
2013-02-17 05:55:52 +00:00
|
|
|
<li class="customize-menu">
|
2013-03-18 19:43:02 +00:00
|
|
|
<menu label="Skin">
|
|
|
|
|
<button type="button" class='{:p.gender}_skin_dead customize-option' data-value="dead" x-bind="click:customizeSkin"></button>
|
|
|
|
|
<button type="button" class='{:p.gender}_skin_orc customize-option' data-value="orc" x-bind="click:customizeSkin"></button>
|
|
|
|
|
<button type="button" class='{:p.gender}_skin_asian customize-option' data-value="asian" x-bind="click:customizeSkin"></button>
|
|
|
|
|
<button type="button" class='{:p.gender}_skin_black customize-option' data-value="black" x-bind="click:customizeSkin"></button>
|
|
|
|
|
<button type="button" class='{:p.gender}_skin_white customize-option' data-value="white" x-bind="click:customizeSkin"></button>
|
2013-02-17 05:55:52 +00:00
|
|
|
</menu>
|
|
|
|
|
</li>
|
|
|
|
|
</menu>
|
2013-03-18 19:43:02 +00:00
|
|
|
|
|
|
|
|
{#if equal(_user.preferences.gender, 'f')} <!-- Sorry boys -->
|
|
|
|
|
<menu type="list">
|
|
|
|
|
<li class="customize-menu">
|
|
|
|
|
<menu label="Clothing">
|
|
|
|
|
<button type="button" class="f_armor_0_v1 customize-option" data-value="v1" x-bind="click:customizeArmorSet"></button>
|
|
|
|
|
<button type="button" class="f_armor_0_v2 customize-option" data-value="v2" x-bind="click:customizeArmorSet"></button>
|
|
|
|
|
</menu>
|
|
|
|
|
</li>
|
|
|
|
|
</menu>
|
|
|
|
|
{/}
|
2013-02-17 05:55:52 +00:00
|
|
|
{/}
|
2013-02-17 05:42:42 +00:00
|
|
|
|
|
|
|
|
<profile:>
|
|
|
|
|
<div class='row-fluid'>
|
2013-02-17 20:07:56 +00:00
|
|
|
<div class='span6 well'>
|
2013-03-18 19:43:02 +00:00
|
|
|
{#if and(_profileEditing, _profileActiveMain)}
|
|
|
|
|
<a class='btn btn-success' x-bind="click:profileSave">Save</a>
|
|
|
|
|
<!-- TODO use photo-upload instead: https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/xMmADvxBOak -->
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<label class="control-label" for="profileImageUrl">Photo Url</label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<input type="url" id="profileImageUrl" value="{_user.profile.imageUrl}" placeholder="Image Url"/>
|
2013-02-17 05:55:52 +00:00
|
|
|
</div>
|
2013-03-18 19:43:02 +00:00
|
|
|
</div>
|
2013-02-17 05:42:42 +00:00
|
|
|
|
2013-03-18 19:43:02 +00:00
|
|
|
<div class="control-group">
|
|
|
|
|
<label class="control-label" for="profileFullName">Full Name</label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<input type="text" id="profileFullName" placeholder="Full Name" value="{_user.profile.name}" />
|
2013-02-17 05:55:52 +00:00
|
|
|
</div>
|
2013-03-18 19:43:02 +00:00
|
|
|
</div>
|
2013-02-17 05:42:42 +00:00
|
|
|
|
2013-03-18 19:43:02 +00:00
|
|
|
<div class="control-group">
|
|
|
|
|
<label class="control-label" for="profileBlurb">Blurb</label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<textarea id="profileBlurb" placeholder="Blurb" >{_user.profile.blurb}</textarea>
|
2013-02-17 05:55:52 +00:00
|
|
|
</div>
|
2013-03-18 19:43:02 +00:00
|
|
|
</div>
|
2013-02-17 05:42:42 +00:00
|
|
|
|
2013-03-18 19:43:02 +00:00
|
|
|
<div class="control-group">
|
|
|
|
|
<label class="control-label" for="profileWebsite">Websites</label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<form x-bind="submit:profileAddWebsite">
|
|
|
|
|
<input type="url" id="profileWebsite" value="{_newProfileWebsite}" placeholder="Add Website"/>
|
|
|
|
|
</form>
|
2013-02-17 06:22:34 +00:00
|
|
|
</div>
|
2013-03-18 19:43:02 +00:00
|
|
|
<ul>
|
|
|
|
|
{#each _user.profile.websites as :website}
|
|
|
|
|
<!-- would prefer if there were and index in #each, instead using data-website to search with indexOf -->
|
|
|
|
|
<li>{:website} <a data-website="{:website}" x-bind="click:profileRemoveWebsite"><i class='icon-remove'></i></a></li>
|
|
|
|
|
{/}
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<a class='btn btn-success' x-bind="click:profileSave">Save</a>
|
2013-02-17 05:42:42 +00:00
|
|
|
{else}
|
2013-02-17 05:55:52 +00:00
|
|
|
<h3>
|
2013-03-18 19:43:02 +00:00
|
|
|
{#if _profileActive.profile.name}
|
|
|
|
|
{_profileActive.profile.name}
|
|
|
|
|
{else}
|
|
|
|
|
{username(_profileActive.auth)}
|
2013-02-17 05:55:52 +00:00
|
|
|
{/}
|
2013-02-17 06:22:34 +00:00
|
|
|
{#if _profileActiveMain}<a class='btn pull-right' x-bind="click:profileEdit">Edit</a>{/}
|
2013-02-17 05:55:52 +00:00
|
|
|
</h3>
|
2013-02-17 06:22:34 +00:00
|
|
|
{#if _profileActive.profile.imageUrl}
|
|
|
|
|
<img src="{@user.profile.imageUrl}" />
|
|
|
|
|
{/}
|
|
|
|
|
{#if _profileActive.profile.blurb}
|
|
|
|
|
<p>{_profileActive.profile.blurb}</p>
|
|
|
|
|
{/}
|
|
|
|
|
{#if _profileActive.profile.websites}
|
|
|
|
|
<ul>
|
|
|
|
|
{#each _profileActive.profile.websites as :website}
|
2013-03-18 19:43:02 +00:00
|
|
|
<li>{:website}</li>
|
2013-02-17 06:22:34 +00:00
|
|
|
{/}
|
|
|
|
|
</ul>
|
|
|
|
|
{/}
|
2013-02-17 05:42:42 +00:00
|
|
|
{/}
|
|
|
|
|
</div>
|
|
|
|
|
|
2013-02-17 20:07:56 +00:00
|
|
|
<div class='span6'>
|
|
|
|
|
<h3>Achievements</h3>
|
|
|
|
|
<app:avatar:achievements />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
2013-02-17 05:42:42 +00:00
|
|
|
|
2013-02-17 20:07:56 +00:00
|
|
|
<achievements:>
|
|
|
|
|
<!--TODO replce this in the future with HTML from BrowserQuest's index.html, which properly handles the achievements
|
|
|
|
|
sprite-sheets (see BQ's achievements.css, main.css) -->
|
2013-03-08 04:23:18 +00:00
|
|
|
<img src='/img/original_user.png' /> Original User!
|
|
|
|
|
|
|
|
|
|
<inventory:>
|
2013-03-23 01:37:48 +00:00
|
|
|
<!-- we'll have other inventory here later too, like enchantments, quest scrolls, etc -->
|
|
|
|
|
<app:pets:inventory/>
|
2013-03-09 20:34:48 +00:00
|
|
|
|