mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-07-02 16:18: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>
|
||||
</div>
|
||||
<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>
|
||||
</header>
|
||||
<p>{{'FUTURE.FORM_SUMMARY'|t}}</p>
|
||||
|
|
|
@ -11,7 +11,11 @@
|
|||
<article>
|
||||
<header>
|
||||
<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>
|
||||
<a href="{{p.url}}" class="image">
|
||||
{{ bannerimage.cropZoom(64,64).quality(60).loading('lazy').html('',p.title)|raw }}
|
||||
|
|
|
@ -29,7 +29,11 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
<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 %}
|
||||
<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 %}
|
||||
|
@ -91,4 +95,4 @@
|
|||
</a></li>
|
||||
</ul>
|
||||
</footer>
|
||||
</article>
|
||||
</article>
|
||||
|
|
|
@ -11,7 +11,11 @@
|
|||
<article class="mini-post">
|
||||
<header>
|
||||
<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>
|
||||
</header>
|
||||
<a href="{{ p.url }}" class="image">
|
||||
|
|
|
@ -13,7 +13,11 @@
|
|||
</div>
|
||||
|
||||
<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>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p>{{ page.summary|truncate(200)|raw }}</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue