mirror of
https://github.com/imfing/hextra.git
synced 2025-05-14 14:36:24 -04:00
Compare commits
4 Commits
0db30f9e30
...
63c7b7cfdc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
63c7b7cfdc | ||
![]() |
fe2271b60b | ||
![]() |
bd34a5bad3 | ||
![]() |
f66c915d5b |
@ -12,6 +12,13 @@ Open source projects powered by Hextra
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
|
{{< card
|
||||||
|
link="https://github.com/modelcontextprotocol/specification"
|
||||||
|
title="Model Context Protocol Specification"
|
||||||
|
image="https://github.com/user-attachments/assets/1bb4f952-b8fc-43b5-9cbd-cd7213c2ba90"
|
||||||
|
imageStyle="object-fit:cover; aspect-ratio:16/9;"
|
||||||
|
>}}
|
||||||
|
|
||||||
{{< card
|
{{< card
|
||||||
link="https://github.com/jonaspleyer/cellular_raza"
|
link="https://github.com/jonaspleyer/cellular_raza"
|
||||||
title="cellular_raza"
|
title="cellular_raza"
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
<title>
|
<title>
|
||||||
{{- if .IsHome -}}
|
{{- if .IsHome -}}
|
||||||
{{ .Site.Title -}}
|
{{ .Site.Title -}}
|
||||||
|
{{ else if eq .Kind "page" -}}
|
||||||
|
{{ with .Title }}{{ . }} – {{ end -}}
|
||||||
|
{{ $sectionTitle := index .Site.Params.sectionsTitles .Section }}
|
||||||
|
{{ $sectionTitle | default .Site.Title }}
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ with .Title }}{{ . }} – {{ end -}}
|
{{ with .Title }}{{ . }} – {{ end -}}
|
||||||
{{ .Site.Title -}}
|
{{ .Site.Title -}}
|
||||||
|
@ -37,9 +37,32 @@
|
|||||||
{{- $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" | fingerprint -}}
|
{{- $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" | fingerprint -}}
|
||||||
<script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
|
<script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
// Store original mermaid code for each diagram
|
||||||
|
document.querySelectorAll(".mermaid").forEach(el => {
|
||||||
|
el.dataset.original = el.innerHTML;
|
||||||
|
});
|
||||||
|
|
||||||
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
||||||
mermaid.initialize({ startOnLoad: true, theme: theme });
|
mermaid.initialize({ startOnLoad: true, theme: theme });
|
||||||
|
|
||||||
|
let timeout;
|
||||||
|
new MutationObserver(() => {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
timeout = setTimeout(() => {
|
||||||
|
const theme = document.documentElement.classList.contains("dark") ? "dark" : "default";
|
||||||
|
document.querySelectorAll(".mermaid").forEach(el => {
|
||||||
|
// Reset to original content, preserving HTML
|
||||||
|
el.innerHTML = el.dataset.original;
|
||||||
|
el.removeAttribute("data-processed");
|
||||||
|
});
|
||||||
|
mermaid.initialize({ startOnLoad: true, theme: theme });
|
||||||
|
mermaid.init();
|
||||||
|
}, 150);
|
||||||
|
}).observe(document.documentElement, {
|
||||||
|
attributes: true,
|
||||||
|
attributeFilter: ["class"]
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user