move artist to main info for visiblity

This commit is contained in:
rhiannon morris 2024-07-07 19:45:50 +02:00
parent 06ca357d60
commit a1453db34a

View file

@ -45,8 +45,6 @@ make' root siteName prefix nsfw _dataDir dir
let undir = joinPath (replicate (length (splitPath dir)) "..") let undir = joinPath (replicate (length (splitPath dir)) "..")
let artistTag = ifJust artist makeArtist
let formattedDate = formatLong date let formattedDate = formatLong date
let buttonBar = makeButtonBar title $ addIds images let buttonBar = makeButtonBar title $ addIds images
@ -58,6 +56,7 @@ make' root siteName prefix nsfw _dataDir dir
let download0 = fromMaybe (bigFile path0) download0' let download0 = fromMaybe (bigFile path0) download0'
let path0' = pageFile path0 let path0' = pageFile path0
let artistSection = makeArtist artist
let descSection = makeDesc $ descFor nsfw info let descSection = makeDesc $ descFor nsfw info
let tagsList = makeTags undir $ tagsFor nsfw info let tagsList = makeTags undir $ tagsFor nsfw info
let linksList = extLinks $ linksFor nsfw info let linksList = extLinks $ linksFor nsfw info
@ -158,7 +157,6 @@ make' root siteName prefix nsfw _dataDir dir
$formattedDate $updateDate $formattedDate $updateDate
</h2> </h2>
<h2 class="left corner"> <h2 class="left corner">
$artistTag
<a href=$undir>back to gallery</a> <a href=$undir>back to gallery</a>
</h2> </h2>
</header> </header>
@ -174,6 +172,8 @@ make' root siteName prefix nsfw _dataDir dir
</figure> </figure>
<div id=info> <div id=info>
$6.artistSection
$6.descSection $6.descSection
$6.updatesList $6.updatesList
@ -193,9 +193,14 @@ make' root siteName prefix nsfw _dataDir dir
last' :: [a] -> Maybe a last' :: [a] -> Maybe a
last' xs = if null xs then Nothing else Just $ last xs last' xs = if null xs then Nothing else Just $ last xs
makeArtist :: Artist -> Builder makeArtist :: Maybe Artist -> Builder
makeArtist (Artist {name, url}) = makeArtist Nothing = ""
[b|by $artistLink <br>|] makeArtist (Just (Artist {name, url})) = [b|@0
<section id=desc class=info-section>
<h2>by</h2>
<div>$artistLink</div>
</section>
|]
where where
artistLink = case url of artistLink = case url of
Just u -> [b|<a href="$u">$name</a>|] Just u -> [b|<a href="$u">$name</a>|]
@ -271,8 +276,7 @@ makeButtonBar title images =
<label for=skipAll>skip warnings</label> <label for=skipAll>skip warnings</label>
</div> </div>
|] |]
else else ""
""
flatten :: [(Text, [(Image, a)])] -> [(Image, Text)] flatten :: [(Text, [(Image, a)])] -> [(Image, Text)]
flatten cats = flatten cats =