mirror of https://gitlab.com/curben/blog
fix: display date using <span> instead of <a>
* unify date_format options
This commit is contained in:
parent
ab5161bbc8
commit
bb87e3b914
|
@ -1,7 +1,7 @@
|
||||||
<article class="archive-article archive-type-<%= post.layout %>">
|
<article class="archive-article archive-type-<%= post.layout %>">
|
||||||
<div class="archive-article-inner">
|
<div class="archive-article-inner">
|
||||||
<header class="archive-article-header">
|
<header class="archive-article-header">
|
||||||
<%- partial('post/date', {class_name: 'archive-article-date', date_format: 'D MMM YYYY'}) %>
|
<span class="archive-article-date"><%- partial('post/date') %></span>
|
||||||
<%- partial('post/title', {class_name: 'archive-article-title'}) %>
|
<%- partial('post/title', {class_name: 'archive-article-title'}) %>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,13 +25,17 @@
|
||||||
<ul class="article-meta">
|
<ul class="article-meta">
|
||||||
<% if (post.lastUpdated) { %>
|
<% if (post.lastUpdated) { %>
|
||||||
<li>
|
<li>
|
||||||
<span class="label"><%= __('date_updated') %>:</span>
|
<span class="label">
|
||||||
<%- partial('post/updated-date', {class_name: 'article-date', date_format: 'D MMM YYYY'}) %>
|
<%= __('date_updated') %>:
|
||||||
|
<%- partial('post/updated-date') %>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li>
|
<li>
|
||||||
<span class="label"><%= __('date_published') %>:</span>
|
<span class="label">
|
||||||
<%- partial('post/date', {class_name: 'article-date', date_format: 'D MMM YYYY'}) %>
|
<%= __('date_published') %>:
|
||||||
|
<%- partial('post/date') %>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% if (post.categories && post.categories.length) { %>
|
<% if (post.categories && post.categories.length) { %>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
|
|
||||||
<%/* Date format is specified to skip timezone conversion */%>
|
<%/* Date format is specified to skip timezone conversion */%>
|
||||||
<time datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
|
<time datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>
|
||||||
</a>
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
<%/* User-specified updated date */%>
|
<%/* User-specified updated date */%>
|
||||||
<%/* default post.updated is (almost) always is the time 'hexo generate' is executed */%>
|
<%/* default post.updated is (almost) always is the time 'hexo generate' is executed */%>
|
||||||
<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
|
<time datetime="<%= date(post.lastUpdated, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="dateUpdated"><%= date(post.lastUpdated, 'D MMM YYYY') %></time>
|
||||||
<time datetime="<%= date(post.lastUpdated, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="dateUpdated"><%= date(post.lastUpdated, date_format) %></time>
|
|
||||||
</a>
|
|
||||||
|
|
Loading…
Reference in New Issue