(re-)add tag counts to filter list
This commit is contained in:
parent
cb7d2fe45d
commit
ce13806c97
2 changed files with 7 additions and 2 deletions
|
@ -107,10 +107,10 @@ make' root (GalleryInfo {title, desc, prefix, filters, hidden}) infos = [b|@0
|
||||||
| otherwise = "/style/card.png"
|
| otherwise = "/style/card.png"
|
||||||
|
|
||||||
makeFilter :: Text -> HashSet Text -> Text -> Int -> Builder
|
makeFilter :: Text -> HashSet Text -> Text -> Int -> Builder
|
||||||
makeFilter prefix initial tag _count = [b|@8
|
makeFilter prefix initial tag count = [b|@8
|
||||||
<li>
|
<li>
|
||||||
<input type=checkbox id="$id'" value="$tag"$checked>
|
<input type=checkbox id="$id'" value="$tag"$checked>
|
||||||
<label for="$id'">$tag</label>
|
<label for="$id'" data-count=$count>$tag</label>
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
id' = [b|$prefix$&_$tag'|]
|
id' = [b|$prefix$&_$tag'|]
|
||||||
|
|
|
@ -80,6 +80,11 @@ body {
|
||||||
border: none;
|
border: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
#filters label[data-count]::after {
|
||||||
|
content: '(' attr(data-count) ')';
|
||||||
|
font-size: 80%;
|
||||||
|
padding-left: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
Loading…
Reference in a new issue