add nsfw class to alt buttons
This commit is contained in:
parent
3cd7bc98f6
commit
be4b539138
1 changed files with 2 additions and 1 deletions
|
@ -63,12 +63,13 @@ formatDate = fromString . formatTime defaultTimeLocale "%e %#B %Y"
|
|||
|
||||
altButton :: Int -> Image -> Builder
|
||||
altButton i (Image {label, path, nsfw}) =
|
||||
" <li>\n" <>
|
||||
" <li" <> nsfwClass <> ">\n" <>
|
||||
" <input type=radio " <> checked <> "id=\"" <> idLabel <> "\" " <>
|
||||
"name=variant autocomplete=off\n" <>
|
||||
" value=\"" <> fromText path <> "\">\n" <>
|
||||
" <label for=\"" <> idLabel <> "\">" <> fromText label <> "</label>\n"
|
||||
where
|
||||
nsfwClass = if nsfw then " class=nsfw" else ""
|
||||
checked = if i == 0 then "checked " else ""
|
||||
idLabel = escId label
|
||||
|
||||
|
|
Loading…
Reference in a new issue