Autoformatted some twigs

This commit is contained in:
pikim 2023-01-20 00:08:50 +01:00
parent 3318a38408
commit ecc1d5c964
6 changed files with 83 additions and 84 deletions

View file

@ -1,5 +1,7 @@
<header id="header">
<h1 class="logo"><a href="{{ home_url }}">{{ site.title }}</a></h1>
<h1 class="logo">
<a href="{{ home_url }}">{{ site.title }}</a>
</h1>
<nav class="dropdown">
{% block header_navigation %}
{% include 'partials/navigation.html.twig' %}

View file

@ -1,6 +1,6 @@
<li class="langswitcher">
{% set display_format = display_format ?? config.get('plugins.langswitcher.language_display', 'long') %}
{% for language in langswitcher.languages %}
{% set display_format = display_format ?? config.get('plugins.langswitcher.language_display', 'long') %}
{% for language in langswitcher.languages %}
{% set show_language = true %}
{% if language == langswitcher.current %}
@ -27,5 +27,5 @@
<a href="{{ lang_url ~ uri.params }}" class="external{{ active_class }}">{% include 'partials/langswitcher-' ~ display_format ~ '.html.twig' %}</a>
{% endif %}
{% endfor %}
{% endfor %}
</li>

View file

@ -1,9 +1,9 @@
{% set logo = theme_var(mobile ? 'custom_logo_mobile' : 'custom_logo') %}
<a href="{{ home_url }}" class="logo">
{% if logo %}
{% if logo %}
{% set logo_file = (logo|first).name %}
<img src="{{ url('theme://images/logo/' ~ logo_file) }}" alt="{{ site.title }}" />
{% else %}
<img src="{{ url('theme://images/logo/' ~ logo_file) }}" alt="{{ site.title }}"/>
{% else %}
{% include('@images/grav-logo.svg') %}
{% endif %}
{% endif %}
</a>

View file

@ -1,3 +1,3 @@
{% for meta in page.metadata %}
<meta {% if meta.name %}name="{{ meta.name }}" {% endif %}{% if meta.http_equiv %}http-equiv="{{ meta.http_equiv }}" {% endif %}{% if meta.charset %}charset="{{ meta.charset }}" {% endif %}{% if meta.property %}property="{{ meta.property }}" {% endif %}{% if meta.content %}content="{{ meta.content }}" {% endif %}/>
<meta {% if meta.name %} name="{{ meta.name }}" {% endif %} {% if meta.http_equiv %} http-equiv="{{ meta.http_equiv }}" {% endif %} {% if meta.charset %} charset="{{ meta.charset }}" {% endif %} {% if meta.property %} property="{{ meta.property }}" {% endif %} {% if meta.content %} content="{{ meta.content }}" {% endif %}/>
{% endfor %}

View file

@ -2,8 +2,7 @@
{% set base_url = base_url|default(page.url) %}
{% if pagination|length > 1 %}
<ul class="actions pagination">
<ul class="actions pagination">
{% if pagination.hasPrev %}
{% set url = (base_url ~ pagination.params ~ pagination.prevUrl)|replace({'//':'/'}) %}
<li><a class="button large previous" rel="prev" href="{{ url }}">{{'FUTURE.BLOG.PAGINATION.PREVIOUS'|t}}</a></li>
@ -12,7 +11,6 @@
{% endif %}
{% for paginate in pagination %}
{% if paginate.isCurrent %}
<li><span class="disabled button large">{{ paginate.number }}</span></li>
{% elseif paginate.isInDelta %}
@ -21,14 +19,13 @@
{% elseif paginate.isDeltaBorder %}
<li class="gap"><span>&hellip;</span></li>
{% endif %}
{% endfor %}
{% if pagination.hasNext %}
{% set url = (base_url ~ pagination.params ~ pagination.nextUrl)|replace({'//':'/'}) %}
<li><a class="button large next" rel="next" href="{{ url }}">{{'FUTURE.BLOG.PAGINATION.NEXT'|t}}</a></li>
{% else %}
<li><span class="disabled button large">{{'FUTURE.BLOG.PAGINATION.NEXT'|t}}</span></li>
{% endif %}
</ul>
</ul>
{% endif %}