mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Merge branch 'main' into edition-3
This commit is contained in:
@@ -39,8 +39,6 @@
|
||||
</small>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script data-goatcounter="https://phil-opp.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
{% block after_main %}
|
||||
<hr>
|
||||
<div class="PageNavigation">
|
||||
{% if page.lighter %}
|
||||
<a class="prev" href="{{ page.lighter.path | safe }}">« {{ page.lighter.title }}</a>
|
||||
{% if page.lower %}
|
||||
<a class="prev" href="{{ page.lower.path | safe }}">« {{ page.lower.title }}</a>
|
||||
{% endif %}
|
||||
{% if page.heavier %}
|
||||
<a class="next" href="{{ page.heavier.path | safe }}">{{ page.heavier.title }} »</a>
|
||||
{% if page.higher %}
|
||||
<a class="next" href="{{ page.higher.path | safe }}">{{ page.higher.title }} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@
|
||||
</small>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script data-goatcounter="https://phil-opp.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
<hr>
|
||||
<section>
|
||||
<h2 id="comments">Comments</h2>
|
||||
{{ snippets::giscus(search_term=page.title ~ " (Extra Post)") }}
|
||||
{{ snippets::giscus(search_term=page.title ~ " (Extra Post)", lang=page.lang) }}
|
||||
</section>
|
||||
{% endblock after_main %}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<hr>
|
||||
<section>
|
||||
<h2 id="comments">Comments</h2>
|
||||
{{ snippets::giscus(search_term=page.title ~ " (News Post)") }}
|
||||
{{ snippets::giscus(search_term=page.title ~ " (News Post)", lang=page.lang) }}
|
||||
</section>
|
||||
|
||||
{% endblock after_main %}
|
||||
|
||||
@@ -69,6 +69,18 @@
|
||||
{%- endif -%}
|
||||
<a href="https://github.com/{{user}}">@{{user}}</a>
|
||||
{%- endfor %}.
|
||||
|
||||
{%- if page.extra.translation_contributors %}
|
||||
<span class="translation_contributors">
|
||||
{{ trans(key="translation_contributors", lang=lang) }} {% for user in page.extra.translation_contributors -%}
|
||||
{%- if not loop.first -%}
|
||||
{%- if loop.last %} {{ trans(key="word_separator", lang=lang) }} {% else %}, {% endif -%}
|
||||
{%- endif -%}
|
||||
<a href="https://github.com/{{user}}">@{{user}}</a>
|
||||
{%- endfor %}.
|
||||
</span>
|
||||
{% endif -%}
|
||||
|
||||
</p>
|
||||
{% endif -%}
|
||||
</div>
|
||||
@@ -85,11 +97,11 @@
|
||||
|
||||
<hr>
|
||||
<div class="PageNavigation">
|
||||
{% if page.lighter %}
|
||||
<a class="prev" href="{{ page.lighter.path | safe }}">« {{ page.lighter.title }}</a>
|
||||
{% if page.lower %}
|
||||
<a class="prev" href="{{ page.lower.path | safe }}">« {{ page.lower.title }}</a>
|
||||
{% endif %}
|
||||
{% if page.heavier %}
|
||||
<a class="next" href="{{ page.heavier.path | safe }}">{{ page.heavier.title }} »</a>
|
||||
{% if page.higher %}
|
||||
<a class="next" href="{{ page.higher.path | safe }}">{{ page.higher.title }} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -106,7 +118,7 @@
|
||||
{% else %}
|
||||
{% set search_term=page.title %}
|
||||
{% endif %}
|
||||
{{ snippets::giscus(search_term=search_term) }}
|
||||
{{ snippets::giscus(search_term=search_term, lang=page.lang) }}
|
||||
|
||||
{%- if page.lang != "en" %}
|
||||
<p class="{% if page.extra.rtl %}right-to-left{% endif %}">
|
||||
|
||||
@@ -7,12 +7,20 @@
|
||||
</p>
|
||||
{% endmacro support %}
|
||||
|
||||
{% macro giscus(search_term) %}
|
||||
{% macro giscus(search_term, lang) %}
|
||||
{% if lang != "en" %}
|
||||
{% set category = "Post Comments (translated)" %}
|
||||
{% set category_path = "post-comments-translated" %}
|
||||
{% else %}
|
||||
{% set category = "Post Comments" %}
|
||||
{% set category_path = "post-comments" %}
|
||||
{% endif %}
|
||||
|
||||
{% if search_term is number %}
|
||||
{% set discussion_url = "https://github.com/phil-opp/blog_os/discussions/" ~ search_term %}
|
||||
{% else %}
|
||||
{% set search_term_encoded = `"` ~ search_term ~ `"` | urlencode %}
|
||||
{% set discussion_url = `https://github.com/phil-opp/blog_os/discussions/categories/post-comments?discussions_q=` ~ search_term_encoded %}
|
||||
{% set discussion_url = `https://github.com/phil-opp/blog_os/discussions/categories/` ~ category_path ~ `?discussions_q=` ~ search_term_encoded %}
|
||||
{% endif %}
|
||||
|
||||
<p class="comment-note">
|
||||
@@ -24,7 +32,7 @@
|
||||
<script src="https://giscus.app/client.js"
|
||||
data-repo="phil-opp/blog_os"
|
||||
data-repo-id="MDEwOlJlcG9zaXRvcnkzOTU3NTEwMQ=="
|
||||
data-category="Post Comments"
|
||||
data-category="{{ category }}"
|
||||
data-category-id="MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMzMDE4OTg1"
|
||||
{% if search_term is number %}
|
||||
data-mapping="number"
|
||||
@@ -35,6 +43,7 @@
|
||||
data-reactions-enabled="1"
|
||||
data-emit-metadata="1"
|
||||
data-theme="preferred_color_scheme"
|
||||
data-lang="{{ lang }}"
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
{% block after_main %}
|
||||
<hr>
|
||||
<div class="PageNavigation">
|
||||
{% if page.earlier %}
|
||||
<a class="prev" href="{{ page.earlier.path | safe }}">« {{ page.earlier.title }}</a>
|
||||
{% if page.lower %}
|
||||
<a class="prev" href="{{ page.lower.path | safe }}">« {{ page.lower.title }}</a>
|
||||
{% endif %}
|
||||
{% if page.later %}
|
||||
<a class="next" href="{{ page.later.path | safe }}">{{ page.later.title }} »</a>
|
||||
{% if page.higher %}
|
||||
<a class="next" href="{{ page.higher.path | safe }}">{{ page.higher.title }} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr>
|
||||
<section>
|
||||
<h2 id="comments">Comments</h2>
|
||||
{{ snippets::giscus(search_term=page.title) }}
|
||||
{{ snippets::giscus(search_term=page.title, lang=page.lang) }}
|
||||
</section>
|
||||
|
||||
{% endblock after_main %}
|
||||
|
||||
Reference in New Issue
Block a user