Files
pwnforfunandprofit.xyz/templates/page.html
T

111 lines
3.5 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}
{% block head %}
<!-- SEO Schema JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "{{ page.title }}",
{% if page.date %}"datePublished": "{{ page.date }}",{% endif %}
"author": {
"@type": "Person",
"name": "{{ config.extra.author | default(value="Author") }}"
}
}
</script>
{% if page.extra.math %}
<link rel="stylesheet" href="{{ get_url(path="css/katex/katex.min.css") }}">
<script defer src="{{ get_url(path="js/katex/katex.min.js") }}"></script>
<script defer src="{{ get_url(path="js/katex/auto-render.min.js") }}"
onload="renderMathInElement(document.body);"></script>
{% endif %}
{% if page.extra.mermaid %}
<script type="module">
import mermaid from '{{ get_url(path="js/mermaid.min.js") }}';
mermaid.initialize({ startOnLoad: true, theme: 'dark' });
</script>
{% endif %}
{% endblock head %}
{% block content %}
<article class="post-detail">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
<div class="post-meta">
{% if page.date %}
<time datetime="{{ page.date }}">{{ page.date | date(format="%B %e, %Y") }}</time>
{% endif %}
</div>
</header>
{% if page.toc %}
<details class="post-toc">
<summary>Table of Contents</summary>
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</details>
{% endif %}
<div class="post-body">
{{ page.content | safe }}
</div>
{% if page.lower or page.higher %}
<nav class="post-nav" aria-label="Post navigation">
{% if page.higher %}
<a class="post-nav-link post-nav-next hover-scale" href="{{ page.higher.permalink }}">
<span class="post-nav-label">&larr; Next</span>
<span class="post-nav-title">{{ page.higher.title }}</span>
</a>
{% endif %}
{% if page.lower %}
<a class="post-nav-link post-nav-prev hover-scale" href="{{ page.lower.permalink }}">
<span class="post-nav-label">Prev &rarr;</span>
<span class="post-nav-title">{{ page.lower.title }}</span>
</a>
{% endif %}
</nav>
{% endif %}
<footer class="post-footer">
<div class="post-tags">
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
<span class="tag">#{{ tag }}</span>
{% endfor %}
{% endif %}
</div>
<!-- Utterances comments (posts only) -->
{% if page.path is starting_with("posts/") %}
<div class="comments" id="comments" style="margin-top: 4rem;">
<script src="https://utteranc.es/client.js"
repo="andwati/pwnforfunandprofit.xyz"
issue-term="pathname"
theme="github-dark"
crossorigin="anonymous"
async>
</script>
</div>
{% endif %}
</footer>
</article>
{% endblock content %}