-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLaborTracker.html
179 lines (162 loc) · 5.51 KB
/
LaborTracker.html
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<head>
<title>Labor Tracker</title>
<link href='http://fonts.googleapis.com/css?family=Lustria' rel='stylesheet' type='text/css'>
</head>
<body>
{{> main}}
</body>
<template name="needsession">
<h1>Labor Tracker</h1>
<div class="needsession">Enter a unique name (no spaces) for your data. You can share it with a group of friends or your guild or whatever, but anyone who has the name can add/delete/modify the data.</div>
<input id="sessionname" class="needsession" type="text" value=""><input class="sessionnamesubmit" type="button" value="Go!">
</template>
<template name="help">
<div class="help">Page automatically updates while it is open. Most of the fields can be updated by clicking on them.</div>
</template>
<template name="main">
{{#if is_readonly}}
{{> readonly}}
{{/if}}
{{#if need_session}}
{{> needsession}}
{{else}}
<h1>Labor Tracker</h1>
{{> help}}
{{> characters}}
{{#if show_timers}}
{{> timers}}
{{/if}}
<div class="newlisthint"><a href="/">Go here to create your own list</a></div>
{{/if}}
</template>
<template name="readonly">
<div class="readonly"><p>This Labor Tracker is in <strong>read-only</strong> mode to serve as an example of what the app looks like and how it works.
<br>You will need to fork the project on GitHub to deploy your own personal version!</p></div>
<a href="https://github.com/overloadut/LaborTracker"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
</template>
<template name="characters">
<table class="characters" cellpadding="0" cellspacing="0">
<tr>
<th class="actions"></th>
<th class="name">Name</th>
<th class="labormax">Max</th>
<th class="labor">Labor</th>
<th class="maxtime">Cap Time</th>
</tr>
{{#each characters}}
{{> character}}
{{/each}}
<tr>
<td class="actions">
<a class="add" href="javascript:return false">Add</a>
</td>
</tr>
</table>
</template>
<template name="timers">
<h2>Timers</h2>
<table class="timers" cellpadding="0" cellspacing="0">
<tr>
<th class="actions"></th>
<th class="name">Name</th>
<th class="timeleft">Timer</th>
<th class="endtime">End Time</th>
</tr>
{{#each timers}}
{{> timer}}
{{/each}}
<tr>
<td class="actions">
<a class="add" href="javascript:return false">Add</a>
</td>
</tr>
</table>
</template>
<template name="timer">
<tr>
<td class="actions">
<a class="remove" href="javascript:return false">Remove</a>
</td>
<td class="name">
{{#if editingname}}
<div class="editname">
<input class="inline timer-name-input" id="timer-name-input" type="text" value="{{name}}" />
</div>
{{else}}
<div class="name clickable">{{name}}</div>
{{/if}}
</td>
<td class="timeleft">
<div class="timerbarcontainer">
<div class="timerbar" style="width: {{percentage}}%;">
</div>
</div>
<div class="timeleftcontent">
{{#if editingtimeleft}}
<div class="edittimeleft">
<input class="inline timer-timeleft-input" id="timer-timeleft-input" type="text" value="{{timeleftinput}}" />
</div>
{{else}}
{{#if timerdone}}
<div class="timeleft clickable warning">Timer finished {{timeleft}} ago</div>
{{else}}
<div class="timeleft clickable">{{timeleft}}</div>
{{/if}}
{{/if}}
</div>
</td>
<td class="endtime">{{endtimestring}}</td>
</tr>
</template>
<template name="character">
<tr>
<td class="actions">
<a class="remove" href="javascript:return false">Remove</a>
</td>
<td class="name">
{{#if editingname}}
<div class="editname">
<input class="inline character-name-input" id="character-name-input" type="text" value="{{name}}" />
</div>
{{else}}
<div class="name clickable">{{name}}</div>
{{/if}}
</td>
<td class="labormax">
{{#if editinglabormax}}
<div class="editlabormax">
<input class="inline character-labormax-input" id="character-labormax-input" type="text" value="{{labormax}}" />
</div>
{{else}}
<div class="labormax clickable">{{labormax}}</div>
{{/if}}
</td>
<td class="labor">
<div class="maxcontainer" style="width: {{percentagemax}}%;">
<div class="innercontainer" style="width: {{percentage}}%">
</div>
</div>
<div class="laborcontent">
{{#if editinglabor}}
<div class="editlabor">
<input class="inline character-labor-input" id="character-labor-input" type="text" value="{{currentlabor}}" />
</div>
{{else}}
<div class="labor clickable">
<span class="currentlabor">{{currentlaborcapped}}</span>
{{#if laborcapped}}
<span class="laborwaste warning">({{laborwaste}} wasted!)</span>
{{/if}}
</div>
{{/if}}
</div>
</td>
<td class="maxtime">
<div class="maxtime">{{maxtimestring}}</div>
</td>
</tr>
</template>