mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-29 14:48:55 +00:00
Updated blog_item template to remove duplicate CSS classes in main image and redefined author variable.
This commit is contained in:
parent
7c8526864e
commit
656c2a59e4
1 changed files with 78 additions and 69 deletions
|
@ -1,12 +1,16 @@
|
|||
<article class="post" itemprop="liveBlogUpdate" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
{% if page.header.author %}
|
||||
|
||||
{% if page.header.metadata.author %}
|
||||
{% set author = page.header.metadata.author %}
|
||||
{% elseif page.header.author %}
|
||||
{% set author = page.header.author %}
|
||||
{% else %}
|
||||
{% else %}
|
||||
{% set author = page.header.taxonomy.author[0] %}
|
||||
{% endif %}
|
||||
{% if author %}
|
||||
{% endif %}
|
||||
|
||||
{% if author %}
|
||||
{% set avatar = author|replace(' ', '-')|lower %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<header>
|
||||
<div class="title">
|
||||
|
@ -25,21 +29,22 @@
|
|||
{% 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 %}
|
||||
</div>
|
||||
</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, 'image featured')|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, 'image featured')|raw }}</a>
|
||||
{% endif %}
|
||||
{% if page.header.primaryImage %}
|
||||
<a href="{{ page.url }}">{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}</a>
|
||||
{% else %}
|
||||
<a href="{{ page.url }}">{{ 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 +58,8 @@
|
|||
{{ page.content|raw }}
|
||||
{% set show_prev_next = true %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<footer>
|
||||
<ul class="actions">
|
||||
|
@ -71,17 +76,21 @@
|
|||
{% 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>
|
||||
</footer>
|
||||
|
||||
</article>
|
Loading…
Add table
Reference in a new issue