Skip to content

Commit 2fb91f7

Browse files
committed
Add CSS class for timestamps
1 parent 5a0d8b7 commit 2fb91f7

3 files changed

Lines changed: 20 additions & 18 deletions

File tree

Designs/HitCounterGui.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2525
SOFTWARE.
2626
-->
27-
<title>HitCounter GUI</title>
27+
<title>Hitcounter GUI</title>
2828
<script type="text/javascript" src="javascript.js"></script>
2929
</head>
3030
<body>
@@ -279,16 +279,16 @@
279279

280280
// generate actual split table entry
281281
new_tbl += '<tr class="' + (d.split_active == i ? 'current' : (d.high_contrast ? (i%2==0 ? 'even' : 'odd') : '')) + '">' +
282-
'<td class="' + s.class_name + highlight_class + bottom_class + ' left">' + s.name + '</td>' + // Split
283-
(!d.show_hits || !d.show_hitscombined ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? (hits_blank ? "-" : (d.use_roman ? IntToRomanStr(s.hits_combined) : s.hits_combined)) : ShowCrossOrCheckMark(hits_blank ? -1 : (d.purpose == 3 && !s.hitless ? 1 : s.hits_combined))) + '</td>') + // Now
284-
(!d.show_hits || d.show_hitscombined ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? (hits_blank ? "-" : (d.use_roman ? IntToRomanStr(s.hits_boss ) : s.hits_boss )) : ShowCrossOrCheckMark(hits_blank ? -1 : (d.purpose == 3 && !s.hitless ? 1 : s.hits_boss ))) + '</td>'+ // Boss
285-
'<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? (hits_blank ? "-" : (d.use_roman ? IntToRomanStr(s.hits_way ) : s.hits_way )) : ShowCrossOrCheckMark(hits_blank ? -1 : (d.purpose == 3 && !s.hitless ? 1 : s.hits_way ))) + '</td>') + // Way
286-
(!d.show_numbers || !d.show_diff ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (!s.reached || (hits_blank && ((s.hits_combined - s.hits_pb) == 0)) ? "-" : IntToStringSigned(s.hits_combined - s.hits_pb)) + '</td>') + // Diff
287-
(!d.show_pb ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? '&nbsp;' + (d.use_roman ? IntToRomanStr(s.hits_pb) : s.hits_pb) + (d.show_pb_totals ? (d.supPB ? '<sub>&nbsp;' : '') + '(' + s.comulative_pb + ')' + (d.supPB ? '</sub>' : '') : '') : ShowCrossOrCheckMark(d.purpose == 3 && !s.hitless_pb ? 1 : s.hits_pb)) + '</td>') + // PB
288-
(!d.show_time ? '' : '<td class="' + highlight_class + bottom_class + ' right">' + (d.split_active == i ? BuildSpan('time_split_current', '', comulative_time_duration_str) : (!s.reached && s.duration == 0 ? empty_str : comulative_time_duration_str)) + '</td>') + // Time
289-
(!d.show_time_diff ? '' : '<td class="' + s.class_time + highlight_class + bottom_class + ' right">' + (0 < s.duration_pb ? (d.split_active == i ? BuildSpan('time_split_diff', s.class_time, comulative_time_diff_str ) : (!s.reached && s.duration == 0 ? empty_str : comulative_time_diff_str )) : empty_str) + '</td>') + // Diff (Time)
290-
(!d.show_time_pb ? '' : '<td class="' + highlight_class + bottom_class + ' right">' + (0 < s.duration_pb ? IntToTimeStr(s.comulative_time_pb, false) : empty_str) + '</td>') + // PB (Time)
291-
(!d.show_session_progress ? '' : '<td class="' + highlight_class + bottom_class + '">' + (d.session_progress == i ? ShowSessionProgress() : '&nbsp;') + '</td>') + // Star
282+
'<td class="' + s.class_name + highlight_class + bottom_class + ' left">' + s.name + '</td>' + // Split
283+
(!d.show_hits || !d.show_hitscombined ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? (hits_blank ? "-" : (d.use_roman ? IntToRomanStr(s.hits_combined) : s.hits_combined)) : ShowCrossOrCheckMark(hits_blank ? -1 : (d.purpose == 3 && !s.hitless ? 1 : s.hits_combined))) + '</td>') + // Now
284+
(!d.show_hits || d.show_hitscombined ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? (hits_blank ? "-" : (d.use_roman ? IntToRomanStr(s.hits_boss ) : s.hits_boss )) : ShowCrossOrCheckMark(hits_blank ? -1 : (d.purpose == 3 && !s.hitless ? 1 : s.hits_boss ))) + '</td>'+ // Boss
285+
'<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? (hits_blank ? "-" : (d.use_roman ? IntToRomanStr(s.hits_way ) : s.hits_way )) : ShowCrossOrCheckMark(hits_blank ? -1 : (d.purpose == 3 && !s.hitless ? 1 : s.hits_way ))) + '</td>') + // Way
286+
(!d.show_numbers || !d.show_diff ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (!s.reached || (hits_blank && ((s.hits_combined - s.hits_pb) == 0)) ? "-" : IntToStringSigned(s.hits_combined - s.hits_pb)) + '</td>') + // Diff
287+
(!d.show_pb ? '' : '<td class="' + s.class_hits + highlight_class + bottom_class + '">' + (d.show_numbers ? '&nbsp;' + (d.use_roman ? IntToRomanStr(s.hits_pb) : s.hits_pb) + (d.show_pb_totals ? (d.supPB ? '<sub>&nbsp;' : '') + '(' + s.comulative_pb + ')' + (d.supPB ? '</sub>' : '') : '') : ShowCrossOrCheckMark(d.purpose == 3 && !s.hitless_pb ? 1 : s.hits_pb)) + '</td>') + // PB
288+
(!d.show_time ? '' : '<td class="' + highlight_class + bottom_class + ' timestamp right">' + (d.split_active == i ? BuildSpan('time_split_current', '', comulative_time_duration_str) : (!s.reached && s.duration == 0 ? empty_str : comulative_time_duration_str)) + '</td>') + // Time
289+
(!d.show_time_diff ? '' : '<td class="' + s.class_time + highlight_class + bottom_class + ' right">' + (0 < s.duration_pb ? (d.split_active == i ? BuildSpan('time_split_diff', s.class_time, comulative_time_diff_str ) : (!s.reached && s.duration == 0 ? empty_str : comulative_time_diff_str )) : empty_str) + '</td>') + // Diff (Time)
290+
(!d.show_time_pb ? '' : '<td class="' + highlight_class + bottom_class + ' timestamp right">' + (0 < s.duration_pb ? IntToTimeStr(s.comulative_time_pb, false) : empty_str) + '</td>') + // PB (Time)
291+
(!d.show_session_progress ? '' : '<td class="' + highlight_class + bottom_class + '">' + (d.session_progress == i ? ShowSessionProgress() : '&nbsp;') + '</td>') + // Star
292292
'</tr>';
293293
}
294294
}
@@ -337,9 +337,9 @@
337337
}
338338

339339
new_tbl +=
340-
(!d.show_time ? '' : '<td class="' + majorclass + ' bottom right">' + BuildSpan('time_total_current', '', IntToTimeStr(total_time_current, true)) + '</td>') + // Total Time
341-
(!d.show_time_diff ? '' : '<td class="' + majorclass + ' bottom right">' + BuildSpan('time_total_diff', time_class, DiffToTimeStr(total_time_current - total_time_pb, true)) + '</td>') + // Diff between Total Time and Total PB (Time)
342-
(!d.show_time_pb ? '' : '<td class="' + majorclass + ' bottom right">' + IntToTimeStr(total_time_pb, true) + '</td>') + // Total PB (Time)
340+
(!d.show_time ? '' : '<td class="' + majorclass + ' bottom timestamp right">' + BuildSpan('time_total_current', '', IntToTimeStr(total_time_current, true)) + '</td>') + // Total Time
341+
(!d.show_time_diff ? '' : '<td class="' + majorclass + ' bottom timestamp right">' + BuildSpan('time_total_diff', time_class, DiffToTimeStr(total_time_current - total_time_pb, true)) + '</td>') + // Diff between Total Time and Total PB (Time)
342+
(!d.show_time_pb ? '' : '<td class="' + majorclass + ' bottom timestamp right">' + IntToTimeStr(total_time_pb, true) + '</td>') + // Total PB (Time)
343343
(!d.show_session_progress ? '' : '<td class="' + majorclass + ' bottom">&nbsp;</td>') + // Star
344344
'</tr>';
345345

@@ -355,15 +355,15 @@
355355
new_tbl +=
356356
'<tr>' +
357357
'<td class="' + majorclass + ' bottom left">Time:</td>' + // Time
358-
'<td colspan="' + hit_cols + '" class="' + majorclass + ' bottom"><span id="time_total_footer">' + IntToTimeStr(total_time_current, true) + '</span></td>' + // Total Time (Footer)
358+
'<td colspan="' + hit_cols + '" class="' + majorclass + ' bottom timestamp"><span id="time_total_footer">' + IntToTimeStr(total_time_current, true) + '</span></td>' + // Total Time (Footer)
359359
'<td colspan="' + (max_cols-1-hit_cols) + '" class="' + majorclass + ' bottom">&nbsp;</td>' + // Filler
360360
'</tr>';
361361
}
362362
else if ((d.purpose == 1 /*DeathCounter*/) || (d.purpose == 2 /*Checklist*/))
363363
{
364364
new_tbl +=
365365
'<tr class="' + (d.high_contrast ? 'even' : '') + '">' +
366-
'<td colspan="' + max_cols + '" class="bottom left">Time: <span id="time_total_footer">' + IntToTimeStr(total_time_current, true) + '</span></td>' + // Total Time (Footer)
366+
'<td colspan="' + max_cols + '" class="bottom timestamp left">Time: <span id="time_total_footer">' + IntToTimeStr(total_time_current, true) + '</span></td>' + // Total Time (Footer)
367367
'</tr>';
368368
}
369369
}

Designs/stylesheet.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*MIT License
22
3-
//Copyright (c) 2018-2020 Peter Kirmeier
3+
//Copyright (c) 2018-2022 Peter Kirmeier
44
55
//Permission is hereby granted, free of charge, to any person obtaining a copy
66
//of this software and associated documentation files (the "Software"), to deal
@@ -52,6 +52,7 @@ td { padding: 2px 2px 2px 2px; } /* top, right, bottom, left */
5252

5353
.major { font-size: 23px; }
5454
.highlight { font-size: 25px; }
55+
.timestamp { color: #FFFFFF; }
5556
.dark { background-color: #000000; }
5657
.better { color: #00FF33; } /* as progress_better background-color*/
5758
.neither { color: #FF9999; } /* as progress_neither background-color*/

Designs/stylesheet_pink.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*MIT License
22
3-
//Copyright (c) 2018-2020 Peter Kirmeier
3+
//Copyright (c) 2018-2022 Peter Kirmeier
44
55
//Permission is hereby granted, free of charge, to any person obtaining a copy
66
//of this software and associated documentation files (the "Software"), to deal
@@ -52,6 +52,7 @@ td { padding: 2px 2px 2px 2px; } /* top, right, bottom, left */
5252

5353
.major { font-size: 20px; }
5454
.highlight { font-size: 22px; }
55+
.timestamp { color: #FF99CC; }
5556
.dark { background-color: #000000; }
5657
.better { color: #FF5BAD; } /* as progress_better background-color*/
5758
.neither { color: #CC9933; } /* as progress_neither background-color*/

0 commit comments

Comments
 (0)