You've already forked documentation
mirror of
https://github.com/armbian/documentation.git
synced 2026-01-06 10:13:36 -08:00
70 lines
2.1 KiB
HTML
70 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
<!-- Announcement bar -->
|
|
{% block announce %}
|
|
<a href="https://github.com/sponsors/armbian">
|
|
<span class="twemoji twitter">
|
|
{% include ".icons/fontawesome/solid/heart.svg" %}
|
|
</span> Become a sponsor to Armbian!
|
|
</a>
|
|
<a rel="me" href="https://fosstodon.org/@armbian"></a>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ super() }}
|
|
|
|
{% if page and page.meta and page.meta.comments %}
|
|
<div class="giscus-comments" style="margin-top: 2rem;">
|
|
<script src="https://giscus.app/client.js"
|
|
data-repo="armbian/documentation"
|
|
data-repo-id="MDEwOlJlcG9zaXRvcnk2MjM4NzMyMA=="
|
|
data-category="General"
|
|
data-category-id="DIC_kwDOA7f0eM4Co78a"
|
|
data-mapping="pathname"
|
|
data-strict="0"
|
|
data-reactions-enabled="0"
|
|
data-emit-metadata="0"
|
|
data-input-position="top"
|
|
data-theme="noborder_light"
|
|
data-lang="en"
|
|
crossorigin="anonymous"
|
|
async>
|
|
</script>
|
|
<script>
|
|
var giscus = document.querySelector("script[src*=giscus]")
|
|
|
|
// Set palette on initial load
|
|
var palette = __md_get("__palette")
|
|
if (palette && typeof palette.color === "object") {
|
|
var theme = palette.color.scheme === "slate"
|
|
? "transparent_dark"
|
|
: "light"
|
|
|
|
// Instruct Giscus to set theme
|
|
giscus.setAttribute("data-theme", theme)
|
|
}
|
|
|
|
// Register event handlers after documented loaded
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
var ref = document.querySelector("[data-md-component=palette]")
|
|
ref.addEventListener("change", function() {
|
|
var palette = __md_get("__palette")
|
|
if (palette && typeof palette.color === "object") {
|
|
var theme = palette.color.scheme === "slate"
|
|
? "transparent_dark"
|
|
: "light"
|
|
|
|
// Instruct Giscus to change theme
|
|
var frame = document.querySelector(".giscus-frame")
|
|
frame.contentWindow.postMessage(
|
|
{ giscus: { setConfig: { theme } } },
|
|
"https://giscus.app"
|
|
)
|
|
}
|
|
})
|
|
})
|
|
</script>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|