mirror of https://gitlab.com/curben/blog
refactor(es6): arrow function
This commit is contained in:
parent
7fd712bba0
commit
105de8515c
|
@ -1,10 +1,10 @@
|
|||
<% if (pagination === 2) { %>
|
||||
<% page.posts.each(function(post) { %>
|
||||
<% page.posts.each((post) => { %>
|
||||
<%- partial('article', {post: post, index: true}) %>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
<% let last %>
|
||||
<% page.posts.each(function(post, i) { %>
|
||||
<% page.posts.each((post, i) => { %>
|
||||
<% const year = post.date.year() %>
|
||||
<% if (last !== year) { %>
|
||||
<% if (last !== null) { %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if (post.photos && post.photos.length) { %>
|
||||
<div class="article-gallery">
|
||||
<div class="article-gallery-photos">
|
||||
<% post.photos.forEach(function(photo, i) { %>
|
||||
<% post.photos.forEach((photo, i) => { %>
|
||||
<a class="article-gallery-img" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
|
||||
<img src="<%- url_for(photo) %>" itemprop="image">
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue