privacyguides.org/theme/overrides/blog.html

72 lines
2.7 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% block extrahead %}
<link rel="stylesheet" href="{{ 'overrides/blog.css' | url }}">
{% endblock %}
{% block hero %}
{{ super() }}
<style>.md-content > .md-typeset h1{visibility:hidden;font-size:0;}</style>
<section class="mdx-container" {% if page.meta.background %}style="background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9)), url(/assets/img/blog/{{ page.meta.background }});padding-top:8rem;padding-bottom:4rem;background-size:cover;background-position:center;"{% endif %}>
<div class="md-grid md-typeset">
<div class="mdx-hero">
<div class="mdx-hero__content" style>
<h1 {% if page.meta.background %}style="color:white"{% endif %}>{{ page.meta.title }}</h1>
{% if page.meta.excerpt %}<p {% if page.meta.background %}style="color:white"{% endif %}>{{ page.meta.excerpt }}</p>{% endif %}
<nav class="md-tags">
<span {% if page.meta.background %}style="color:white"{% endif %} class="md-tag">Author: {{ page.meta.author }}</span>
</nav>
</div>
</div>
</div>
</section>
{% endblock %}
{% block content %}
{{ super() }}
<!-- Giscus -->
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<script src="https://giscus.app/client.js"
data-repo="privacyguides/privacyguides.org"
data-repo-id="MDEwOlJlcG9zaXRvcnkzMTg0MDE5MDY="
data-category="Blog"
data-category-id="DIC_kwDOEvptcs4COX5p"
data-mapping="title"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="light"
data-lang="en"
crossorigin="anonymous"
async>
</script>
<!-- Reload on palette change -->
<script>
var palette = __md_get("__palette")
if (palette && typeof palette.color === "object")
if (palette.color.scheme === "slate") {
var giscus = document.querySelector("script[src*=giscus]")
2022-04-02 00:00:01 -04:00
giscus.setAttribute("data-theme", "transparent_dark")
}
/* 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") {
2022-04-02 00:00:01 -04:00
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>
{% endblock %}