From 8e4042a0baa5847f65189e183ff41d3d77c5310d Mon Sep 17 00:00:00 2001 From: James Brechtel Date: Sun, 13 Nov 2022 00:41:20 -0500 Subject: [PATCH] Adding mermaid - it's really small for some reason --- content/posts/haskell-fun.md | 14 +++++- templates/base.html | 19 ++++++++ templates/partials/header.html | 75 +++++++++++++++++++++++++++++++ templates/shortcodes/mermaid.html | 3 ++ 4 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 templates/base.html create mode 100644 templates/partials/header.html create mode 100644 templates/shortcodes/mermaid.html diff --git a/content/posts/haskell-fun.md b/content/posts/haskell-fun.md index 8de1c14..52a1a9d 100644 --- a/content/posts/haskell-fun.md +++ b/content/posts/haskell-fun.md @@ -1,5 +1,5 @@ +++ -title = "Haskell Test" +title = "Syntax test post" date = "2022-11-08" +++ @@ -11,3 +11,15 @@ main = do putStrLn "Nice" } ``` + +{% mermaid() %} +journey + title My working day + section Go to work + Make tea: 5: Me + Go upstairs: 3: Me + Do work: 1: Me, Cat + section Go home + Go downstairs: 5: Me + Sit down: 5: Me +{% end %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..0776c79 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,19 @@ +{% import "macros/macros.html" as post_macros %} + + + +{% include "partials/header.html" %} + + +
+ {% include "partials/nav.html" %} + + {# Post page is the default #} + {% block main_content %} + Nothing here?! + {% endblock main_content %} +
+ + + + diff --git a/templates/partials/header.html b/templates/partials/header.html new file mode 100644 index 0000000..6f256c5 --- /dev/null +++ b/templates/partials/header.html @@ -0,0 +1,75 @@ +{% import "macros/macros.html" as post_macros %} + + + + + + + + + + + {# Site title #} + {% set current_path = current_path | default(value="/") %} + {% if current_path == "/" %} + + {{ config.title | default(value="Home") }} + + {% else %} + + {{ page.title | default(value=config.title) | default(value="Post") }} + + {% endif %} + + {# Favicon #} + {% if config.extra.favicon %} + + {% endif %} + + {# Font from cdn or disk #} + {% if config.extra.use_cdn | default(value=false) %} + + + {% else %} + + {% endif %} + + {# Analytics #} + {% if config.extra.analytics.enabled and config.extra.analytics.goatcounter_user %} + {% set user = config.extra.analytics.goatcounter_user %} + {% set host = config.extra.analytics.goatcounter_host | default(value="goatcounter.com") %} + + + + {% endif %} + + {# RSS #} + + + {# Theme #} + {% set theme = config.extra.theme | default(value="light") %} + {% if theme == "dark" %} + + {% elif theme == "light" %} + + {% elif theme == "auto" %} + + + {% endif %} + + + + + {% if config.extra.stylesheets %} + {% for stylesheet in config.extra.stylesheets %} + + {% endfor %} + {% endif %} + + diff --git a/templates/shortcodes/mermaid.html b/templates/shortcodes/mermaid.html new file mode 100644 index 0000000..5e6d740 --- /dev/null +++ b/templates/shortcodes/mermaid.html @@ -0,0 +1,3 @@ +
+{{ body }} +