Merge pull request #10 from pmoreno-rodriguez/develop

Revert "Harmonize and modify twigs"
This commit is contained in:
pmoreno.rodriguez 2022-12-27 13:35:17 +01:00 committed by GitHub
commit 92ee80bbf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 212 additions and 172 deletions

View file

@ -2635,8 +2635,8 @@ table.alt tfoot {
text-transform: uppercase;
display: block;
border-bottom: none;
padding: 0.5rem 0.8rem;
line-height: 1.5em;
padding: 0.3rem 0.8rem;
line-height: 2.5em;
}
#header .dropdown li ul li a:hover {
color: #181818;
@ -3004,6 +3004,19 @@ body.single #wrapper {
position: relative;
width: 4em;
}
#intro .logo:before {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' preserveAspectRatio='none' zoomAndPan='disable'%3E%3Cpolygon points='0,0 100,0 100,25 50,0 0,25' style='fill:%23f4f4f4' /%3E%3Cpolygon points='0,100 100,100 100,75 50,100 0,75' style='fill:%23f4f4f4' /%3E%3C/svg%3E");
background-position: top left;
background-repeat: no-repeat;
background-size: 100% 100%;
content: "";
display: block;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
#intro .logo img {
display: block;
margin-left: -0.25em;

File diff suppressed because one or more lines are too long

View file

@ -46,8 +46,8 @@
text-transform: uppercase;
@include vendor('display', 'block');
border-bottom: none;
padding: 0.5rem 0.8rem;
line-height: 1.5em;
padding: 0.3rem 0.8rem;
line-height: 2.5em;
&:hover {
color: #181818;

View file

@ -15,6 +15,20 @@
position: relative;
width: 4em;
&:before {
background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" width="100px" height="100px" viewBox="0 0 100 100" preserveAspectRatio="none" zoomAndPan="disable"><polygon points="0,0 100,0 100,25 50,0 0,25" style="fill:#{_palette(bg-alt)}" /><polygon points="0,100 100,100 100,75 50,100 0,75" style="fill:#{_palette(bg-alt)}" /></svg>');
background-position: top left;
background-repeat: no-repeat;
background-size: 100% 100%;
content: '';
display: block;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
img {
display: block;
margin-left: -0.25em;

View file

@ -1,4 +1,4 @@
{% extends 'partials/base.html.twig' %}
{% embed 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% set base_url = page.url %}
@ -30,22 +30,20 @@
{% 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 %}
#}
{% for child in collection %}
{% if child.header.hide is not defined or not child.header.hide %}
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
{% endif %}
{% 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 %}
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}
{% block sidebar %}
{% include 'partials/sidebar_left.html.twig' %}
{% endblock %}
{% endembed %}

View file

@ -1,20 +1,10 @@
{% extends 'partials/base.html.twig' %}
{% if page.header.show_breadcrumbs is defined %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
{% else %}
{% set show_breadcrumbs = true %}
{% 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 %}
<article class="post">
<header>
<div class="title">
@ -23,11 +13,22 @@
<p>{{ page.header.subtitle }}</p>
{% endif %}
</div>
</header>
{{ page.content|raw }}
</article>
</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>
<section id="footer" class="align-center">
{% block footer %}
{% include 'partials/footer.html.twig' %}
{% endblock %}
</section>
{% endblock %}

View file

@ -1,9 +1,14 @@
{% extends 'partials/base.html.twig' %}
{% embed '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 page.header.show_breadcrumbs is defined %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
{% else %}
{% set show_breadcrumbs = true %}
{% if base_url == '/' %}
{% set base_url = '' %}
{% endif %}
{% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.parent.slug %}
{% endif %}
{% block menu %}
@ -11,6 +16,7 @@
{% endblock %}
{% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
@ -21,3 +27,5 @@
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}
{% endembed %}

View file

@ -25,7 +25,7 @@
{% endif %}
</div>
<div class="meta">
<time class="published" itemprop="datePublished" datetime="{{page.date|dateTranslate(grav.config.system.pages.dateformat.short)}}">{{ page.date|dateTranslate(grav.config.system.pages.dateformat.short)}}</time>
<time class="published" itemprop="datePublished" datetime="{{page.date|date("Y-m-d")}}">{{ page.date|date("M j, Y")}}</time>
{% if author %}
<a href="{{ base_url }}/author{{ config.system.param_sep }}{{ author }}" itemprop="keywords" class="author">{{ tag }}<span class="name" rel="author">{{ author }}</span>{% if page.header.avatarImage %}<img src="{{ page.media[page.header.avatarImage].url|e}}" alt="{{ author }}" />{% endif %}</a>
{% endif %}
@ -33,13 +33,14 @@
</header>
{% if page.header.primaryImage %}
<a href="{{ page.url }}" class="image featured">{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title)|raw }}</a>
{% elseif page.media.images %}
<a href="{{ page.url }}" class="image featured">{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title)|raw }}</a>
<a href="{{ page.url }}" class="image featured">{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}</a>
{% else %}
<a href="{{ page.url }}" class="image featured">{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}</a>
{% endif %}
{% if page.header.blog_hide_body is not defined or not page.header.blog_hide_body %}
<div itemprop="articleBody">
{% if page.header.continue_link is sameas(false) %}
{{ page.content|raw }}
{% if not truncate %}
@ -53,8 +54,8 @@
{{ page.content|raw }}
{% set show_prev_next = true %}
{% endif %}
</div>
{% endif %}
<footer>
<ul class="actions">
@ -71,17 +72,22 @@
{% if not page.isFirst %}
<li><a class="button" href="{{ page.nextSibling.url }}">{{'FUTURE.BLOG.ITEM.NEXT_POST'|t}} <i class="fa fa-chevron-right"></i></a></li>
{% endif %}
{% endif %}
</ul>
{% endif %}
</ul>
<ul class="stats">
{% if page.taxonomy.tag %}
{% for tag in page.taxonomy.tag %}
<li><a href="{{ base_url }}/tag{{ config.system.param_sep }}{{ tag }}" itemprop="keywords">{{ tag }}</a></li>
{% endfor %}
{% endif %}
<li><a href="https://twitter.com/share" data-url="{{ page.url(true) }}" data-text="{{ page.title }}" class="icon brands fa-twitter"></a></li>
<li><a href="http://www.facebook.com/sharer.php?u={{ page.url(true) }}" class="icon brands fa-facebook"></a></li>
<li><a href="https://twitter.com/share" data-url="{{ page.url(true) }}" data-text="{{ page.title }}" class="icon brands fa-twitter">
</a></li>
<li><a href="http://www.facebook.com/sharer.php?u={{ page.url(true) }}" class="icon brands fa-facebook">
</a></li>
</ul>
</footer>
</article>