27 lines
703 B
Plaintext
Raw Normal View History

2017-07-07 10:10:27 +00:00
component Statistics(pieCharts ...*arn.PieChart)
2017-07-07 10:52:24 +00:00
h1.page-title Statistics
2017-07-07 00:07:34 +00:00
2017-07-07 08:57:48 +00:00
StatisticsHeader
2017-07-07 01:22:29 +00:00
.widgets.statistics
each pie in pieCharts
.widget
h3.widget-title= pie.Title
PieChart(pie.Slices)
2017-07-07 00:07:34 +00:00
2017-07-07 08:57:48 +00:00
component StatisticsHeader
.buttons.tabs
a.button.tab.action(href="/statistics", data-action="diff", data-trigger="click")
Icon("user")
2017-07-07 10:13:41 +00:00
span Users
2017-07-07 08:57:48 +00:00
a.button.tab.action(href="/statistics/anime", data-action="diff", data-trigger="click")
Icon("tv")
span Anime
2017-07-07 10:10:27 +00:00
component PieChart(slices []*arn.PieChartSlice)
2017-07-07 01:22:29 +00:00
svg.pie-chart(viewBox="-1.1 -1.1 2.2 2.2")
2017-07-07 00:37:43 +00:00
each slice in slices
g
title= slice.Title
path.slice(d=utils.SVGSlicePath(slice.From, slice.To), fill=slice.Color)