make title mandatory
This commit is contained in:
parent
b6203a2d4a
commit
c10a3ab340
3 changed files with 7 additions and 17 deletions
|
@ -9,7 +9,6 @@ import Control.Exception
|
|||
import qualified Data.Text as Strict
|
||||
import qualified Data.Text.Lazy as Lazy
|
||||
import Data.Time (formatTime, defaultTimeLocale)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import qualified Data.Char as Char
|
||||
import qualified Data.List as List
|
||||
|
||||
|
@ -36,10 +35,10 @@ make' nsfw (Info {date, title, artist, tags, nsfwTags,
|
|||
<meta name=viewport content='width=1200,viewport-fit=cover'>
|
||||
<link rel=stylesheet href=/style/single.css>
|
||||
|
||||
$titleTag
|
||||
<title>$*title</title>
|
||||
|
||||
<header>
|
||||
$titleHeader
|
||||
<h1>$*title</h1>
|
||||
$artistTag
|
||||
<h2 class=date>$formattedDate</h2>
|
||||
$buttonBar
|
||||
|
@ -71,14 +70,11 @@ make' nsfw (Info {date, title, artist, tags, nsfwTags,
|
|||
</footer>
|
||||
|]
|
||||
where
|
||||
titleTag = ifJust title \t -> [b|<title>$*t</title>|]
|
||||
titleHeader = ifJust title \t -> [b|<h1>$*t</h1>|]
|
||||
|
||||
artistTag = ifJust artist makeArtist
|
||||
|
||||
formattedDate = formatDate date
|
||||
|
||||
buttonBar = makeButtonBar (fromMaybe (Strict.pack path0) title) nsfw images
|
||||
buttonBar = makeButtonBar title nsfw images
|
||||
image0 = head images
|
||||
path0 = #path image0
|
||||
path0' = pageFile path0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue