diff --git a/_config.yml b/_config.yml index dd9d3d6..248d882 100755 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,7 @@ stellar: preconnect: # - https://gcore.jsdelivr.net # - https://unpkg.com + # - https://cdn.bootcdn.net open_graph: enable: true @@ -369,9 +370,9 @@ plugins: # https://scrollrevealjs.org/api/reveal.html scrollreveal: enable: #true - js: https://gcore.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js - distance: 8px - duration: 500 # ms + js: https://cdn.bootcdn.net/ajax/libs/scrollReveal.js/4.0.9/scrollreveal.min.js + distance: 16px + duration: 800 # ms interval: 100 # ms scale: 1 # 0.1~1 diff --git a/layout/_partial/cover/index.ejs b/layout/_partial/cover/index.ejs index b63c82b..cfaf68d 100644 --- a/layout/_partial/cover/index.ejs +++ b/layout/_partial/cover/index.ejs @@ -1,12 +1,12 @@ <% function layoutCover() { - if (page.layout == 'wiki') { - return partial('wiki_cover'); + if (page.wiki) { + return partial('wiki_cover') } - if (page.layout == 'post') { - return partial('post_cover'); + if (page.layout === 'post') { + return partial('post_cover') } - return ''; + return '' } %> <%- layoutCover() %> diff --git a/layout/_partial/cover/post_cover.ejs b/layout/_partial/cover/post_cover.ejs index 4036643..d1ea71c 100644 --- a/layout/_partial/cover/post_cover.ejs +++ b/layout/_partial/cover/post_cover.ejs @@ -26,7 +26,7 @@ function div() { url = 'https://source.unsplash.com/random/2000x400'; } } - el += '
'; + el += '
'; el += '
'; if (theme.plugins.lazyload && theme.plugins.lazyload.enable) { el += '
'; diff --git a/layout/_partial/cover/wiki_cover.ejs b/layout/_partial/cover/wiki_cover.ejs index a3216cf..43a7b8c 100644 --- a/layout/_partial/cover/wiki_cover.ejs +++ b/layout/_partial/cover/wiki_cover.ejs @@ -1,7 +1,7 @@ <% function layoutWikiCover() { var el = ''; - let proj = theme.wiki.tree[page.wiki]; + const proj = theme.wiki.tree[page.wiki] if (proj == undefined) { return el; } @@ -18,7 +18,7 @@ function layoutWikiCover() { if (coverpage === true) { coverpage = ['cover', 'title', 'description']; } - el += '
'; + el += '
'; el += '
'; if (cover?.length > 0 && coverpage.includes('cover')) { diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 7afbe1f..0e50571 100755 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -1,8 +1,8 @@ <% function generate_title() { if (page.wiki) { - let proj = theme.wiki.tree[page.wiki]; - let wiki = (proj && proj.name) || page.wiki; + const proj = theme.wiki.tree[page.wiki] + const wiki = proj?.name || page.wiki if (page.title) { return wiki + __('symbol.colon') + page.title + ' - ' + config.title; } else { @@ -24,9 +24,9 @@ function generate_description() { return ''; } if (page.wiki) { - let proj = theme.wiki.tree[page.wiki]; - if (proj && proj.description) { - return ''; + const proj = theme.wiki.tree[page.wiki] + if (proj?.description) { + return '' } } if (page.description || page.excerpt || page.content) { diff --git a/layout/_partial/main/article/article_footer.ejs b/layout/_partial/main/article/article_footer.ejs index d22dc69..dc06e9b 100644 --- a/layout/_partial/main/article/article_footer.ejs +++ b/layout/_partial/main/article/article_footer.ejs @@ -14,7 +14,7 @@ function layoutDiv() { if (item.length === 0) { return el; } - el += '