Files
stl/templates/stats.hbs
2020-11-11 22:54:17 +01:00

52 lines
2.0 KiB
Handlebars

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<link rel="icon" type="image/png" href="/static/icon.png">
<link rel="stylesheet" href="/static/styles.css">
<link rel="stylesheet" href="/static/charts.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu|Ubuntu+Mono&display=swap">
<title>stl</title>
</head>
<body>
<h1 class="title">stl</h1>
{{#each categories_stats}}
{{#if this.last_session_start}}
<div class="hline"></div>
<h2>
<span>Senaste session:</span>
<span class="history_entry_started">{{pretty_datetime this.last_session_start}}</span>
<span>i</span>
<span class="history_entry_duration">{{pretty_seconds this.secs_last_session}}</span>
</h2>
<h2>
<span>Denna veckan:</span>
<span class="history_entry_duration">{{pretty_seconds this.secs_last_week}}</span>
</h2>
<h2>
<span>Denna månaden:</span>
<span class="history_entry_duration">{{pretty_seconds this.secs_last_month}}</span>
</h2>
<h2>Andel per timme:</h2>
<div class="chart_histogram">
{{#each this.bars}}
<div class="chart_histogram_col">
<div style="flex-basis: {{this.2}}%;"></div>
<div class="chart_histogram_col_line chart_col_tooltip" style="flex-basis: {{this.1}}%;">
<span class="chart_col_tooltiptext">{{this.1}}&percnt;</span>
</div>
<div class="chart_histogram_col_label">{{this.0}}</div>
</div>
{{/each}}
</div>
{{/if}}
{{/each}}
</body>
</html>