diff --git a/css/default.css b/css/default.css index 69cc68a..7f9de79 100644 --- a/css/default.css +++ b/css/default.css @@ -161,7 +161,10 @@ a:hover { } nav { + display: flex; + flex-direction: row; text-align: center; + justify-content: center; margin: 0 auto 3rem; } @@ -194,16 +197,6 @@ h2 { font-size: 2rem; } -.post-preview-item { - list-style-type: none; - padding: 2rem; - border: 0.2rem ridge var(--fg5); -} - -.post-preview-item:not(:last-child) { - margin-bottom: 3rem; -} - .post-title { text-align: center; color: var(--fg5) !important; @@ -286,13 +279,20 @@ img, video { margin: 0; padding: 0 5%; } + footer { text-align: center; } + + nav { + flex-direction: column; + } + nav a { display: block; line-height: 1.6; } + .toc { padding: 1rem; } @@ -304,31 +304,43 @@ img, video { margin: 0; padding: 0 5%; } + footer { text-align: center; } + nav a { display: inline; margin: 0 0.6rem; } + .toc { padding: 1rem; } } +@media (max-width: 639px) { + nav { + flex-direction: column; + } +} + @media (min-width: 640px) { body { width: 60%; margin: 0 auto; padding: 0; } + nav a { margin: 0 0 0 1.2rem; display: inline; } + footer { text-align: right; } + .toc { padding: 2rem; } diff --git a/src/site.hs b/src/site.hs index 34c1b09..8615fd9 100644 --- a/src/site.hs +++ b/src/site.hs @@ -112,10 +112,7 @@ main = hakyllWith config $ do match "index.html" $ do route idRoute compile $ do - posts <- fmap (take 10) . recentFirst =<< loadAllSnapshots "posts/*" "content" - let indexCtx = - listField "posts" (postCtx tags) (return posts) - <> defaultCtx + let indexCtx = defaultCtx getResourceBody >>= applyAsTemplate indexCtx diff --git a/templates/post-preview-list.html b/templates/post-preview-list.html deleted file mode 100644 index caa5263..0000000 --- a/templates/post-preview-list.html +++ /dev/null @@ -1,27 +0,0 @@ -