Fix nav active indicator, remove useless default values
This commit is contained in:
@ -20,16 +20,16 @@
|
||||
<img id="qrcode" class="no-hover pixels" alt="QR code to a Mastodon post" src="https://api.qrserver.com/v1/create-qr-code/?data={{ post_url }}&format=gif" />
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ trans(key="comments", lang=lang) | default(value="Comments") }}</h2>
|
||||
<p>{{ trans(key="comments_description", lang=lang) | default(value="You can comment on this blog post by publicly replying to this post using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.") }}</p>
|
||||
<h2>{{ trans(key="comments", lang=lang) }}</h2>
|
||||
<p>{{ trans(key="comments_description", lang=lang) }}</p>
|
||||
|
||||
<p>
|
||||
<a id="load-comments" class="inline-button" onclick="loadComments()" onkeypress="loadComments()" tabindex="0">{{ trans(key="load_comments", lang=lang) | default(value="Load Comments") }}</a>
|
||||
<a id="load-comments" class="inline-button" onclick="loadComments()" onkeypress="loadComments()" tabindex="0">{{ trans(key="load_comments", lang=lang) }}</a>
|
||||
</p>
|
||||
|
||||
<div id="comments-wrapper">
|
||||
<noscript>
|
||||
<p>{{ trans(key="comments_noscript", lang=lang) | default(value="Loading comments relies on JavaScript. Try enabling JavaScript and reloading, or visit the original post on Mastodon.") }}</p>
|
||||
<p>{{ trans(key="comments_noscript", lang=lang) }}</p>
|
||||
</noscript>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
function loadComments() {
|
||||
let commentsWrapper = document.getElementById("comments-wrapper");
|
||||
document.getElementById("load-comments").innerHTML = "{{ trans(key='comments_loading', lang=lang) | default(value='Loading…') }}";
|
||||
document.getElementById("load-comments").innerHTML = "{{ trans(key='comments_loading', lang=lang) }}";
|
||||
fetch("https://{{ host }}/api/v1/statuses/{{ id }}/context")
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
{% if config.extra.source_url and config.extra.footer.show_source %}
|
||||
<p>
|
||||
<a href="{{ config.extra.source_url }}">{{ trans(key='footer_source', lang=lang) | default(value="Website source") }}</a>
|
||||
<a href="{{ config.extra.source_url }}">{{ trans(key='footer_source', lang=lang) }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.footer.show_powered_by %}
|
||||
<p>
|
||||
<small>
|
||||
{{ trans(key="footer_powered_by", lang=lang) | default(value="Powered by") }} <a href="https://www.getzola.org">Zola</a> {{ trans(key="footer_powered_by_and", lang=lang) | default(value="and") }} <a href="https://daudix.codeberg.page/duckquill">Duckquill</a>
|
||||
{{ trans(key="footer_powered_by", lang=lang) }} <a href="https://www.getzola.org">Zola</a> {{ trans(key="footer_powered_by_and", lang=lang) }} <a href="https://daudix.codeberg.page/duckquill">Duckquill</a>
|
||||
</small>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
@ -7,11 +7,11 @@
|
||||
{% if config.extra.nav.links %}
|
||||
<header id="site-nav">
|
||||
<nav>
|
||||
<a href="#main" id="main-content" tabindex="0">{{ trans(key="skip_to_content", lang=lang) | default(value="Skip to main content") }}</a>
|
||||
<a href="#main" id="main-content" tabindex="0">{{ trans(key="skip_to_content", lang=lang) }}</a>
|
||||
<ul>
|
||||
<li id="home">
|
||||
<a href="{{ get_url(path='/', lang=lang) }}"
|
||||
{% if current_url | default(value='/') | trim_end_matches(pat='/') == get_url(path='/') %}
|
||||
<a href="{{ get_url(path="/", lang=lang) }}"
|
||||
{% if current_url | default(value="/") | trim_end_matches(pat="/") | safe == get_url(path="/", lang=lang) | trim_end_matches(pat='/') | safe %}
|
||||
class="active"
|
||||
{% endif %}>
|
||||
{{ config.title }}
|
||||
@ -27,7 +27,7 @@
|
||||
{%- if link.url is matching('https?://') %}
|
||||
<li class="link">
|
||||
<a href="{{ link.url }}"
|
||||
{% if current_url | default(value='/') == link.url %}
|
||||
{% if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe %}
|
||||
class="active"
|
||||
{% endif %}>
|
||||
{{ title }}
|
||||
@ -36,7 +36,7 @@
|
||||
{%- else %}
|
||||
<li class="link">
|
||||
<a href="{{ get_url(path=link.url, lang=lang)}}"
|
||||
{% if current_url | default(value='/') == get_url(path=link.url, lang=lang) %}
|
||||
{% if current_url | default(value='/') | trim_end_matches(pat='/') | safe == get_url(path=link.url, lang=lang) | trim_end_matches(pat='/') | safe %}
|
||||
class="active"
|
||||
{% endif %}>
|
||||
{{ title }}
|
||||
@ -48,7 +48,7 @@
|
||||
<li id="feed">
|
||||
<a href="{{ get_url(path=config.feed_filename) }}">
|
||||
<i class="icon"></i>
|
||||
<span>{{ trans(key="feed", lang=lang) | default(value="Feed") }}</span>
|
||||
<span>{{ trans(key="feed", lang=lang) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user