-
Notifications
You must be signed in to change notification settings - Fork 3
/
MMM-HabiticaStats.njk
107 lines (103 loc) · 4.26 KB
/
MMM-HabiticaStats.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<div class="MMM-HabiticaStats {{config.orientation}} {% if config.backgroundBlurOn %}background-blur{% endif %}" style="{% if config.zoom %}zoom: {{config.zoom}};{% endif %} {{config.positionCSS}}">
{% if error %}
<div>Error: {{error.error}}. {{error.message}}</div>
</div>
{% elif not user %}
<div>Loading MMM-HabiticaStats...</div>
{% else %}
<div class="title-header">
<i class="fas fa-scroll title-icon"></i>
<h1 class="light">{{user.displayName}}</h1>
<div class="spacer"></div>
</div>
<div class="module-body clearfix">
<div class="first-column column">
<div class="main-stats clearfix">
<div class="small-stats">
<div class="level"><i class="hi-class hi-{{user.className}} habitica-icon small-stat-icon"></i>{{user.className}} <span class="middot-separator">·</span> Level {{user.level}}</div>
<div class="wealth">
<span class="wealth-group">
<i class="small-stat-icon hi-gold habitica-icon"></i>{{user.goldCompact}}<span class="unit">gold</span>
</span>
<span class="wealth-group">
<i class="small-stat-icon hi-gem habitica-icon"></i>{{user.gems}}<span class="unit">gems</span>
</span>
</div>
</div>
</div>
<div class="rings clearfix">
<div class="stat-ring">
<div class="title">Health</div>
<i class="stat-icon hi-health habitica-icon"></i>
<svg viewBox="0 0 39 39" class="circular-chart">
<circle class="shadow-circle" cx="50%" cy="50%" r="15.9155"/>
<circle class="circle health" stroke-dasharray="{{user.health / user.healthMax * 100}}, 100" cx="50%" cy="50%" r="15.9155"/>
</svg>
<div class="ring-stats">
<span class="current-stat">{{user.health}}</span> <span class="max-stat">/ {{user.healthMax}}</span>
</div>
</div>
<div class="stat-ring">
<div class="title">Mana</div>
<i class="stat-icon hi-mana habitica-icon"></i>
<svg viewBox="0 0 39 39" class="circular-chart">
<circle class="shadow-circle" cx="50%" cy="50%" r="15.9155"/>
<circle class="circle mana" stroke-dasharray="{{user.mana / user.manaMax * 100}}, 100" cx="50%" cy="50%" r="15.9155"/>
</svg>
<div class="ring-stats">
<span class="current-stat">{{user.mana}}</span> <span class="max-stat">/ {{user.manaMax}}</span>
</div>
</div>
<div class="stat-ring">
<div class="title">Experience</div>
<i class="stat-icon hi-experience habitica-icon"></i>
<svg viewBox="0 0 39 39" class="circular-chart">
<circle class="shadow-circle" cx="50%" cy="50%" r="15.9155"/>
<circle class="circle experience" stroke-dasharray="{{user.experience / user.experienceToLevel * 100}}, 100" cx="50%" cy="50%" r="15.9155"/>
</svg>
<div class="ring-stats">
<span class="current-stat">{{user.experience}}</span> <span class="max-stat">/ {{user.experienceToLevel}}</span>
</div>
</div>
</div>
{% if not user.isSleeping and user.health < user.tasks.dailyStats.totalDamageToSelf %}
<div class="warning death-warning">
<i class="fas fa-skull"></i>
WARNING: incoming damage is higher than remaining health!
</div>
{% endif %}
</div>
<div class="second-column column">
{% if user.isSleeping %}
<div class="sleep warning">
<div class="clearfix">
<i class="fas fa-bed"></i>
You are currently sleeping at the Inn. Damage is paused.
</div>
</div>
{% else %}
<div class="due-today big-stat-group clearfix">
<div class="title">Due Today</div>
<div class="stat-group due">
<i class="fas fa-calendar"></i><span class="big-stat">{{user.tasks.dailyStats.dueCount}}</span> Dailies
</div>
<div class="stat-group due">
<i class="fas fa-check-circle"></i><span class="big-stat">{{user.tasks.todosDueToday.length}}</span> To Dos
</div>
</div>
<div class="estimated-damage big-stat-group">
<div class="title">Estimated Damage</div>
<div class="stat-group">
<i class="fas fa-user"></i><span class="big-stat">{{user.tasks.dailyStats.totalDamageToSelf}}</span> damage to you
</div>
{% if user.isOnBossQuest %}
<div class="stat-group">
<i class="fas fa-users"></i><span class="big-stat">{{user.tasks.dailyStats.bossDamage}}</span> damage to your party members
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}