From 9c11993f7e8a16c2db2da8ba9d725820c862e12a Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Tue, 9 Feb 2021 12:50:22 +0100 Subject: [PATCH] fix download links for multipart pics --- make-pages/SinglePage.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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