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 where
galleryList = if null galleries then "" else [b|@2 galleryList = if null galleries then "" else [b|@2
<ul id=gallery-list class=list> <nav aria-label="gallery list">
$4.items <ul id=gallery-list class=list>
</ul> $6.items
</ul>
</nav>
|] |]
where items = map makeItem galleries where items = map makeItem galleries
linkList = if null links then "" else [b|@2 linkList = if null links then "" else [b|@2
<ul id=link-list class=list> <nav aria-label="other links">
$4.items <ul id=link-list class=list>
</ul> $6.items
</ul>
</nav>
|] |]
where items = map makeLink links where items = map makeLink links
footer' = case footer of footer' = case footer of
@ -50,13 +54,13 @@ make' (IndexInfo {title, galleries, links, footer}) = [b|@0
|] |]
makeItem :: GalleryInfo -> Builder 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> <li$nsfw><a href=$@prefix title="$*desc">$*title</a></li>
|] |]
where nsfw = if hasNsfw filters then " class=nsfw" else "" where nsfw = if hasNsfw filters then " class=nsfw" else ""
makeLink :: Link -> Builder makeLink :: Link -> Builder
makeLink (Link {title, url, nsfw}) = [b|@4 makeLink (Link {title, url, nsfw}) = [b|@6
<li$nsfw'><a href=$*url>$*title</a> <li$nsfw'><a href=$*url>$*title</a>
|] |]
where nsfw' = if nsfw then " class=nsfw" else "" 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> <main>
<figure id=mainfig> <figure id=mainfig>
$warning' $warning'
<a id=mainlink href="$@download0"> <a id=mainlink href="$@download0" title="download full version">
<img id=mainimg src="$@path0'"> <img id=mainimg src="$@path0'" alt="">
</a> </a>
</figure> </figure>