diff --git a/byg/src/SiteGenerator.hs b/byg/src/SiteGenerator.hs index 0fcb4d0..002ae12 100644 --- a/byg/src/SiteGenerator.hs +++ b/byg/src/SiteGenerator.hs @@ -18,7 +18,7 @@ makeImageHTML :: Token (FilePath, FilePath) -> DepGenM' Text makeImageHTML t = do (thumbnail, actual) <- untupleDepGenM t appendTexts - (inject "

convertImage files $ inject $ ResizeToWidth 800) (zipDepGenM imagePaths thumbnailImagePaths) - htmlBodyBase <- runPandoc $ readTextFile $ joinPaths dir $ inject "ret.md" + md <- readTextFile $ joinPaths dir $ inject "ret.md" + ingredienserHeadline <- inject "## Ingredienser" + mdTemplate <- makeTemplate md ingredienserHeadline htmlBodyImages <- mapDepGenM makeImageHTML $ zipDepGenM thumbnailImageFilenames imageFilenames imagesHtml <- concatTexts htmlBodyImages - htmlBody <- appendTexts htmlBodyBase imagesHtml + md' <- applyTemplate mdTemplate ( + appendTexts + (inject "

Opskrift fortsætter efter billedet.

\n") + (appendTexts + imagesHtml + (appendTexts + (inject "\n\n") + ingredienserHeadline))) + htmlBody <- runPandoc md' html <- applyTemplate template htmlBody saveFile html $ joinPaths recipeDirOut indexName diff --git a/style.css b/style.css index 0eda0f1..2d2559f 100644 --- a/style.css +++ b/style.css @@ -60,7 +60,7 @@ nav { } section { - max-width: 800px; + max-width: calc(800px + 2 * 10px); margin: 0 auto; font-family: bainsley, sans; } @@ -68,3 +68,18 @@ section { article { padding: 10px; } + +p.imagetext { + font-style: italic; + text-align: right; + font-size: 0.85em; + color: #444444; + margin-bottom: 0.1em; +} + +p.image { + margin: 0; + img { + max-width: 100%; + } +}