|
| 1 | +{% extends "base.html" %} |
| 2 | + |
| 3 | +{% block content %} |
| 4 | +{{ super() }} |
| 5 | + |
| 6 | +<!-- Giscus --> |
| 7 | +<h2 id="__comments">{{ lang.t("meta.comments") }}</h2> |
| 8 | +<!-- Replace with generated snippet --> |
| 9 | + |
| 10 | +<script src="https://giscus.app/client.js" |
| 11 | + data-repo="spotware/OpenAPI.Net" |
| 12 | + data-repo-id="MDEwOlJlcG9zaXRvcnkzNTcxMTY1OTM=" |
| 13 | + data-category="Announcements" |
| 14 | + data-category-id="DIC_kwDOFUkqsc4COICk" |
| 15 | + data-mapping="pathname" |
| 16 | + data-reactions-enabled="1" |
| 17 | + data-emit-metadata="0" |
| 18 | + data-input-position="top" |
| 19 | + data-theme="light" |
| 20 | + data-lang="en" |
| 21 | + crossorigin="anonymous" |
| 22 | + async> |
| 23 | +</script> |
| 24 | + |
| 25 | +<!-- Reload on palette change --> |
| 26 | +<script> |
| 27 | + var palette = __md_get("__palette") |
| 28 | + if (palette && typeof palette.color === "object") |
| 29 | + if (palette.color.scheme === "slate") { |
| 30 | + var giscus = document.querySelector("script[src*=giscus]") |
| 31 | + giscus.setAttribute("data-theme", "dark") |
| 32 | + } |
| 33 | + |
| 34 | + /* Register event handlers after documented loaded */ |
| 35 | + document.addEventListener("DOMContentLoaded", function () { |
| 36 | + var ref = document.querySelector("[data-md-component=palette]") |
| 37 | + ref.addEventListener("change", function () { |
| 38 | + var palette = __md_get("__palette") |
| 39 | + if (palette && typeof palette.color === "object") { |
| 40 | + var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light" |
| 41 | + |
| 42 | + /* Instruct Giscus to change theme */ |
| 43 | + var frame = document.querySelector(".giscus-frame") |
| 44 | + frame.contentWindow.postMessage( |
| 45 | + { giscus: { setConfig: { theme } } }, |
| 46 | + "https://giscus.app" |
| 47 | + ) |
| 48 | + } |
| 49 | + }) |
| 50 | + }) |
| 51 | +</script> |
| 52 | +{% endblock %} |
0 commit comments