mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-07-04 09:08:54 +00:00
Translate date if translate_date plugin is enabled
This commit is contained in:
parent
63235cb2b9
commit
269c3f0cce
5 changed files with 25 additions and 5 deletions
|
@ -5,7 +5,11 @@
|
||||||
<h2>{{ form.message }}</h2>
|
<h2>{{ form.message }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<time class="published" datetime="{{form.date|date("Y-m-d")}}">{{ form.date|date("M j, Y")}}</time>
|
{% if plugin.translate_date.enabled %}
|
||||||
|
<time class="published" datetime="{{ form.date|td(null, "Y-m-d") }}">{{ form.date|td }}</time>
|
||||||
|
{% else %}
|
||||||
|
<time class="published" datetime="{{ form.date|date("Y-m-d") }}">{{ form.date|date("M j, Y") }}</time>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<p>{{'FUTURE.FORM_SUMMARY'|t}}</p>
|
<p>{{'FUTURE.FORM_SUMMARY'|t}}</p>
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h3><a href="{{p.url}}">{{ p.title }}</a></h3>
|
<h3><a href="{{p.url}}">{{ p.title }}</a></h3>
|
||||||
<time class="published" datetime="{{p.date|date("Y-m-d")}}">{{ p.date|date("M j, Y")}}</time>
|
{% if plugin.translate_date.enabled %}
|
||||||
|
<time class="published" datetime="{{ p.date|td(null, "Y-m-d") }}">{{ p.date|td }}</time>
|
||||||
|
{% else %}
|
||||||
|
<time class="published" datetime="{{ p.date|date("Y-m-d") }}">{{ p.date|date("M j, Y") }}</time>
|
||||||
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
<a href="{{p.url}}" class="image">
|
<a href="{{p.url}}" class="image">
|
||||||
{{ bannerimage.cropZoom(64,64).quality(60).loading('lazy').html('',p.title)|raw }}
|
{{ bannerimage.cropZoom(64,64).quality(60).loading('lazy').html('',p.title)|raw }}
|
||||||
|
|
|
@ -29,7 +29,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<time class="published" itemprop="datePublished" datetime="{{page.date|date("Y-m-d")}}">{{ page.date|date("M j, Y")}}</time>
|
{% if plugin.translate_date.enabled %}
|
||||||
|
<time class="published" itemprop="datePublished" datetime="{{ page.date|td(null, "Y-m-d") }}">{{ page.date|td }}</time>
|
||||||
|
{% else %}
|
||||||
|
<time class="published" itemprop="datePublished" datetime="{{ page.date|date("Y-m-d") }}">{{ page.date|date("M j, Y") }}</time>
|
||||||
|
{% endif %}
|
||||||
{% if author %}
|
{% 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>
|
<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 %}
|
{% endif %}
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
<article class="mini-post">
|
<article class="mini-post">
|
||||||
<header>
|
<header>
|
||||||
<h3><a href="{{ p.url }}">{{ p.title }}</a></h3>
|
<h3><a href="{{ p.url }}">{{ p.title }}</a></h3>
|
||||||
<time class="published" datetime="{{p.date|date("Y-m-d")}}">{{ p.date|date("M j, Y")}}</time>
|
{% if plugin.translate_date.enabled %}
|
||||||
|
<time class="published" datetime="{{ p.date|td(null, "Y-m-d") }}">{{ p.date|td }}</time>
|
||||||
|
{% else %}
|
||||||
|
<time class="published" datetime="{{ p.date|date("Y-m-d") }}">{{ p.date|date("M j, Y") }}</time>
|
||||||
|
{% endif %}
|
||||||
<a href="{{ p.url }}" class="author"><img src="{{ p.media[p.header.avatarImage].url}}" alt="" /></a>
|
<a href="{{ p.url }}" class="author"><img src="{{ p.media[p.header.avatarImage].url}}" alt="" /></a>
|
||||||
</header>
|
</header>
|
||||||
<a href="{{ p.url }}" class="image">
|
<a href="{{ p.url }}" class="image">
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-details">
|
<div class="search-details">
|
||||||
|
{% if plugin.translate_date.enabled %}
|
||||||
|
<span class="search-date">{{ page.date|td(null, config.system.pages.dateformat.short) }}</span>
|
||||||
|
{% else %}
|
||||||
<span class="search-date">{{ page.date|date(config.system.pages.dateformat.short) }}</span>
|
<span class="search-date">{{ page.date|date(config.system.pages.dateformat.short) }}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>{{ page.summary|truncate(200)|raw }}</p>
|
<p>{{ page.summary|truncate(200)|raw }}</p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue