add image prefetches

This commit is contained in:
Rhiannon Morris 2020-07-25 13:59:04 +02:00
parent b5973a60d5
commit 21bdb28c65

View file

@ -39,6 +39,8 @@ make' nsfw dir (Info {date, title, artist, tags, nsfwTags,
<link rel=stylesheet href=/style/shiny/single.css title=shiny> <link rel=stylesheet href=/style/shiny/single.css title=shiny>
<link rel='alternate stylesheet' href=/style/tum/single.css title=tummy> <link rel='alternate stylesheet' href=/style/tum/single.css title=tummy>
$0.prefetches
<title>$*title</title> <title>$*title</title>
<header> <header>
@ -91,6 +93,9 @@ make' nsfw dir (Info {date, title, artist, tags, nsfwTags,
tagsList = makeTags nsfw tags nsfwTags tagsList = makeTags nsfw tags nsfwTags
linksList = extLinks nsfw links linksList = extLinks nsfw links
prefetches = map makePrefetch $ tail images
makePrefetch (Image {path}) = [b|<link rel=prefetch href=$@path>|]
warning' = ifJust (#warning image0) \w -> [b|@4 warning' = ifJust (#warning image0) \w -> [b|@4
<figcaption id=cw> <figcaption id=cw>
<span id=cw-text>cw: <b>$*w</b></span> <span id=cw-text>cw: <b>$*w</b></span>