Fix identation and missing trans

This commit is contained in:
Alexandre Vicenzi 2020-04-20 23:36:36 +02:00
parent 6b87efa507
commit 533bc1760e
7 changed files with 54 additions and 34 deletions

View file

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %} – {{ _('Archives') }}{% endblock %} {% block title %} – {{ _('Archives') }}{% endblock %}
{% block content %} {% block content %}
@ -9,12 +10,16 @@
<div> <div>
<dl> <dl>
{% set previous_date = False %} {% set previous_date = False %}
{% for article in dates %} {% for article in dates %}
{% if article.locale_date != previous_date %} {% if article.locale_date != previous_date %}
{% set previous_date = article.locale_date %} {% set previous_date = article.locale_date %}
<dt>{{ article.locale_date }}</dt> <dt>{{ article.locale_date }}</dt>
{% endif %} {% endif %}
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
<dd>
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
</dd>
{% endfor %} {% endfor %}
</dl> </dl>
</div> </div>

View file

@ -31,7 +31,7 @@
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }} category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
{% if 'post_stats' in PLUGINS %} {% if 'post_stats' in PLUGINS %}
&#8226; {{ article.stats['read_mins'] }} min read &#8226; {{ _('%(minutes) min read', minutes=article.stats['read_mins']) }}
{% endif %} {% endif %}
</p> </p>
</header> </header>

View file

@ -136,11 +136,7 @@
{% include "partial/gtm.html" %} {% include "partial/gtm.html" %}
{% endif %} {% endif %}
</head> </head>
<body <body {% if not THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}class="{{ THEME_COLOR|default('light') }}-theme"{% endif %}>
{% if not THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}
class="{{ THEME_COLOR|default('light') }}-theme"
{% endif %}
>
{% if GOOGLE_TAG_MANAGER %} {% if GOOGLE_TAG_MANAGER %}
{% include "partial/gtm_noscript.html" %} {% include "partial/gtm_noscript.html" %}
{% endif %} {% endif %}
@ -153,22 +149,25 @@
<img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png" alt="{{ SITETITLE }}" title="{{ SITETITLE }}"> <img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
{% endif %} {% endif %}
</a> </a>
<h1><a href="{{ SITEURL }}">{{ SITETITLE }}</a></h1>
<h1>
<a href="{{ SITEURL }}">{{ SITETITLE }}</a>
</h1>
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %} {% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
{% if 'tipue_search' in PLUGINS %} {% if 'tipue_search' in PLUGINS %}
<form class="navbar-search" action="/search.html" role="search"> <form class="navbar-search" action="/search.html" role="search">
<input type="text" name="q" id="tipue_search_input" placeholder="Search.."> <input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}">
</form> </form>
{% endif %} {% endif %}
{% if pages or LINKS %} {% if pages or LINKS %}
<nav> <nav>
<ul class="list"> <ul class="list">
{# Open links in new window depending on the LINKS_IN_NEW_TAB setting #} {# Open links in new window depending on the LINKS_IN_NEW_TAB setting #}
{% macro get_target(link) -%} {% macro get_target(link) -%}
{%- if LINKS_IN_NEW_TAB is not defined -%} {%- if LINKS_IN_NEW_TAB in ('all', true) -%}
_blank
{%- elif LINKS_IN_NEW_TAB in ('all', none, true) -%}
_blank _blank
{%- elif LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL) -%} {%- elif LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL) -%}
_blank _blank
@ -180,14 +179,22 @@
{% if PAGES_SORT_ATTRIBUTE -%} {% if PAGES_SORT_ATTRIBUTE -%}
{% set pages = pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %} {% set pages = pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %}
{%- endif %} {%- endif %}
{% if DISPLAY_PAGES_ON_MENU %} {% if DISPLAY_PAGES_ON_MENU %}
{% for page in pages %} {% for page in pages %}
<li><a target="{{ get_target(SITEURL) }}" href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li> <li>
<a target="{{ get_target(SITEURL) }}"
href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">
{{ page.title }}
</a>
</li>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% for name, link in LINKS %} {% for name, link in LINKS %}
<li><a target="{{ get_target(link) }}" href="{{ link }}" >{{ name }}</a></li> <li>
<a target="{{ get_target(link) }}" href="{{ link }}" >{{ name }}</a>
</li>
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>
@ -197,9 +204,9 @@
{% for name, link in SOCIAL %} {% for name, link in SOCIAL %}
<li> <li>
<a {% if name == 'mastodon' %}rel="me"{% endif %} class="sc-{{ name }}" href="{{ link }}" target="_blank"> <a {% if name == 'mastodon' %}rel="me"{% endif %} class="sc-{{ name }}" href="{{ link }}" target="_blank">
<i class="{% if name in ['envelope', 'rss'] %}fas{% else %}fab{% endif %} fa-{{ name }}"> <i class="{% if name in ['envelope', 'rss'] %}fas{% else %}fab{% endif %} fa-{{ name }}"></i>
</i> </a>
</a></li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
@ -213,7 +220,6 @@
(adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});
</script> </script>
{% endif %} {% endif %}
</aside> </aside>
<main> <main>
{% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.main_menu %} {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.main_menu %}
@ -270,8 +276,6 @@
{% include "partial/jsonld.html" %} {% include "partial/jsonld.html" %}
{% block additional_js %}{% endblock %}
{% if GITHUB_CORNER_URL %} {% if GITHUB_CORNER_URL %}
{% include 'partial/github.html' %} {% include 'partial/github.html' %}
{% endif %} {% endif %}
@ -283,5 +287,7 @@
}); });
</script> </script>
{% endif %} {% endif %}
{% block additional_js %}{% endblock %}
</body> </body>
</html> </html>

View file

@ -10,7 +10,9 @@
<div> <div>
<ul class="list"> <ul class="list">
{% for category, articles in categories|sort %} {% for category, articles in categories|sort %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li> <li>
<a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})
</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>

View file

@ -29,7 +29,7 @@
{% endif %} {% endif %}
{% if 'post_stats' in PLUGINS %} {% if 'post_stats' in PLUGINS %}
&#8226; {{ article.stats['read_mins'] }} min read &#8226; {{ _('%(minutes) min read', minutes=article.stats['read_mins']) }}
{% endif %} {% endif %}
</p> </p>
</header> </header>
@ -41,7 +41,10 @@
{{ article.summary }} {{ article.summary }}
{% if article.content != article.summary %} {% if article.content != article.summary %}
<br> <br>
<a class="btn" href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ _('Continue reading') }}</a> <a class="btn"
href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">
{{ _('Continue reading') }}
</a>
{% endif %} {% endif %}
{% else %} {% else %}
{{ article.content }} {{ article.content }}
@ -65,5 +68,4 @@
</script> </script>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -9,11 +9,13 @@
<div> <div>
<dl> <dl>
{% set previous_date = False %} {% set previous_date = False %}
{% for article in dates %} {% for article in dates %}
{% if article.locale_date != previous_date %} {% if article.locale_date != previous_date %}
{% set previous_date = article.locale_date %} {% set previous_date = article.locale_date %}
<dt>{{ article.locale_date }}</dt> <dt>{{ article.locale_date }}</dt>
{% endif %} {% endif %}
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd> <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %} {% endfor %}
</dl> </dl>

View file

@ -1,4 +1,7 @@
{% if 'tipue_search' in PLUGINS %} {% extends 'base.html' %} {% block title %} {{ _('Search') }} - {{ SITENAME|striptags }} {% endblock title %} {% block content %} {% if 'tipue_search' in PLUGINS %}
{% extends 'base.html' %}
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
{% block content %}
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('#tipue_search_input').tipuesearch({ $('#tipue_search_input').tipuesearch({
@ -15,5 +18,5 @@
</header> </header>
<div id="tipue_search_content"></div> <div id="tipue_search_content"></div>
</article> </article>
{% endblock content %}
{% endblock content %} {% endif %} {% endif %}