diff --git a/css/default.css b/css/default.css
index 51e42ab..0f6aa4e 100644
--- a/css/default.css
+++ b/css/default.css
@@ -20,10 +20,12 @@ body {
header {
border-bottom: 0.2rem solid #000;
+ margin: 4.2rem 0;
}
nav {
- text-align: right;
+ text-align: center;
+ margin: 0 auto 3rem;
}
nav a {
@@ -34,6 +36,11 @@ nav a {
text-transform: uppercase;
}
+
+nav a:hover {
+ color: pink;
+}
+
footer {
margin-top: 3rem;
padding: 1.2rem 0;
@@ -56,9 +63,19 @@ article .header {
color: #555;
}
+.logo {
+ text-align: center;
+ margin: 1rem auto 3rem;
+}
+
+.logo a:hover {
+ transform: rotate(180deg);
+}
+
.logo a {
font-weight: bold;
font-family: "Monoid Bold";
+ font-size: 3rem;
color: #000;
text-decoration: none;
}
@@ -82,27 +99,18 @@ article .header {
margin: 0;
padding: 0 5%;
}
- header {
- margin: 4.2rem 0;
- }
- nav {
- margin: 0 auto 3rem;
- text-align: center;
- }
footer {
text-align: center;
}
- .logo {
- text-align: center;
- margin: 1rem auto 3rem;
- }
- .logo a {
- font-size: 2.4rem;
- }
nav a {
display: block;
line-height: 1.6;
}
+ .sticky {
+ position: fixed;
+ top: 0;
+ background: white;
+ }
}
@media (min-width: 320px) {
@@ -111,23 +119,9 @@ article .header {
margin: 0;
padding: 0 5%;
}
- header {
- margin: 4.2rem 0;
- }
- nav {
- margin: 0 auto 3rem;
- text-align: center;
- }
footer {
text-align: center;
}
- .logo {
- text-align: center;
- margin: 1rem auto 3rem;
- }
- .logo a {
- font-size: 2.4rem;
- }
nav a {
display: inline;
margin: 0 0.6rem;
@@ -140,14 +134,6 @@ article .header {
margin: 0 auto;
padding: 0;
}
- header {
- margin: 0 0 3rem;
- padding: 1.2rem 0;
- }
- nav {
- margin: 0;
- text-align: right;
- }
nav a {
margin: 0 0 0 1.2rem;
display: inline;
@@ -155,12 +141,4 @@ article .header {
footer {
text-align: right;
}
- .logo {
- margin: 0;
- text-align: left;
- }
- .logo a {
- float: left;
- font-size: 1.8rem;
- }
}
diff --git a/posts/2022-12-05-placeholder.org b/posts/2022-12-05-placeholder.org
index b1b9b0d..ded7b95 100644
--- a/posts/2022-12-05-placeholder.org
+++ b/posts/2022-12-05-placeholder.org
@@ -1,5 +1,227 @@
---
title: alo
+tags: amaang
---
+this is so true
* a
+3
+
+
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+* a
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
+3
diff --git a/site.hs b/site.hs
index 7a3fea7..a337cf0 100644
--- a/site.hs
+++ b/site.hs
@@ -1,7 +1,6 @@
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
-import Data.Monoid (mappend)
import Hakyll
--------------------------------------------------------------------------------
@@ -22,12 +21,44 @@ main = hakyllWith config $ do
>>= loadAndApplyTemplate "templates/default.html" defaultCtx
>>= relativizeUrls
+ tags <- buildTags "posts/*" (fromCapture "archive/tags/*.html")
+
+ tagsRules tags $ \tag pattern -> do
+ let title = "Posts tagged \"" ++ tag ++ "\""
+ route idRoute
+ compile $ do
+ posts <- recentFirst =<< loadAll pattern
+ let tagCtx =
+ constField "title" title
+ <> constField "tag" tag
+ <> listField "posts" (postCtx tags) (return posts)
+ <> defaultCtx
+
+ makeItem ""
+ >>= loadAndApplyTemplate "templates/tag.html" tagCtx
+ >>= loadAndApplyTemplate "templates/default.html" tagCtx
+ >>= relativizeUrls
+
+ create ["archive/tags.html"] $ do
+ route idRoute
+ compile $ do
+ let tagListCtx =
+ field "tags" (\_ -> renderTagList tags)
+ <> constField "title" "Tag List"
+ <> defaultCtx
+
+ makeItem ""
+ >>= loadAndApplyTemplate "templates/tags.html" tagListCtx
+ >>= loadAndApplyTemplate "templates/default.html" tagListCtx
+ >>= relativizeUrls
+
match "posts/*org" $ do
route $ setExtension "html"
compile $
pandocCompiler
- >>= loadAndApplyTemplate "templates/post.html" postCtx
- >>= loadAndApplyTemplate "templates/default.html" postCtx
+ >>= saveSnapshot "content"
+ >>= loadAndApplyTemplate "templates/post.html" (postCtx tags)
+ >>= loadAndApplyTemplate "templates/default.html" (postCtx tags)
>>= relativizeUrls
create ["archive.html"] $ do
@@ -35,7 +66,7 @@ main = hakyllWith config $ do
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx =
- listField "posts" postCtx (return posts)
+ listField "posts" (postCtx tags) (return posts)
<> constField "title" "Archives"
<> defaultCtx
@@ -49,7 +80,7 @@ main = hakyllWith config $ do
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let indexCtx =
- listField "posts" postCtx (return posts)
+ listField "posts" (postCtx tags) (return posts)
<> defaultCtx
getResourceBody
@@ -69,9 +100,10 @@ config =
previewPort = 3333
}
-postCtx :: Context String
-postCtx =
- dateField "date" "%B %e, %Y"
+postCtx :: Tags -> Context String
+postCtx tags =
+ tagsField "tags" tags
+ <> dateField "date" "%B %e, %Y"
<> defaultCtx
defaultCtx :: Context String
diff --git a/sitemap.xml b/sitemap.xml
new file mode 100644
index 0000000..731fe04
--- /dev/null
+++ b/sitemap.xml
@@ -0,0 +1,47 @@
+
+