-
$4.items
{-# LANGUAGE TransformListComp #-} module GalleryPage (make) where 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, sortOn) import qualified Data.Text.Lazy as Lazy import qualified Data.Time as Time import System.FilePath (takeDirectory, joinPath, splitPath) import GHC.Exts (Down (..), the) import BuilderQQ import Info 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