-
$6.items
{-# LANGUAGE TransformListComp #-} module GalleryPage (make) where import BuilderQQ import Date import Info import qualified NsfwWarning import Control.Monad import Data.Foldable import Data.Function (on, (&)) import qualified Data.HashMap.Strict as HashMap import Data.HashSet (HashSet) import qualified Data.HashSet as HashSet import Data.List (intersperse, groupBy, sortBy, sort) import Data.Maybe import qualified Data.Text.Lazy as Lazy import System.FilePath (takeDirectory, joinPath, splitPath) import GHC.Exts (Down (..), the) make :: Text -> GalleryInfo -> [(FilePath, Info)] -> Lazy.Text make root ginfo infos = toLazyText $ make' root ginfo infos make' :: Text -> GalleryInfo -> [(FilePath, Info)] -> Builder make' root (GalleryInfo {title, desc, prefix, filters, hidden}) infos = [b|@0 $0.nsfwScript