mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-29 14:48:55 +00:00
Autoformatted some twigs
This commit is contained in:
parent
7909c59e83
commit
a5a775bb32
8 changed files with 157 additions and 157 deletions
|
@ -1,61 +1,61 @@
|
||||||
{% extends 'partials/base.html.twig' %}
|
{% extends 'partials/base.html.twig' %}
|
||||||
|
|
||||||
{% set collection = page.collection() %}
|
{% set collection = page.collection() %}
|
||||||
{% set base_url = page.url %}
|
{% set base_url = page.url %}
|
||||||
{% set feed_url = base_url %}
|
{% set feed_url = base_url %}
|
||||||
{% if page.header.show_breadcrumbs is defined %}
|
{% if page.header.show_breadcrumbs is defined %}
|
||||||
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
|
{% 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') %}
|
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if base_url == '/' %}
|
{% if uri.param('category') %}
|
||||||
{% set base_url = '' %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if base_url == base_url_relative %}
|
<h2>
|
||||||
{% set feed_url = base_url~'/'~page.slug %}
|
{{page_title}}
|
||||||
{% endif %}
|
</h2>
|
||||||
|
|
||||||
{% block menu %}
|
{% for child in collection %}
|
||||||
{% include 'partials/sidebar_right.html.twig' %}
|
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
|
||||||
{% endblock %}
|
{% endfor %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
|
||||||
{% include 'partials/breadcrumbs.html.twig' %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<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 %}
|
{% 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} %}
|
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% if theme_config.sidebar == true %}
|
{% if theme_config.sidebar == true %}
|
||||||
{% include 'partials/sidebar_left.html.twig' %}
|
{% include 'partials/sidebar_left.html.twig' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -8,22 +8,24 @@
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2>{{ page.header.title }}</h2>
|
<h2>{{ page.header.title }}</h2>
|
||||||
{% if page.header.subtitle %}
|
{% if page.header.subtitle %}
|
||||||
<p>{{ page.header.subtitle }}</p>
|
<p>{{ page.header.subtitle }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
</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 }}
|
||||||
|
|
||||||
</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}}
|
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<section id="footer" class="align-center">
|
<section id="footer" class="align-center">
|
||||||
{% include 'partials/footer.html.twig' %}
|
{% include 'partials/footer.html.twig' %}
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2><span class="icon fa-exclamation-triangle"></span> Error {{ page.header.http_response_code }}</h2>
|
<h2><span class="icon fa-exclamation-triangle"></span> Error {{ page.header.http_response_code }}</h2>
|
||||||
<p>{{ page.content|raw }}</p>
|
<p>{{ page.content|raw }}</p>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</article>
|
</article>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
{% extends 'partials/base.html.twig' %}
|
{% 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 = page.parent.url %}
|
||||||
{% set base_url = '' %}
|
{% set feed_url = base_url %}
|
||||||
{% endif %}
|
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog]) %}
|
||||||
|
|
||||||
{% if base_url == base_url_relative %}
|
{% if base_url == '/' %}
|
||||||
{% set feed_url = base_url~'/'~page.parent.slug %}
|
{% set base_url = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block menu %}
|
|
||||||
{% include 'partials/sidebar_right.html.twig' %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% if base_url == base_url_relative %}
|
||||||
|
{% set feed_url = base_url~'/'~page.parent.slug %}
|
||||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
{% endif %}
|
||||||
{% include 'partials/breadcrumbs.html.twig' %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% include 'partials/blog_item.html.twig' with {'truncate':false} %}
|
{% block menu %}
|
||||||
|
{% include 'partials/sidebar_right.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<section id="footer" class="align-center">
|
{% block content %}
|
||||||
{% include 'partials/footer.html.twig' %}
|
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||||
</section>
|
{% include 'partials/breadcrumbs.html.twig' %}
|
||||||
{% endblock %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'partials/blog_item.html.twig' with {'truncate':false} %}
|
||||||
|
|
||||||
|
<section id="footer" class="align-center">
|
||||||
|
{% include 'partials/footer.html.twig' %}
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
{% block header %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h1 class="logo"><a href="{{ home_url }}">{{ site.title }}</a></h1>
|
<h1 class="logo"><a href="{{ home_url }}">{{ site.title }}</a></h1>
|
||||||
<h2>Error {{ page.header.http_response_code }}</h2>
|
<h2>Error {{ page.header.http_response_code }}</h2>
|
||||||
<p>{{ page.content|raw }}</p>
|
<p>{{ page.content|raw }}</p>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</article>
|
</article>
|
||||||
<section id="footer" class="align-center">
|
<section id="footer" class="align-center">
|
||||||
{% include 'partials/footer.html.twig' %}
|
{% include 'partials/footer.html.twig' %}
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<article class="post" itemprop="liveBlogUpdate" itemscope itemtype="http://schema.org/BlogPosting">
|
<article class="post" itemprop="liveBlogUpdate" itemscope itemtype="http://schema.org/BlogPosting">
|
||||||
|
|
||||||
{% if page.header.metadata.author %}
|
{% if page.header.metadata.author %}
|
||||||
{% set author = page.header.metadata.author %}
|
{% set author = page.header.metadata.author %}
|
||||||
{% elseif page.header.author %}
|
{% elseif page.header.author %}
|
||||||
{% set author = page.header.author %}
|
{% set author = page.header.author %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set author = page.header.taxonomy.author[0] %}
|
{% set author = page.header.taxonomy.author[0] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if author %}
|
{% if author %}
|
||||||
|
|
|
@ -8,38 +8,39 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<header>
|
<header>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2>{{ page.header.title }}</h2>
|
<h2>{{ page.header.title }}</h2>
|
||||||
{% if page.header.subtitle %}
|
{% if page.header.subtitle %}
|
||||||
<p>{{ page.header.subtitle }}</p>
|
<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 %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{{ page.content|raw}}
|
</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}}
|
||||||
|
|
||||||
<!-- Portfolio -->
|
<!-- Portfolio -->
|
||||||
{% block portfolio %}
|
{% block portfolio %}
|
||||||
<section>
|
<section>
|
||||||
<div class="row aln-center">
|
<div class="row aln-center">
|
||||||
{% for item in page.header.images %}
|
{% for item in page.header.images %}
|
||||||
<div class="{{columns}} portfolio_item">
|
<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}}'>
|
<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>
|
<span class="image fit"><img src="{{page.media[item.thumb].url}}" alt="image"/></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<section id="footer" class="align-center">
|
<section id="footer" class="align-center">
|
||||||
{% include 'partials/footer.html.twig' %}
|
{% include 'partials/footer.html.twig' %}
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -5,38 +5,35 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<article class="post simplesearch">
|
<article class="post simplesearch">
|
||||||
<header>
|
<header>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
|
||||||
{% block results %}
|
{% block results %}
|
||||||
<div class="content-padding simplesearch">
|
<div class="content-padding simplesearch">
|
||||||
<h1 class="search-header">{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS"|t }}</h1>
|
<h1 class="search-header">{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS"|t }}</h1>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
{% include 'partials/simplesearch_searchbox_results.html.twig' %}
|
{% 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>
|
</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 %}
|
{% endblock %}
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
{% for page in search_results %}
|
{% for page in search_results %}
|
||||||
{% include 'partials/simplesearch_item.html.twig' with {'page':page} %}
|
{% include 'partials/simplesearch_item.html.twig' with {'page':page} %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% if theme_config.sidebar == true %}
|
{% if theme_config.sidebar == true %}
|
||||||
{% include 'partials/sidebar_left.html.twig' %}
|
{% include 'partials/sidebar_left.html.twig' %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue