feat(microformats): add hAtom class names

* http://microformats.org/wiki/hatom
This commit is contained in:
curben 2019-06-26 17:19:14 +09:30
parent bdafe4a208
commit 17c823bfbd
4 changed files with 13 additions and 5 deletions

View File

@ -1,14 +1,17 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost"> <article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<%- partial('_partial/header') %> <%- partial('_partial/header') %>
<hr/> <hr/>
<div class="article-inner"> <div class="hentry article-inner">
<%- partial('post/gallery') %> <%- partial('post/gallery') %>
<% if (post.link || post.title) { %> <% if (post.link || post.title) { %>
<header class="article-header"> <header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %> <%- partial('post/title', {class_name: 'entry-title article-title'}) %>
</header> </header>
<% } %> <% } %>
<div class="article-entry typo" itemprop="articleBody"> <% if (post.subtitle) { %>
<p class="entry-summary"><%- post.subtitle %></p>
<% } %>
<div class="entry-content article-entry typo" itemprop="articleBody">
<%- toc(page.content, {list_number: false}) %> <%- toc(page.content, {list_number: false}) %>
<%- post.content %> <%- post.content %>
</div> </div>

View File

@ -1,2 +1,2 @@
<%/* 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, 'D MMM YYYY') %></time> <time class="published" datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>

View File

@ -1,3 +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 */%>
<time datetime="<%= date(post.lastUpdated, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="dateUpdated"><%= date(post.lastUpdated, 'D MMM YYYY') %></time> <time class="updated" datetime="<%= date(post.lastUpdated, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="dateUpdated"><%= date(post.lastUpdated, 'D MMM YYYY') %></time>

View File

@ -572,6 +572,11 @@ textarea {
transition: color 0.1s linear; transition: color 0.1s linear;
} }
/* Hide post's subtitle in article */
.entry-summary {
display: none;
}
.archive-container hr, .archive-container hr,
.archive-footer hr, .archive-footer hr,
.article .article-footer hr, .article .article-footer hr,