Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release new version #253

Merged
merged 39 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
08efbe4
fix: prevent page flicking after click 'back2top' button
Zavins Sep 17, 2023
c323da5
fix: allow mobile website to adjust font size
Zavins Sep 17, 2023
d296582
Merge pull request #249 from Zavins/fix-back2top
XPoet Sep 19, 2023
c97b9f5
Merge pull request #250 from Zavins/fix-mobile-font-adjustment
XPoet Sep 19, 2023
981bcee
chore(master): release 3.7.7
XPoet Sep 12, 2023
0428295
ui: optimize blockquote tag style
XPoet Sep 13, 2023
ab6c379
feat: add custom note tag in post
XPoet Sep 13, 2023
5745c71
feat: add the ability to share post
XPoet Sep 14, 2023
2e805ec
perf: normalizes the tooltip component
XPoet Sep 14, 2023
6e45812
build: optimize JS for handling copyright info
XPoet Sep 14, 2023
76da72e
build: optimize JS for post share
XPoet Sep 14, 2023
b05ba63
ui: optimize the bottom style of the page
XPoet Sep 14, 2023
47b3849
feat(post): added reward author configuration
XPoet Sep 14, 2023
2363829
feat: add custom button tag in post
XPoet Sep 14, 2023
455857b
perf: optimize tooltip-img component custom style setting
XPoet Sep 15, 2023
a163a78
feat: allow custom reward text
XPoet Sep 15, 2023
40d0aa1
ui: optimize custom button tag style
XPoet Sep 15, 2023
3720483
feat: add custom tag tabs
XPoet Sep 18, 2023
a0f5a9f
perf: custom injected JS files adapted to PJAX
XPoet Sep 19, 2023
1bc6a27
fix: optimize busuanzi script load
XPoet Sep 19, 2023
ed08e3f
style: function naming optimization
XPoet Sep 19, 2023
cf3134d
Merge remote-tracking branch 'origin/dev' into dev
XPoet Sep 19, 2023
88f7bf4
build: optimize js files load for PJAX
XPoet Sep 19, 2023
d0eae9f
refactor: refactor back2top and back2bottom
XPoet Sep 20, 2023
9403947
perf: optimize TOC handle logic
XPoet Sep 20, 2023
4141cf4
ui: optimize post share layout
XPoet Sep 20, 2023
d97aa97
build: fontawesome-free upgrade to v6.4.2
XPoet Sep 20, 2023
10abbe2
feat(front-matter): add home_cover and post_cover settings
XPoet Sep 20, 2023
e3a1a6e
fix: optimize lazyload of tooltip-img component
XPoet Sep 20, 2023
1793583
feat: first screen description add typewriter effect
XPoet Sep 21, 2023
79464a6
ui: always display back2Top
XPoet Sep 22, 2023
8235b96
fix: fixed the copy code button was not visible in Mac style
XPoet Sep 25, 2023
da77c5c
perf: optimize back2Top display logic
XPoet Sep 25, 2023
72157d9
fix: optimize article meta info icon
XPoet Sep 25, 2023
5c6a041
ui: optimize reward author button style
XPoet Sep 25, 2023
db5e327
build: update twikoo comments config
XPoet Sep 26, 2023
105fab5
fix(home): fixed a bug show two stick icon
XPoet Sep 26, 2023
3aa47db
fix: fixed hexo build error
XPoet Sep 26, 2023
134c99f
ui: optimize friends link page style
XPoet Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ post:
# Post copyright info
copyright_info: false # Option values: true | false

# Post share
share: false # Option values: true | false

# Reward author
reward:
enable: false # Option values: true | false
img_link: # Image link for the payment QR code
text: # Custom reward text, Can be null

# ---------------------------------------------------------------------------------------
# Code block
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/code_block.html
Expand Down Expand Up @@ -223,9 +232,9 @@ comment:
# See: https://github.com/imaegoo/twikoo
# https://twikoo.js.org
twikoo:
env_id: # Tencent Cloud environment id
region: # Environment region. If select Guangzhou, fill in "ap-guangzhou"
version: 1.6.8 # Twikoo version, default use v1.6.8
env_id: # Environment ID
region: # Environment region, Can be null
version: 1.6.21 # Twikoo version, default use 1.6.21

# Waline
# See: https://github.com/walinejs/waline
Expand Down
7 changes: 7 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ footer:
tencent_cloud: Tencent Cloud
upyun: UPYUN
total_words: Total words
post:
share:
qq: "Share to QQ"
wechat: "Share to WeChat"
weibo: "Share to WeiBo"
wechat_scan: "Scan by WeChat"
reward: Reward Author
7 changes: 7 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ footer:
tencent_cloud: 腾讯云
upyun: 又拍云
total_words: 总字数
post:
share:
qq: "分享到 QQ"
wechat: "分享到微信"
weibo: "分享到微博"
wechat_scan: "微信扫一扫"
reward: 打赏作者
7 changes: 7 additions & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ footer:
tencent_cloud: 騰訊雲
upyun: 又拍雲
total_words: 總字數
post:
share:
qq: "分享到 QQ"
wechat: "分享到微信"
weibo: "分享到微博"
wechat_scan: "微信掃壹掃"
reward: 給作者打賞
4 changes: 2 additions & 2 deletions layout/_partial/article-meta-info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const home_tag_limit_number = theme?.home_article?.tag?.limit || 3
</span>
<% } %>

<% if ((post.categories.length && theme?.home_article?.category?.enable === true) || page_type === 'post') { %>
<% if (post.categories.length && (theme?.home_article?.category?.enable === true || page_type === 'post')) { %>
<span class="meta-info-item article-category border-box"><i class="icon fas fa-folder"></i>&nbsp;
<ul>
<% post.categories.forEach((category, i) => {
Expand All @@ -42,7 +42,7 @@ const home_tag_limit_number = theme?.home_article?.tag?.limit || 3
</span>
<% } %>

<% if ((post.tags.length && theme?.home_article?.tag?.enable === true) || page_type === 'post') { %>
<% if (post.tags.length && (theme?.home_article?.tag?.enable === true || page_type === 'post')) { %>
<span class="article-tag meta-info-item border-box">
<i class="icon fas fa-tags"></i>&nbsp;
<ul>
Expand Down
22 changes: 13 additions & 9 deletions layout/_partial/first-screen.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<%
const { description: fs_description, hitokoto: fs_hitokoto } = theme?.style?.first_screen || {}
const { description: c_description } = config
let final_description = fs_description || c_description || ''
let final_description = fs_description || ''
final_description = final_description.split('||').map(desc => desc.trim())
if (final_description.length > 2) { final_description.length = 2 }
const { enable: sc_enable, links: sc_links } = theme?.social_contact || {}
Expand All @@ -12,9 +11,15 @@ const { enable: sc_enable, links: sc_links } = theme?.social_contact || {}

<div class="middle-placeholder border-box">
<% if (final_description.length || fs_hitokoto === true) { %>
<div class="description hitokoto">
<% for (const idx in final_description) { %>
<div class="desc-item"><%= final_description[idx] %></div>
<div class="description border-box">
<% if (fs_hitokoto === true) { %>
<div class="desc-item border-box"><span class="desc hitokoto"></span><span class="cursor">|</span></div>
<% } else { %>
<% for (const idx in final_description) { %>
<% if (final_description[idx]) { %>
<div class="desc-item border-box"><span class="desc"><%= final_description[idx] %></span><span class="cursor">|</span></div>
<% } %>
<% } %>
<% } %>
</div>
<% } %>
Expand Down Expand Up @@ -42,9 +47,9 @@ const { enable: sc_enable, links: sc_links } = theme?.social_contact || {}
}
%>
<div class="tooltip sc-icon-item <%= isImg ? 'tooltip-img clear' : ''%>"
data-content="<%= __(key) %>"
data-name="<%= key %>"
<%= isImg ? 'data-img-url='+ link +'' : '' %>
data-tooltip-content="<%= __(key) %>"
data-tooltip-img-name="<%= key %>"
<%= isImg ? 'data-tooltip-img-url='+ link +'' : '' %>
>
<% if(key === 'email') { %>
<a href="mailto:<%- link %>">
Expand All @@ -65,6 +70,5 @@ const { enable: sc_enable, links: sc_links } = theme?.social_contact || {}
</div>
<% } %>
</div>

</div>
</div>
2 changes: 1 addition & 1 deletion layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const web_master = bi_author || hexo_author
<% } %>
<%- __(
'footer.deploy',
'<span class="tooltip" data-content="' + __('footer.deploy_provider.' + f_site_deploy?.provider) + '"><img src="/images/deploy-provider/' + f_site_deploy?.provider + '.png"></span>'
'<span class="tooltip" data-tooltip-content="' + __('footer.deploy_provider.' + f_site_deploy?.provider) + '"><img src="/images/deploy-provider/' + f_site_deploy?.provider + '.png"></span>'
) %>
<% if (f_site_deploy?.url) { %>
</a>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/friends-link.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ul class="friends-link-list border-box">
<% for (const f of theme?.links) { %>
<% if (f?.title) { %>
<li class="link-type-title text-ellipsis"><i class="fa-solid fa-users"></i>&nbsp;<%= f?.title %></li>
<li class="link-type-title text-ellipsis border-box"><%= f.title %></li>
<% } else { %>
<li class="friends-link-item border-box">
<a class="a-wrap border-box" href="<%= f?.link %>">
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
<% } %>
<% }) %>
<% } %>
<%- exportConfig() %>
<%- exportThemeConfig() %>
</head>

10 changes: 5 additions & 5 deletions layout/_partial/pjax/pjax.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
analytics: false,
currentUrlFullReload: false,
scrollRestoration: false,
// scrollTo: true,
scrollTo: true,
});

document.addEventListener('pjax:send', () => {
KEEP.utils.pjaxProgressBarStart();
KEEP.utils.pjaxProgressBarStart()
});

document.addEventListener('pjax:complete', () => {
KEEP.utils.pjaxProgressBarEnd();
window.pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'));
KEEP.refresh();
KEEP.utils.pjaxProgressBarEnd()
window.pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'))
KEEP.initExecute()
});
});
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="type">
<%- __('copyright.license') %>
</div>
<div class="content tooltip" data-content="CC BY-NC-SA 4.0">
<div class="content tooltip" data-tooltip-content="CC BY-NC-SA 4.0">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">
<i class="fa-brands fa-creative-commons"></i>
<i class="fa-brands fa-creative-commons-by"></i>
Expand All @@ -43,7 +43,7 @@

<i class="copyright-bg fa-solid fa-copyright"></i>
</div>
<div class="copy-copyright-info flex-center tooltip" data-content="<%= __('copy_copyright.copy') %>" data-offset-y="-2px">
<div class="copy-copyright-info flex-center tooltip" data-tooltip-content="<%= __('copy_copyright.copy') %>" data-tooltip-offset-y="-2px">
<i class="fa-solid fa-copy"></i>
</div>
</div>
21 changes: 21 additions & 0 deletions layout/_partial/post/post-share.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="post-share-container border-box">
<ul class="share-list-wrap border-box">
<li class="qq share-item border-box flex-center tooltip"
data-tooltip-content="<%= __('post.share.qq') %>"
>
<i class="fa-brands fa-qq"></i>
</li>
<li class="wechat share-item border-box flex-center tooltip tooltip-img"
data-tooltip-content="<%= __('post.share.wechat') %>"
data-tooltip-img-tip="<%= __('post.share.wechat_scan') %>"
data-tooltip-img-style="background-color: #fff; top: -10px; padding: 0.6rem 0.6rem 0.1rem 0.6rem;"
>
<i class="fa-brands fa-weixin"></i>
</li>
<li class="weibo share-item border-box flex-center tooltip"
data-tooltip-content="<%= __('post.share.weibo') %>"
>
<i class="fa-brands fa-weibo"></i>
</li>
</ul>
</div>
File renamed without changes.
10 changes: 10 additions & 0 deletions layout/_partial/post/reward-author.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="reward-author-container border-box flex-center">
<button class="keep-button border-box flex-center reward-btn tooltip tooltip-img"
data-tooltip-content="<%= theme?.post?.reward?.text || __('post.reward') %>"
data-tooltip-img-url="<%= theme?.post?.reward?.img_link %>"
data-tooltip-img-trigger="click"
data-tooltip-img-style="top: -8px;"
>
<i class="fa-solid fa-hand-holding-heart"></i>
</button>
</div>
56 changes: 32 additions & 24 deletions layout/_partial/scripts.ejs
Original file line number Diff line number Diff line change
@@ -1,53 +1,61 @@
<!-- common -->
<%- __js([
'js/utils.js',
'js/main.js',
'js/header-shrink.js',
'js/back2top.js',
'js/dark-light-toggle.js'
'js/dark-light-toggle.js',
'js/main.js',
'js/libs/anime.min.js'
]) %>

<%
const {
local_search: t_local_search,
code_copy: t_code_copy,
code_block: t_code_block,
lazyload: t_lazyload,
toc: t_toc,
pjax: t_pjax,
comment: t_comment
} = theme
%>

<% if (t_local_search?.enable === true) { %>
<!-- local-search -->
<% if (theme?.local_search?.enable === true) { %>
<%- __js('js/local-search.js') %>
<% } %>

<% if (t_code_copy?.enable === true || t_code_block?.enable === true || t_code_block?.tools?.enable === true) { %>
<!-- code-block -->
<% if (theme?.code_block?.tools?.enable === true) { %>
<%- __js('js/code-block.js') %>
<% } %>

<% if (t_lazyload?.enable === true) { %>
<!-- lazyload -->
<% if (theme?.lazyload?.enable === true) { %>
<%- __js('js/lazyload.js') %>
<% } %>

<div class="post-scripts<%= theme?.pjax?.enable === true ? ' pjax' : '' %>">
<div class="<%= theme?.pjax?.enable === true ? 'pjax' : '' %>">
<% if (is_post()) { %>
<%- __js('js/post-helper.js') %>
<% if (t_toc?.enable === true || t_comment?.enable === true) { %>
<%- __js('js/libs/anime.min.js') %>
<!-- post-helper -->
<%- __js('js/post/post-helper.js') %>

<!-- toc -->
<% if (theme?.toc?.enable === true) { %>
<%- __js('js/post/toc.js') %>
<% } %>

<!-- copyright-info -->
<% if (theme?.post?.copyright_info === true) { %>
<%- __js('js/post/copyright-info.js') %>
<% } %>
<% if (t_toc?.enable === true) { %>
<%- __js('js/toc.js') %>

<!-- share -->
<% if (theme?.post?.share === true) { %>
<%- __js('js/post/share.js') %>
<% } %>
<% } %>

<!-- category-page -->
<% if (isCategoriesPage(page.path) === true) { %>
<%- __js('js/category-page.js') %>
<% } %>

<!-- links-page -->
<% if (isLinksPage(page.path) === true) { %>
<%- __js('js/links-page.js') %>
<% } %>
</div>

<% if (t_pjax?.enable === true) { %>
<!-- pjax -->
<% if (theme?.pjax?.enable === true) { %>
<%- partial('pjax/pjax') %>
<% } %>
16 changes: 4 additions & 12 deletions layout/_partial/side-tools.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
</li>
<% } %>

<% if (theme?.style?.scroll?.percent !== true) { %>
<li class="tools-item tool-scroll-to-top flex-center">
<i class="fas fa-arrow-up"></i>
</li>
<% } %>

<li class="tools-item tool-scroll-to-bottom flex-center">
<i class="fas fa-arrow-down"></i>
</li>
Expand All @@ -52,11 +46,9 @@
<i class="fas fa-cog fa-spin"></i>
</li>

<% if (theme?.style?.scroll?.percent === true) { %>
<li class="tools-item tool-scroll-to-top flex-center">
<i class="arrow-up fas fa-arrow-up"></i>
<span class="percent"></span>
</li>
<% } %>
<li class="tools-item tool-scroll-to-top flex-center show-arrow">
<i class="arrow fas fa-arrow-up"></i>
<span class="percent"></span>
</li>
</ul>
</div>
4 changes: 1 addition & 3 deletions layout/_partial/tagcloud.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<%- partial('_partial/common/empty-content') %>
<% } %>
<% if (page?.comment === true) { %>
<div class="tagcloud-comments">
<%- partial('_partial/comment/comment') %>
</div>
<%- partial('_partial/comment/comment') %>
<% } %>
</div>
</div>
Loading