27 lines
692 B
Plaintext
27 lines
692 B
Plaintext
component Statistics(pieCharts ...*arn.PieChart)
|
|
h1 Statistics
|
|
|
|
StatisticsHeader
|
|
|
|
.widgets.statistics
|
|
each pie in pieCharts
|
|
.widget
|
|
h3.widget-title= pie.Title
|
|
PieChart(pie.Slices)
|
|
|
|
component StatisticsHeader
|
|
.buttons.tabs
|
|
a.button.tab.action(href="/statistics", data-action="diff", data-trigger="click")
|
|
Icon("user")
|
|
span Users
|
|
|
|
a.button.tab.action(href="/statistics/anime", data-action="diff", data-trigger="click")
|
|
Icon("tv")
|
|
span Anime
|
|
|
|
component PieChart(slices []*arn.PieChartSlice)
|
|
svg.pie-chart(viewBox="-1.1 -1.1 2.2 2.2")
|
|
each slice in slices
|
|
g
|
|
title= slice.Title
|
|
path.slice(d=utils.SVGSlicePath(slice.From, slice.To), fill=slice.Color) |