Rework stats display
This commit is contained in:
parent
9951842594
commit
cd2827791f
3 changed files with 86 additions and 24 deletions
|
@ -53,9 +53,11 @@ html
|
|||
outline: 1px solid black;
|
||||
}
|
||||
body.themed.theme-system.overflow-y-scroll(hx-boost="true")
|
||||
header.s-topbar
|
||||
header.s-topbar.ps-sticky.t0
|
||||
.s-topbar--container.wmx9
|
||||
.s-topbar--logo BC Explorer
|
||||
.s-topbar--logo
|
||||
!= icons.get("compass-solid", 24)
|
||||
.ml4 BC Explorer
|
||||
.fl-grow1
|
||||
nav
|
||||
ul.s-navigation
|
||||
|
@ -78,7 +80,7 @@ html
|
|||
block view
|
||||
|
||||
div
|
||||
.ps-sticky.t24.d-flex.fd-column.g12
|
||||
.ps-sticky.d-flex.fd-column.g12(style="top: 80px")
|
||||
if filter
|
||||
.s-sidebarwidget.s-sidebarwidget__blue.d-flex.ai-center.gx16.jc-space-between.p8.pl16
|
||||
!= icons.get("search")
|
||||
|
@ -87,8 +89,56 @@ html
|
|||
a.s-btn.s-notice--btn(href=and({filter: null, filter_field: null})) Clear
|
||||
.s-sidebarwidget.wmn3
|
||||
.s-sidebarwidget--header Collection
|
||||
a.s-sidebarwidget--action Refresh
|
||||
table.s-sidebarwidget--content.s-sidebarwidget__items
|
||||
each stat in count
|
||||
tr.s-sidebarwidget--item
|
||||
th= stat[0]
|
||||
td= stat[1]
|
||||
tr.s-sidebarwidget--item
|
||||
th items
|
||||
td= count.total
|
||||
tr.s-sidebarwidget--item
|
||||
th runtime
|
||||
td= count.runtime
|
||||
tr.s-sidebarwidget--item
|
||||
th format
|
||||
td
|
||||
= count.albums
|
||||
span.fc-black-400= ` albums`
|
||||
span.fc-black-250= ` / `
|
||||
= count.singles
|
||||
span.fc-black-400= ` singles`
|
||||
tr.s-sidebarwidget--item
|
||||
th price
|
||||
td
|
||||
= count.free
|
||||
span.fc-black-400= ` free`
|
||||
span.fc-black-250= ` / `
|
||||
= count.paid
|
||||
span.fc-black-400= ` paid`
|
||||
tr.s-sidebarwidget--item
|
||||
th tracks
|
||||
td
|
||||
= count.tracks
|
||||
span.pl8.fc-black-250= ` / `
|
||||
span.fc-black-400 avg #{count.avgTracks}
|
||||
tr.s-sidebarwidget--item
|
||||
th tags
|
||||
td
|
||||
= count.tags
|
||||
span.pl8.fc-black-250= ` / `
|
||||
span.fc-black-400 avg #{count.avgTags}
|
||||
span.fc-black-250= ` / `
|
||||
span.fc-black-400 lonely #{count.lonelyTags}
|
||||
tr.s-sidebarwidget--item
|
||||
th value
|
||||
td
|
||||
= `${count.displayCurrencySymbol}${count.value} `
|
||||
span.fc-black-400 #{count.displayCurrency}
|
||||
tr.s-sidebarwidget--item
|
||||
th diversity
|
||||
//- supernova red-500, warm yellow-500, hot orange-500
|
||||
//- 0-9 black, 10-99 yellow, 100-999 orange, 1000+ red
|
||||
td.w100
|
||||
.s-progress.d-grid.g2.h4.mtn6(style=`grid-template-columns: ${count.taste.map(t => t + "fr").join(" ")}`).bg-white.fc-black-400.fs-fine.lh-xxl
|
||||
.s-progress--bar.bg-black-400(title=`${count.taste[0]} labels with <20 fans`)= count.taste[0]
|
||||
.s-progress--bar.bg-yellow-400(title=`${count.taste[1]} labels with 20-199 fans`)= count.taste[1]
|
||||
.s-progress--bar.bg-orange-400(title=`${count.taste[2]} labels with 200-1999 fans`)= count.taste[2]
|
||||
.s-progress--bar.bg-red-400(title=`${count.taste[3]} labels with >2000 fans`)= count.taste[3]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue