Autoformatted some twigs

This commit is contained in:
pikim 2023-01-20 15:41:47 +01:00
parent 7909c59e83
commit a5a775bb32
8 changed files with 157 additions and 157 deletions

View file

@ -1,61 +1,61 @@
{% extends 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% set base_url = page.url %}
{% set feed_url = base_url %}
{% if page.header.show_breadcrumbs is defined %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
{% else %}
{% set show_breadcrumbs = true %}
{% endif %}
{% if page.header.show_pagination is defined %}
{% set show_pagination = page.header.show_pagination %}
{% else %}
{% set show_pagination = true %}
{% endif %}
{% if uri.param('category') %}
{% set page_title = theme_config.listing_title.taxonomy.category | default('Posts in Category: ') ~ uri.param('category') %}
{% elseif uri.param('tag') %}
{% set page_title = theme_config.listing_title.taxonomy.tag | default('Posts with Tag: ') ~ uri.param('tag') %}
{% elseif uri.param('author') %}
{% set page_title = theme_config.listing_title.taxonomy.author | default('Posts from Author: ') ~ uri.param('author') %}
{% set collection = page.collection() %}
{% set base_url = page.url %}
{% set feed_url = base_url %}
{% if page.header.show_breadcrumbs is defined %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
{% else %}
{% set page_title = theme_config.listing_title.blog | default('') %}
{% set show_breadcrumbs = true %}
{% endif %}
{% if page.header.show_pagination is defined %}
{% set show_pagination = page.header.show_pagination %}
{% else %}
{% set show_pagination = true %}
{% endif %}
{% if base_url == '/' %}
{% set base_url = '' %}
{% if uri.param('category') %}
{% set page_title = theme_config.listing_title.taxonomy.category | default('Posts in Category: ') ~ uri.param('category') %}
{% elseif uri.param('tag') %}
{% set page_title = theme_config.listing_title.taxonomy.tag | default('Posts with Tag: ') ~ uri.param('tag') %}
{% elseif uri.param('author') %}
{% set page_title = theme_config.listing_title.taxonomy.author | default('Posts from Author: ') ~ uri.param('author') %}
{% else %}
{% set page_title = theme_config.listing_title.blog | default('') %}
{% endif %}
{% if base_url == '/' %}
{% set base_url = '' %}
{% endif %}
{% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.slug %}
{% endif %}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.slug %}
{% endif %}
<h2>
{{page_title}}
</h2>
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% for child in collection %}
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
{% endfor %}
{% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
{% endif %}
{% endblock %}
<h2>
{{page_title}}
</h2>
{% for child in collection %}
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
{% endfor %}
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
{% endif %}
{% endblock %}
{% block sidebar %}
{% if theme_config.sidebar == true %}
{% include 'partials/sidebar_left.html.twig' %}
{% endif %}
{% endblock %}
{% block sidebar %}
{% if theme_config.sidebar == true %}
{% include 'partials/sidebar_left.html.twig' %}
{% endif %}
{% endblock %}

View file

@ -8,22 +8,24 @@
<article class="post">
<header>
<div class="title">
<h2>{{ page.header.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
<h2>{{ page.header.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
</div>
</header>
</header>
{% if page.header.primaryImage %}
{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
{% else %}
{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
{% endif %}
{{ page.content|raw}}
{% if page.header.primaryImage %}
{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
{% else %}
{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
{% endif %}
{{ page.content|raw }}
</article>
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}

View file

@ -5,12 +5,12 @@
{% endblock %}
{% block content %}
<article class="post">
<article class="post">
<header>
<div class="title">
<h2><span class="icon fa-exclamation-triangle"></span> Error {{ page.header.http_response_code }}</h2>
<p>{{ page.content|raw }}</p>
</div>
<div class="title">
<h2><span class="icon fa-exclamation-triangle"></span> Error {{ page.header.http_response_code }}</h2>
<p>{{ page.content|raw }}</p>
</div>
</header>
</article>
</article>
{% endblock %}

View file

@ -1,29 +1,29 @@
{% extends 'partials/base.html.twig' %}
{% set base_url = page.parent.url %}
{% set feed_url = base_url %}
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog]) %}
{% if base_url == '/' %}
{% set base_url = '' %}
{% endif %}
{% set base_url = page.parent.url %}
{% set feed_url = base_url %}
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog]) %}
{% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.parent.slug %}
{% endif %}
{% if base_url == '/' %}
{% set base_url = '' %}
{% endif %}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.parent.slug %}
{% endif %}
{% block content %}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% include 'partials/blog_item.html.twig' with {'truncate':false} %}
{% include 'partials/blog_item.html.twig' with {'truncate':false} %}
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}

View file

@ -3,16 +3,16 @@
{% block header %}{% endblock %}
{% block content %}
<article class="post">
<article class="post">
<header>
<div class="title">
<h1 class="logo"><a href="{{ home_url }}">{{ site.title }}</a></h1>
<h2>Error {{ page.header.http_response_code }}</h2>
<p>{{ page.content|raw }}</p>
</div>
<div class="title">
<h1 class="logo"><a href="{{ home_url }}">{{ site.title }}</a></h1>
<h2>Error {{ page.header.http_response_code }}</h2>
<p>{{ page.content|raw }}</p>
</div>
</header>
</article>
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
</article>
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}

View file

@ -1,11 +1,11 @@
<article class="post" itemprop="liveBlogUpdate" itemscope itemtype="http://schema.org/BlogPosting">
{% if page.header.metadata.author %}
{% set author = page.header.metadata.author %}
{% set author = page.header.metadata.author %}
{% elseif page.header.author %}
{% set author = page.header.author %}
{% set author = page.header.author %}
{% else %}
{% set author = page.header.taxonomy.author[0] %}
{% set author = page.header.taxonomy.author[0] %}
{% endif %}
{% if author %}

View file

@ -8,38 +8,39 @@
{% block content %}
<article class="post">
<header>
<div class="title">
<h2>{{ page.header.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
</div>
</header>
{% if page.header.primaryImage %}
{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
<article class="post">
<header>
<div class="title">
<h2>{{ page.header.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
</div>
</header>
{% if page.header.primaryImage %}
{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
{% endif %}
{{ page.content|raw}}
{{ page.content|raw}}
<!-- Portfolio -->
{% block portfolio %}
<section>
<section>
<div class="row aln-center">
{% for item in page.header.images %}
{% for item in page.header.images %}
<div class="{{columns}} portfolio_item">
<a href="{{page.media[item.image].url}}" class="glightbox" data-width="100vw" data-zoomable="true" data-glightbox='title: {{item.title}}; description: {{item.description|raw}}'>
<span class="image fit"><img src="{{page.media[item.thumb].url}}" alt="image" /></span>
</a>
<a href="{{page.media[item.image].url}}" class="glightbox" data-width="100vw" data-zoomable="true" data-glightbox='title: {{item.title}}; description: {{item.description|raw}}'>
<span class="image fit"><img src="{{page.media[item.thumb].url}}" alt="image"/></span>
</a>
</div>
{% endfor %}
{% endfor %}
</div>
</section>
</section>
{% endblock %}
</article>
</article>
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}

View file

@ -5,38 +5,35 @@
{% endblock %}
{% block content %}
<article class="post simplesearch">
<article class="post simplesearch">
<header>
<div class="title">
<div class="title">
{% block results %}
<div class="content-padding simplesearch">
<h1 class="search-header">{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS"|t }}</h1>
<div class="center">
{% include 'partials/simplesearch_searchbox_results.html.twig' %}
</div>
<p class="published" >
{% if query %}
{% set count = search_results ? search_results.count : 0 %}
{% if count is same as( 1 ) %}
{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS_SUMMARY_SINGULAR"|t(query|e)|raw }}
{% else %}
{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS_SUMMARY_PLURAL"|t(query|e, count)|raw }}
{% endif %}
{% endif %}
</p>
<div class="content-padding simplesearch">
<h1 class="search-header">{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS"|t }}</h1>
<div class="center">
{% include 'partials/simplesearch_searchbox_results.html.twig' %}
</div>
<p class="published">
{% if query %}
{% set count = search_results ? search_results.count : 0 %}
{% if count is same as( 1 ) %}
{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS_SUMMARY_SINGULAR"|t(query|e)|raw }}
{% else %}
{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS_SUMMARY_PLURAL"|t(query|e, count)|raw }}
{% endif %}
{% endif %}
</p>
</div>
{% endblock %}
</div>
</div>
</header>
{% for page in search_results %}
{% include 'partials/simplesearch_item.html.twig' with {'page':page} %}
{% for page in search_results %}
{% include 'partials/simplesearch_item.html.twig' with {'page':page} %}
{% endfor %}
</article>
</article>
{% endblock %}
{% block sidebar %}
{% if theme_config.sidebar == true %}
{% include 'partials/sidebar_left.html.twig' %}