-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
74 lines (67 loc) · 1.89 KB
/
Copy pathpost.html
File metadata and controls
74 lines (67 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
layout: default
---
<main class="pt-32 pb-24 px-6">
<div class="max-w-3xl mx-auto">
<nav class="mb-8 text-sm text-slate-500">
<a href="/blog/" class="hover:text-sky-400 transition-colors">← Blog</a>
</nav>
{% if page.tags %}
<div class="flex flex-wrap gap-2 mb-6">
{% for tag in page.tags %}
<span class="text-xs font-mono bg-slate-800 text-sky-400 px-2 py-1 rounded">{{ tag }}</span>
{% endfor %}
</div>
{% endif %}
<h1 class="text-4xl sm:text-5xl font-extrabold leading-tight mb-6">
{{ page.title }}
</h1>
<p class="text-slate-400 text-lg mb-10 leading-relaxed">
{{ page.description }}
</p>
<hr class="border-slate-800 mb-10" />
<article class="prose-custom">
{{ content }}
</article>
</div>
</main>
{% if content contains 'language-mermaid' %}
<style>
.mermaid {
display: flex;
justify-content: center;
margin: 1.5rem 0;
background: #0f172a;
padding: 1.5rem;
border-radius: 0.75rem;
border: 1px solid #1e293b;
}
.mermaid svg { max-width: 100%; height: auto; }
</style>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10.9.1/dist/mermaid.esm.min.mjs';
mermaid.initialize({
startOnLoad: false,
theme: 'dark',
themeVariables: {
background: '#0f172a',
primaryColor: '#1e293b',
primaryTextColor: '#e2e8f0',
primaryBorderColor: '#38bdf8',
lineColor: '#64748b',
secondaryColor: '#0c4a6e',
tertiaryColor: '#0f172a',
noteBkgColor: '#1e293b',
noteTextColor: '#e2e8f0',
noteBorderColor: '#38bdf8'
}
});
document.querySelectorAll('pre > code.language-mermaid').forEach((el) => {
const div = document.createElement('div');
div.className = 'mermaid';
div.textContent = el.textContent;
el.parentElement.replaceWith(div);
});
await mermaid.run();
</script>
{% endif %}