diff --git a/make-pages/SinglePage.hs b/make-pages/SinglePage.hs index 64b6828..e1a9509 100644 --- a/make-pages/SinglePage.hs +++ b/make-pages/SinglePage.hs @@ -191,19 +191,22 @@ makeButtonBar title images = where alts = map (\(i, (im, sz)) -> altButton i im sz) $ zip [0..] images altButton :: Int -> Image -> Size -> Builder -altButton i (Image {label, path, nsfw, warning}) (Size {width, height}) = [b|@0 +altButton i img size = [b|@0 |] where + Image {label, path, nsfw, warning, download} = img + Size {width, height} = size nsfwClass = if nsfw then [b| class=nsfw|] else "" nsfwLabelClass = if nsfw then [b| class=nsfw-label|] else "" checked = if i == 0 then [b| checked|] else "" idLabel = escId label path' = pageFile path + link = fromMaybe path download warning' = ifJust warning \(escAttr -> w) -> [b| data-warning="$w"|] makeTags :: FilePath -> [Strict.Text] -> Builder