add nsfw class to relevant gallery items

but only on galleries showing nsfw at all
This commit is contained in:
Rhiannon Morris 2020-07-18 11:40:56 +02:00
parent 0ffebd2a00
commit 4a08a6bb9a
4 changed files with 23 additions and 11 deletions

View file

@ -63,13 +63,15 @@ dependGallery' (GalleryInfo {title, prefix, filters}) infos' build data_ tmp =
$@path: $@pages' $@files'
echo "[gallery] "$$@
mkdir -p $$(dir $$@)
$$(MAKEPAGES) $$(MPFLAGS) gallery -t "$*title" -o "$$@" \
$$(MAKEPAGES) $$(MPFLAGS) gallery -t "$*title" $flags -o "$$@" \
$$(filter $$(DATADIR)/%/$$(INFONAME),$$^)
$rules
$incs
|]
where
flags = filtersToFlags filters
makeRules :: FilePath -- ^ prefix
-> GalleryFilters