Adding mermaid - it's really small for some reason
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -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 %}
|
||||
|
||||
19
templates/base.html
Normal file
19
templates/base.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% import "macros/macros.html" as post_macros %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% include "partials/header.html" %}
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
{% include "partials/nav.html" %}
|
||||
|
||||
{# Post page is the default #}
|
||||
{% block main_content %}
|
||||
Nothing here?!
|
||||
{% endblock main_content %}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
75
templates/partials/header.html
Normal file
75
templates/partials/header.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{% import "macros/macros.html" as post_macros %}
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script type="module">
|
||||
import mermaid from 'https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs';
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
<script>mermaid.initialize({startOnLoad:true});</script>
|
||||
|
||||
{# Site title #}
|
||||
{% set current_path = current_path | default(value="/") %}
|
||||
{% if current_path == "/" %}
|
||||
<title>
|
||||
{{ config.title | default(value="Home") }}
|
||||
</title>
|
||||
{% else %}
|
||||
<title>
|
||||
{{ page.title | default(value=config.title) | default(value="Post") }}
|
||||
</title>
|
||||
{% endif %}
|
||||
|
||||
{# Favicon #}
|
||||
{% if config.extra.favicon %}
|
||||
<link rel="icon" type="image/png" href={{ config.extra.favicon }} />
|
||||
{% endif %}
|
||||
|
||||
{# Font from cdn or disk #}
|
||||
{% if config.extra.use_cdn | default(value=false) %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jetbrains-mono@1.0.6/css/jetbrains-mono.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/space-grotesk@4.5.8/index.min.css">
|
||||
{% else %}
|
||||
<link href={{ get_url(path="fonts.css") }} rel="stylesheet" />
|
||||
{% 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") %}
|
||||
|
||||
<script data-goatcounter="https://{{ user }}.{{ host }}/count" async src="{{ get_url(path="js/count.js") }}"></script>
|
||||
<noscript>
|
||||
{# EasyList blocks '.com/count?', so we have to use '.com//count' #}
|
||||
<img src="https://{{ user }}.{{ host }}//count?p={{ current_path }}&t={{ page.title | default(value=config.title) }}">
|
||||
</noscript>
|
||||
{% endif %}
|
||||
|
||||
{# RSS #}
|
||||
<link rel="alternate" type="application/atom+xml" title="{{ config.title }}" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
|
||||
|
||||
{# Theme #}
|
||||
{% set theme = config.extra.theme | default(value="light") %}
|
||||
{% if theme == "dark" %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ get_url(path="theme/dark.css") }}"/>
|
||||
{% elif theme == "light" %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ get_url(path="theme/light.css") }}"/>
|
||||
{% elif theme == "auto" %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ get_url(path="theme/light.css") }}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ get_url(path="theme/dark.css") }}" media="(prefers-color-scheme: dark)"/>
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="main.css") }} />
|
||||
|
||||
|
||||
{% if config.extra.stylesheets %}
|
||||
{% for stylesheet in config.extra.stylesheets %}
|
||||
<link rel="stylesheet" href="{{ get_url(path=stylesheet) }}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
3
templates/shortcodes/mermaid.html
Normal file
3
templates/shortcodes/mermaid.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="mermaid">
|
||||
{{ body }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user