Add cli & lib crates

This commit is contained in:
2021-04-22 15:13:28 +02:00
parent e39cffa3f6
commit 3a9ecc398a
53 changed files with 5065 additions and 99 deletions

View File

@ -0,0 +1,33 @@
<div>
<div class="hline"></div>
<h2>
<span>Kategori:</span>
<a href="/stats/{{category_id}}">{{category.name}}</a>
<span style="color: {{category.color}};">●</span>
</h2>
<h2>
<span>Senaste session:</span>
<span class="history_entry_started">{{pretty_datetime last_session_start}}</span>
<span>i</span>
<span class="history_entry_duration">{{pretty_seconds secs_last_session}}</span>
</h2>
<h2>
<span>Senaste veckan:</span>
<span class="history_entry_duration">{{pretty_seconds secs_last_week}}</span>
<span>Senaste månaden:</span>
<span class="history_entry_duration">{{pretty_seconds secs_last_month}}</span>
</h2>
<h2>Andel per timme:</h2>
<div class="chart_histogram">
<div class="chart_histogram_legend">{{bars_max}}&percnt;</div>
{{#each bars}}
<div class="chart_histogram_col">
<div style="flex-grow: {{this.2}};"></div>
<div class="chart_histogram_col_line chart_col_tooltip" style="flex-grow: {{this.1}};">
<span class="chart_col_tooltiptext">{{this.1}}&percnt;</span>
</div>
<div class="chart_histogram_col_label">{{this.0}}</div>
</div>
{{/each}}
</div>
</div>