i18n
xaoxuu 5 years ago
parent 9bf6a9ce8a
commit e75ec76c8f
  1. 41
      layout/_partial/post.ejs
  2. 2
      layout/_third-party/fancybox.ejs

@ -1,22 +1,23 @@
<article class="post reveal <%= (post.title) ? "" : "no-title" %>">
<%- partial('meta',{post:post}) %>
<section class="article typo">
<%- post.excerpt || post.description || post.content %>
<% if (post.readmore != false && (post.excerpt || post.description)) { %>
<div class="readmore">
<a href="<%- url_for(post.path) %>" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
<%- __('post.read_more') %>
</a>
</div>
<% } %>
<% if (post.tags && post.tags.length) { %>
<div class="full-width auto-padding tags">
<% post.tags.each(function(item){ %>
<a href="<%- url_for(item.path) %>"><i class="fas fa-hashtag fa-fw"></i><%=item.name %></a>
<%})%>
</div>
<% } %>
</section>
<%- partial('meta',{post:post}) %>
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
<%- post.excerpt || post.description || post.content %>
<% if (post.readmore != false && (post.excerpt || post.description)) { %>
<div class="readmore">
<a href="<%- url_for(post.path) %>" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
<%- __('post.read_more') %>
</a>
</div>
<% } %>
</div>
<% if (post.tags && post.tags.length) { %>
<div class="full-width auto-padding tags">
<% post.tags.each(function(item){ %>
<a href="<%- url_for(item.path) %>"><i class="fas fa-hashtag fa-fw"></i><%=item.name %></a>
<%})%>
</div>
<% } %>
</section>
</article>

@ -1,7 +1,7 @@
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script>
let LAZY_LOAD_IMAGE = "<%- config.lazyload %>";
$(".article.typo").find("img").each(function () {
$(".article-entry").find("img").each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("src"));

Loading…
Cancel
Save