simplify some css selectors

(by adding more classes & ids :( )
This commit is contained in:
Rhiannon Morris 2020-08-04 18:58:40 +02:00
parent f312230110
commit 8d2422ad5b
7 changed files with 53 additions and 53 deletions

View file

@ -105,7 +105,7 @@ makeArtist (Artist {name, url}) =
makeDesc :: Strict.Text -> Builder
makeDesc desc = [b|@4
<section id=desc>
<section id=desc class=info-section>
<h2>about</h2>
<div>
$8*desc
@ -120,7 +120,7 @@ makeButtonBar title images =
1 -> ""
_ -> [b|@0
<nav id=alts aria-label="alternate versions">
<ul class="buttonbar choice">
<ul class="buttonbar bb-choice">
$4.alts
</ul>
</nav>
@ -133,21 +133,22 @@ altButton i (Image {label, path, nsfw, warning}) = [b|@4
<input type=radio$checked id="$idLabel" name=variant
autocomplete=off value="$@path'"
data-link="$@path"$warning'>
<label for="$idLabel">$*label</label>
<label for="$idLabel"$nsfwLabelClass>$*label</label>
|]
where
nsfwClass = if nsfw then " class=nsfw" else ""
checked = if i == 0 then " checked" else ""
idLabel = escId label
path' = pageFile path
warning' = ifJust warning \w -> [b| data-warning="$*w"|]
nsfwClass = if nsfw then " class=nsfw" else ""
nsfwLabelClass = if nsfw then " class=nsfw-label" else ""
checked = if i == 0 then " checked" else ""
idLabel = escId label
path' = pageFile path
warning' = ifJust warning \w -> [b| data-warning="$*w"|]
makeTags :: [Strict.Text] -> Builder
makeTags tags =
if null tags then "" else [b|@4
<nav id=tags class=info-section>
<h2>tags</h2>
<ul class=buttonbar>
<ul class="buttonbar bb-links">
$8.tagList
</ul>
</nav>