more markup fixes

This commit is contained in:
Rhiannon Morris 2020-08-04 18:56:44 +02:00
parent 5d5e3bacbb
commit f312230110
2 changed files with 14 additions and 10 deletions

View File

@ -30,15 +30,19 @@ make' (IndexInfo {title, galleries, links, footer}) = [b|@0
|]
where
galleryList = if null galleries then "" else [b|@2
<ul id=gallery-list class=list>
$4.items
</ul>
<nav aria-label="gallery list">
<ul id=gallery-list class=list>
$6.items
</ul>
</nav>
|]
where items = map makeItem galleries
linkList = if null links then "" else [b|@2
<ul id=link-list class=list>
$4.items
</ul>
<nav aria-label="other links">
<ul id=link-list class=list>
$6.items
</ul>
</nav>
|]
where items = map makeLink links
footer' = case footer of
@ -50,13 +54,13 @@ make' (IndexInfo {title, galleries, links, footer}) = [b|@0
|]
makeItem :: GalleryInfo -> Builder
makeItem (GalleryInfo {title, desc, prefix, filters}) = [b|@4
makeItem (GalleryInfo {title, desc, prefix, filters}) = [b|@6
<li$nsfw><a href=$@prefix title="$*desc">$*title</a></li>
|]
where nsfw = if hasNsfw filters then " class=nsfw" else ""
makeLink :: Link -> Builder
makeLink (Link {title, url, nsfw}) = [b|@4
makeLink (Link {title, url, nsfw}) = [b|@6
<li$nsfw'><a href=$*url>$*title</a>
|]
where nsfw' = if nsfw then " class=nsfw" else ""

View File

@ -51,8 +51,8 @@ make' nsfw dir info@(Info {date, title, artist}) = [b|@0
<main>
<figure id=mainfig>
$warning'
<a id=mainlink href="$@download0">
<img id=mainimg src="$@path0'">
<a id=mainlink href="$@download0" title="download full version">
<img id=mainimg src="$@path0'" alt="">
</a>
</figure>