Add Mastodon links to blog

This commit is contained in:
maralorn 2023-06-18 22:26:11 +02:00
parent 49c19ebf1a
commit 24e8d0737f
No known key found for this signature in database
4 changed files with 13 additions and 3 deletions

View file

@ -9,6 +9,7 @@ tags:
- haskell
- fragnix
- grin
toot: "106443140005374567"
---
People who know me closer know that I have an obsession with finding the

View file

@ -8,6 +8,7 @@ summary: >
tags:
- non-tech
- rationality
toot: "107499007496598957"
---
- Imagine you are eight years old, and your dad takes you to the bakery. They

View file

@ -52,8 +52,8 @@
find $out -iname "*.html" -exec sed -i "s|/static/css/windi.css|/static/css/windi.$csshash.css|" {} + ;
'';
};
apps = {
default = packages.watch;
apps = rec {
default = watch;
watch = flake-utils.lib.mkApp {
drv = pkgs.writeShellScriptBin "watch" ''
mkdir -p content/static/font content/static/css

View file

@ -118,6 +118,7 @@ data Meta = Meta
, summary :: Maybe Text
, date :: Maybe Day
, tags :: Maybe (NonEmpty Tag)
, toot :: Maybe Text
, lang :: Lang
}
deriving (Show, Generic, FromJSON)
@ -439,7 +440,14 @@ renderPost model meta pandoc =
renderPostHeader model meta pandoc Post
renderPandoc pandoc
H.p ! tw ["border-t-4", "pt-8", "mt-8"] $ do
"Have any feedback? Dont hesitate to contact me! (see above)"
"Have any feedback? "
case toot meta of
Just toot_id -> do
"You can "
H.a ! tw ["text-blue-600 hover:underline"] ! A.href [i|https://chaos.social/@maralorn/#{toot_id}|] $ "reply to this post on Mastodon"
" or contact me some other way"
Nothing -> "Dont hesitate to contact me!"
" (see above)"
topics model
H.div ! tw ["grid", "grid-cols-2", "space-x-4"] $ do
similarPosts model meta