diff --git a/themes/typing/layout/_partial/after-footer.ejs b/themes/typing/layout/_partial/after-footer.ejs index 0ddb5dc..2013399 100644 --- a/themes/typing/layout/_partial/after-footer.ejs +++ b/themes/typing/layout/_partial/after-footer.ejs @@ -7,7 +7,7 @@ -<% if (theme.fancybox){ %> +<% if (theme.fancybox) { %> @@ -15,9 +15,9 @@ <%/* Initialize cloudinary responsive function */%> <%/* javascript of Typing theme */%> -<%- js('js/typing') %> \ No newline at end of file +<%- js('js/typing') %> diff --git a/themes/typing/layout/_partial/archive.ejs b/themes/typing/layout/_partial/archive.ejs index e2d866f..bb322ab 100644 --- a/themes/typing/layout/_partial/archive.ejs +++ b/themes/typing/layout/_partial/archive.ejs @@ -1,28 +1,31 @@ -<% if (pagination == 2){ %> - <% page.posts.each(function(post){ %> +<% if (pagination === 2) { %> + <% page.posts.each(function(post) { %> <%- partial('article', {post: post, index: true}) %> <% }) %> <% } else { %> - <% var last; %> - <% page.posts.each(function(post, i){ %> - <% var year = post.date.year(); %> - <% if (last != year){ %> - <% if (last != null){ %> + <% let last %> + <% page.posts.each(function(post, i) { %> + <% const year = post.date.year() %> + <% if (last !== year) { %> + <% if (last !== null) { %> <% } %> - <% last = year; %> + <% last = year %> <% } %> - <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> + <%- partial('archive-post', {post: post, even: i % 2 === 0}) %> <% }) %> - <% if (page.posts.length){ %> + <% if (page.posts.length) { %> <% } %> <% } %> -<% if (page.total > 1){ %> +<% if (page.total > 1) { %> - <% var prev_text = "« " + __('prev');var next_text = __('next') + " »"%> + <% + let prev_text = "« " + __('prev') + let next_text = __('next') + " »" + %> <%- paginator({ prev_text: prev_text, next_text: next_text diff --git a/themes/typing/layout/_partial/article.ejs b/themes/typing/layout/_partial/article.ejs index 8bcc60c..39634d0 100644 --- a/themes/typing/layout/_partial/article.ejs +++ b/themes/typing/layout/_partial/article.ejs @@ -9,7 +9,7 @@ <% } %> - <% if (post.excerpt && index){ %> + <% if (post.excerpt && index) { %> <%- post.excerpt %> <% if (theme.excerpt_link) { %> diff --git a/themes/typing/layout/_partial/head.ejs b/themes/typing/layout/_partial/head.ejs index ef3ef18..edfdca0 100644 --- a/themes/typing/layout/_partial/head.ejs +++ b/themes/typing/layout/_partial/head.ejs @@ -3,27 +3,27 @@ <% - var title = page.title; + let title = page.title - if (is_archive()){ - title = __('archive_a'); + if (is_archive()) { + title = __('archive_a') - if (is_month()){ - title += ': ' + page.year + '/' + page.month; - } else if (is_year()){ - title += ': ' + page.year; + if (is_month()) { + title += ': ' + page.year + '/' + page.month + } else if (is_year()) { + title += ': ' + page.year } - } else if (is_category()){ - title = __('category') + ': ' + page.category; - } else if (is_tag()){ - title = __('tag') + ': ' + page.tag; + } else if (is_category()) { + title = __('category') + ': ' + page.category + } else if (is_tag()) { + title = __('tag') + ': ' + page.tag } %> - <% if (title){ %><%= title %> | <% } %><%= config.title %> + <% if (title) { %><%= title %> | <% } %><%= config.title %> <%/* Add Open Graph meta tags for easier sharing on social networking sites */%> <%- open_graph() %> - <% if (theme.rss){ %> + <% if (theme.rss) { %> <% } %> @@ -40,7 +40,7 @@ <%- css('css/typing') %> - <% if (theme.icons){ %> + <% if (theme.icons) { %> diff --git a/themes/typing/layout/_partial/header.ejs b/themes/typing/layout/_partial/header.ejs index 0d6aa5a..bf8ca48 100644 --- a/themes/typing/layout/_partial/header.ejs +++ b/themes/typing/layout/_partial/header.ejs @@ -10,7 +10,7 @@ <% } else { %> <% } %> - <% for (var i in theme.menu){ %> + <% for (let i in theme.menu) { %> <%= i %> <% } %> diff --git a/themes/typing/layout/_partial/post/category.ejs b/themes/typing/layout/_partial/post/category.ejs index a16fda1..19005de 100644 --- a/themes/typing/layout/_partial/post/category.ejs +++ b/themes/typing/layout/_partial/post/category.ejs @@ -1,4 +1,4 @@ -<% if (post.categories && post.categories.length){ %> +<% if (post.categories && post.categories.length) { %> <%- list_categories(post.categories, { show_count: false, diff --git a/themes/typing/layout/_partial/post/gallery.ejs b/themes/typing/layout/_partial/post/gallery.ejs index 886c8ec..ea4603a 100644 --- a/themes/typing/layout/_partial/post/gallery.ejs +++ b/themes/typing/layout/_partial/post/gallery.ejs @@ -1,11 +1,11 @@ -<% if (post.photos && post.photos.length){ %> +<% if (post.photos && post.photos.length) { %> - <% post.photos.forEach(function(photo, i){ %> + <% post.photos.forEach(function(photo, i) { %> <% }) %> -<% } %> \ No newline at end of file +<% } %> diff --git a/themes/typing/layout/_partial/post/nav.ejs b/themes/typing/layout/_partial/post/nav.ejs index 960a9ed..9d13038 100644 --- a/themes/typing/layout/_partial/post/nav.ejs +++ b/themes/typing/layout/_partial/post/nav.ejs @@ -1,10 +1,10 @@ -<% if (post.prev || post.next){ %> +<% if (post.prev || post.next) { %> - <% if (post.prev){ %> + <% if (post.prev) { %> <%= __('newer') %> - <% if (post.prev.title){ %> + <% if (post.prev.title) { %> <%= post.prev.title %> <% } else { %> (no title) @@ -14,7 +14,7 @@ <% } else { %> <% } %> - <% if (post.next){ %> + <% if (post.next) { %> <%= __('older') %> <%= post.next.title %> diff --git a/themes/typing/layout/_partial/post/tag.ejs b/themes/typing/layout/_partial/post/tag.ejs index 35ded20..61e4379 100644 --- a/themes/typing/layout/_partial/post/tag.ejs +++ b/themes/typing/layout/_partial/post/tag.ejs @@ -1,4 +1,4 @@ -<% if (post.tags && post.tags.length){ %> +<% if (post.tags && post.tags.length) { %> <%- list_tags(post.tags, { show_count: false, class: 'article-tag' diff --git a/themes/typing/layout/_partial/post/title.ejs b/themes/typing/layout/_partial/post/title.ejs index 1a57037..cdd1908 100644 --- a/themes/typing/layout/_partial/post/title.ejs +++ b/themes/typing/layout/_partial/post/title.ejs @@ -1,9 +1,9 @@ -<% if (post.link){ %> +<% if (post.link) { %> <%= post.title %> -<% } else if (post.title){ %> - <% if (index){ %> +<% } else if (post.title) { %> + <% if (index) { %> <%= post.title %> @@ -12,4 +12,4 @@ <%= post.title %> <% } %> -<% } %> \ No newline at end of file +<% } %> diff --git a/themes/typing/layout/about.ejs b/themes/typing/layout/about.ejs index 61aecac..bc19989 100644 --- a/themes/typing/layout/about.ejs +++ b/themes/typing/layout/about.ejs @@ -10,18 +10,18 @@ - <% for (var key in theme.links.solid) { %> + <% for (let key in theme.links.solid) { %> - <% if (theme.icons){ %> + <% if (theme.icons) { %> <% } else { %> <%= key %> <% } %> <% } %> - <% for (var key in theme.links.brands) { %> + <% for (let key in theme.links.brands) { %> - <% if (theme.icons){ %> + <% if (theme.icons) { %> <% } else { %> <%= key %> diff --git a/themes/typing/layout/archive.ejs b/themes/typing/layout/archive.ejs index a7509cf..ef9ccd0 100644 --- a/themes/typing/layout/archive.ejs +++ b/themes/typing/layout/archive.ejs @@ -1,6 +1,6 @@ <%- partial('_partial/header') %> - <% if (theme.nav === 'left'){ %> + <% if (theme.nav === 'left') { %> <% } else { %>
diff --git a/themes/typing/layout/_partial/head.ejs b/themes/typing/layout/_partial/head.ejs index ef3ef18..edfdca0 100644 --- a/themes/typing/layout/_partial/head.ejs +++ b/themes/typing/layout/_partial/head.ejs @@ -3,27 +3,27 @@