Add stats_single page & header with links
This commit is contained in:
33
templates/stats_chart.hbs
Normal file
33
templates/stats_chart.hbs
Normal 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}}%</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}}%</span>
|
||||
</div>
|
||||
<div class="chart_histogram_col_label">{{this.0}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user