hide tags only used once initially

This commit is contained in:
Rhiannon Morris 2021-03-13 05:29:57 +01:00
parent 4690b3597e
commit 1a6216a3d7
2 changed files with 3 additions and 2 deletions

View file

@ -118,7 +118,7 @@ make' root (GalleryInfo {title, desc, prefix, filters, hidden}) infos = [b|@0
makeFilter :: Text -> HashSet Text -> Text -> Int -> Builder
makeFilter prefix initial tag count = [b|@0
<li>
<li$hidden>
<input type=checkbox id="$id'" value="$tag"$checked>
<label for="$id'" data-count=$count>$tag</label>
|]
@ -126,6 +126,7 @@ makeFilter prefix initial tag count = [b|@0
id' = [b|$prefix$&_$tag'|]
tag' = escId tag
checked = if HashSet.member tag initial then [b| checked|] else ""
hidden = if count <= 1 then [b| hidden|] else ""
makeYearItems :: Bool -- ^ nsfw
-> Int -- ^ year

View file

@ -7,7 +7,7 @@ let allBoxes;
let tags;
let itemsByYear;
let showSingles = true;
let showSingles = false;
function fillSets() {