record wild cards are bad actually
This commit is contained in:
parent
ef7f2685c0
commit
3cd7bc98f6
2 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ make :: Info -> Lazy.Text
|
||||||
make = toLazyText . make'
|
make = toLazyText . make'
|
||||||
|
|
||||||
make' :: Info -> Builder
|
make' :: Info -> Builder
|
||||||
make' (Info {..}) =
|
make' (Info {date, title, tags, description, images, links}) =
|
||||||
"<!DOCTYPE html>\n" <>
|
"<!DOCTYPE html>\n" <>
|
||||||
"<html lang=en>\n" <>
|
"<html lang=en>\n" <>
|
||||||
"<meta charset=utf-8>\n" <>
|
"<meta charset=utf-8>\n" <>
|
||||||
|
@ -46,7 +46,7 @@ make' (Info {..}) =
|
||||||
" <a href=../>back to gallery</a>\n" <>
|
" <a href=../>back to gallery</a>\n" <>
|
||||||
"</nav>\n"
|
"</nav>\n"
|
||||||
where
|
where
|
||||||
path0 = let Image {..} = Vector.head images in fromText path
|
path0 = let Image {path} = Vector.head images in fromText path
|
||||||
|
|
||||||
|
|
||||||
esc :: Strict.Text -> Builder
|
esc :: Strict.Text -> Builder
|
||||||
|
@ -62,7 +62,7 @@ formatDate :: Day -> Builder
|
||||||
formatDate = fromString . formatTime defaultTimeLocale "%e %#B %Y"
|
formatDate = fromString . formatTime defaultTimeLocale "%e %#B %Y"
|
||||||
|
|
||||||
altButton :: Int -> Image -> Builder
|
altButton :: Int -> Image -> Builder
|
||||||
altButton i (Image {..}) =
|
altButton i (Image {label, path, nsfw}) =
|
||||||
" <li>\n" <>
|
" <li>\n" <>
|
||||||
" <input type=radio " <> checked <> "id=\"" <> idLabel <> "\" " <>
|
" <input type=radio " <> checked <> "id=\"" <> idLabel <> "\" " <>
|
||||||
"name=variant autocomplete=off\n" <>
|
"name=variant autocomplete=off\n" <>
|
||||||
|
@ -88,7 +88,7 @@ indent n txt = spaces <> go (Strict.unpack txt) where
|
||||||
spaces = fromString $ replicate n ' '
|
spaces = fromString $ replicate n ' '
|
||||||
|
|
||||||
extLink :: Link -> Builder
|
extLink :: Link -> Builder
|
||||||
extLink (Link {..}) =
|
extLink (Link {title, url}) =
|
||||||
" <li>\n" <>
|
" <li>\n" <>
|
||||||
" <a href=\"" <> fromText url <> "\">\n" <>
|
" <a href=\"" <> fromText url <> "\">\n" <>
|
||||||
" " <> fromText title <> "\n" <>
|
" " <> fromText title <> "\n" <>
|
||||||
|
|
|
@ -15,8 +15,8 @@ executable make-pages
|
||||||
BlockArguments,
|
BlockArguments,
|
||||||
DuplicateRecordFields,
|
DuplicateRecordFields,
|
||||||
LambdaCase,
|
LambdaCase,
|
||||||
OverloadedStrings,
|
NamedFieldPuns,
|
||||||
RecordWildCards
|
OverloadedStrings
|
||||||
build-depends:
|
build-depends:
|
||||||
base ^>= 4.12.0.0,
|
base ^>= 4.12.0.0,
|
||||||
containers ^>= 0.6.0.1,
|
containers ^>= 0.6.0.1,
|
||||||
|
|
Loading…
Reference in a new issue