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

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

Loading…
Cancel
Save