Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions static/css/cmatch.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@
background-repeat: no-repeat;
}

.match_duration_mins {
white-space: pre;
text-align: right;
padding-left: 1em;
}
.match_duration_mins span::after {
content: '';
display: inline-block;
width: 1em;
height: 1em;
}
.match_duration_mins span.match_duration_mins_display_active::after {
content: "min"; /* Unicode value for a heart */
/* font-size: 2rem; set font size */
}

.match_no_umpire {
font-style: italic;
}
Expand Down
11 changes: 11 additions & 0 deletions static/js/cmatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ function render_match_row(tr, match, court, style) {
'data-match_id': match._id,
}, calc_score_str(match));
}
if (style === 'default' || style === 'plain') {
const duration_mins = match.duration_ms ? Math.floor(match.duration_ms / 60000) : 0;
const duration_td = uiu.el(tr, 'td', 'match_duration_mins');
uiu.el(duration_td, 'span', {
'class': (
'match_duration_mins_display' +
(duration_mins ? ' match_duration_mins_display_active' : '')
),
'data-match_id': match._id,
}, duration_mins || '');
}
if (style === 'default' || style === 'plain') {
const shuttle_td = uiu.el(tr, 'td', 'match_shuttle_count');
uiu.el(shuttle_td, 'span', {
Expand Down