habitica/views/app/header.html

42 lines
2.3 KiB
HTML
Raw Normal View History

2013-02-17 05:42:42 +00:00
<header:>
2013-03-16 20:02:15 +00:00
{#unless equal(_user.preferences.hideHeader,true)}
2013-03-19 03:42:03 +00:00
<header class="site-header" role="banner" data-partySize="{#if gt(_partyMembers.length,1)}{truarr(_partyMembers.length)}{else}0{/}">
2013-03-18 20:48:47 +00:00
<!-- avatar -->
2013-03-19 03:42:03 +00:00
<div class="herobox-wrap">
<app:avatar:avatar profile={_user}>
</div>
2013-03-18 23:33:30 +00:00
<!-- stat bars -->
<div class="hero-stats">
2013-03-19 03:42:03 +00:00
<div class="meter health" title="Health">
<div class="bar" style="width: {percent(_user.stats.hp, 50)}%;"></div>
2013-03-18 23:33:30 +00:00
<span class="meter-text"><i class=icon-heart></i> {ceil(_user.stats.hp)} / 50</span>
</div>
2013-03-19 03:42:03 +00:00
<div class="meter experience" title="Experience">
<div class="bar" style="width: {percent(_user.stats.exp,tnl(_user.stats.lvl))}%;"></div>
2013-03-18 23:33:30 +00:00
<span class="meter-text">
2013-03-19 03:42:03 +00:00
<!-- disabled chart for now, it doesn't work -->
<!-- {#if _user.history.exp} -->
<!-- <a x-bind=click:toggleChart data-toggle-id="exp-chart" data-history-path="_user.history.exp" rel=tooltip title="Progress"><i class=icon-signal></i></a>&nbsp; -->
<!-- {/} -->
2013-03-18 23:33:30 +00:00
<i class=icon-star></i> {floor(_user.stats.exp)} / {tnl(_user.stats.lvl)}
</span>
</div>
2013-03-18 23:33:30 +00:00
<!-- hiding the button until we revamp stats/graphs -->
<!-- <div id="exp-chart" style="display:none;"></div> -->
</div>
2013-03-18 20:48:47 +00:00
<!-- party -->
{{#each _partyMembers as :member}}
{{#unless equal(:member.id, _userId)}}
2013-03-19 03:42:03 +00:00
<div class="herobox-wrap">
2013-03-18 20:48:47 +00:00
<app:avatar:avatar profile={{:member}} party="true" />
2013-03-19 03:42:03 +00:00
<!-- Would be way cleaner as a Derby template `data-content="<app:party:member-stats profile={{:member}} />"`, but it was just printing HTML as text -->
<!-- I've re-implemented the rollover using the actual `herobox`/avatar template and data-attributes.
This Derby template idea would have been really handy but this is pretty versatile, and keeps it all in the avatar section -->
</div>
{{/}}
2013-03-18 20:48:47 +00:00
{{/}}
2013-03-18 23:33:30 +00:00
</header>
2013-03-15 20:47:48 +00:00
{/}