~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website

chore(overrides): migrate deployment specific banner outside announcements

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>

Changed files
+67 -23
overrides
+8 -5
overrides/404.html
···
{% extends "main.html" %}
{% block content %}
<h1>404 - Not found</h1>
-
<p>Either the URL has been moved without redirects, taken down for any reasons, or it doesn't exist (yet).</p>
+
<p>
+
Either the URL has been moved without redirects, taken down for any reasons, or it doesn't exist (yet).
+
</p>
<h2>Troubleshooting tips</h2>
-
<p>Try checking the URL for any misspellings or improper use of dashes, underscores and periods.</p>
-
<p>If you're working in this site and you hit an URL configured for redirects (at Cloudflare Pages or similiar), try <a href="https://pypi.org/project/mkdocs-redirects/">configuring redirects in the Mkdocs config first</a>.</p>
-
<p>Depending on the site version you're viewing, you may need to switch between <a href="https://andreijiroh.eu.org">production</a>
-
and <a href="https://staging.andreijiroh.eu.org">staging</a> versions of the website.</p>
+
<p>Try checking the URL for any misspellings or improper use of dashes, underscores and periods.</p>
+
<p>If you're working in this site and you hit an URL configured for redirects (at Cloudflare Pages or similiar), try <a href="https://pypi.org/project/mkdocs-redirects/">configuring redirects in the Mkdocs config first</a>.</p>
+
<p>Depending on the site version you're viewing, you may need to switch between <a href="https://andreijiroh.eu.org">production</a>
+
and <a href="https://staging.andreijiroh.eu.org">staging</a> versions of the website. (The tilde versions of the site may be
+
may lag behind Cloudflare Pages deploys.)</p>
{% endblock %}
+23 -18
overrides/main.html
···
{% endblock %}
<!-- Staging build -->
{% block announce %}
-
{% if config.extra.deployment == "staging" %}
-
You're previewig the staging build of @ajhalili2006's website on <a href="https://readthedocs.org">RTD Community</a>. <strong><a href="https://andreijiroh.eu.org">Go back to production</a></strong>
-
{% else %}
-
For updates follow <strong>@ajhalili2006</strong> on
-
<a rel="me" href="https://tilde.zone/@ajhalili2006">
-
<span class="twemoji mastodon">
-
{% include ".icons/fontawesome/brands/mastodon.svg" %}
-
</span>
-
<strong>the tildeverse</strong>
-
</a>
-
and
-
<a href="https://substack.com/@ajhalili2006">
-
<span class="twemoji substack">
-
{% include ".icons/simple/substack.svg" %}
-
</span>
-
<strong>Substack</strong>
-
</a>
-
{% endif %}
+
For updates follow <strong>@ajhalili2006</strong> on
+
<a rel="me" href="https://tilde.zone/@ajhalili2006">
+
<span class="twemoji mastodon">
+
{% include ".icons/fontawesome/brands/mastodon.svg" %}
+
</span>
+
<strong>the tildeverse</strong>
+
</a>
+
and
+
<a href="https://substack.com/@ajhalili2006">
+
<span class="twemoji substack">
+
{% include ".icons/simple/substack.svg" %}
+
</span>
+
<strong>Substack</strong>
+
</a>
{% endblock %}
+
{% block container %}
+
<div class="md-content" data-md-component="content">
+
<article class="md-content__inner md-typeset">
+
{% block content %}
+
{% include "partials/content.html" %}
+
{% endblock %}
+
</article>
+
</div>
+
{% endblock %}
+36
overrides/partials/content.html
···
+
{% if config.extra.deployment %}
+
<div class="admonition info">
+
{% if config.extra.deployment == "staging" %}
+
<p class="admonition-title">
+
You're previewing the staging build of @ajhalili2006's website on <a href="https://readthedocs.org/projects/ajhalili2006/builds">RTD Community</a>.
+
</p>
+
<p>
+
Deploys might be a bit faster there, but it may contain content not yet ready for production deployment or
+
we might skipped GitLab CI for the latest commit.
+
</p>
+
{% elif config.extra.deployment == "tilde" %}
+
<p class="admonition-title">You're viewing ~ajhalili2006's website from the tildeverse.</p>
+
<p>
+
This site build's content might be outdated due to failing CI, delayed synchorizations and local cache, among other reasons.
+
</p>
+
{% endif %}
+
<a class="md-button" href="https://andreijiroh.eu.org">Go back to production</a>
+
</div>
+
{% endif %}
+
{% if "material/tags" in config.plugins and tags %}
+
{% include "partials/tags.html" %}
+
{% endif %}
+
{% include "partials/actions.html" %}
+
{% if "\x3ch1" not in page.content %}
+
<h1>{{ page.title | d(config.site_name, true)}}</h1>
+
{% endif %}
+
{{ page.content }}
+
{% if page.meta and (
+
page.meta.git_revision_date_localized or
+
page.meta.revision_date
+
) %}
+
{% include "partials/source-file.html" %}
+
{% endif %}
+
{% include "partials/feedback.html" %}
+
{% include "partials/comments.html" %}
+