feat(footer): add the configuration of deployment provider at the footer

This commit is contained in:
XPoet 2022-11-11 14:11:01 +08:00
parent d929aa4f7e
commit 4ff4b31db3
16 changed files with 84 additions and 37 deletions

View File

@ -42,16 +42,16 @@ style:
# Mouse hover style settings # Mouse hover style settings
hover: hover:
# Shadow effect when the mouse hover. # Shadow effect when the mouse hover
shadow: false # Option values: true | false shadow: false # Option values: true | false
# Scale effect when the mouse hovers. # Scale effect when the mouse hovers
scale: false # Option values: true | false scale: false # Option values: true | false
# First screen style settings # First screen style settings
first_screen: first_screen:
enable: false # Option values: true | false enable: false # Option values: true | false
# Set transparent background for header. # Set transparent background for header
header_transparent: false # Option values: true | false header_transparent: false # Option values: true | false
# First screen background image (You can use local image or image external link) # First screen background image (You can use local image or image external link)
@ -114,11 +114,11 @@ social_contact:
# Home page article block display settings # Home page article block display settings
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
home_article: home_article:
# Show category in home page article block. # Show category in home page article block
category: category:
enable: false # Option values: true | false enable: false # Option values: true | false
limit: 3 # Max number of categories shown in home page article block limit: 3 # Max number of categories shown in home page article block
# Show tags in home page article block. # Show tags in home page article block
tag: tag:
enable: false # Option values: true | false enable: false # Option values: true | false
limit: 5 # Max number of tags shown in home page article block limit: 5 # Max number of tags shown in home page article block
@ -168,7 +168,7 @@ code_block:
toc: toc:
enable: false # Option values: true | false enable: false # Option values: true | false
# Automatically add list number to toc. # Automatically add list number to toc
number: false # Option values: true | false number: false # Option values: true | false
# If true, all level of TOC in a post will be displayed, rather than the activated part of it. # If true, all level of TOC in a post will be displayed, rather than the activated part of it.
@ -218,7 +218,7 @@ comment:
# https://gitalk.github.io # https://gitalk.github.io
gitalk: gitalk:
github_id: # GitHub repo owner github_id: # GitHub repo owner
github_admins: # GitHub Admins (in Array type), optional. github_admins: # GitHub Admins (in Array type), optional
repository: # Repository name to store issues repository: # Repository name to store issues
client_id: # GitHub Application Client ID client_id: # GitHub Application Client ID
client_secret: # GitHub Application Client Secret client_secret: # GitHub Application Client Secret
@ -228,7 +228,7 @@ comment:
# https://twikoo.js.org # https://twikoo.js.org
twikoo: twikoo:
env_id: # Tencent Cloud environment id env_id: # Tencent Cloud environment id
region: # Environment region. If select Guangzhou, fill in "ap-guangzhou". region: # Environment region. If select Guangzhou, fill in "ap-guangzhou"
version: 1.6.7 # Twikoo version, default use v1.6.7 version: 1.6.7 # Twikoo version, default use v1.6.7
# Waline # Waline
@ -270,6 +270,9 @@ pjax:
# Footer settings # Footer settings
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
footer: footer:
since: 2020 # the starting year of your website. Can be null since: 2020 # The starting year of your website, Can be null
icp: # ICP record number of your website. Can be null icp: # ICP record number of your website, Can be null
upyun: # If your site is deployed on upyun, your can fill the upyun url. Can be null site_deploy:
enable: false # Option values: true | false
provider: github # Option values: github | vercel | netlify | gitee | aliyun | tencent_cloud | upyun
url: # Your deployment provider url, Can be null

View File

@ -10,7 +10,6 @@ page: Page %d
recent_posts: Recent Posts recent_posts: Recent Posts
share: Share share: Share
powered_by: "Powered by %s" powered_by: "Powered by %s"
footer_upyun: "CDN acceleration and Cloud storage services are provided by %s"
theme: Theme theme: Theme
rss_feed: RSS Feed rss_feed: RSS Feed
category: Category category: Category
@ -66,3 +65,12 @@ ago:
week: "%s weeks ago" week: "%s weeks ago"
month: "%s months ago" month: "%s months ago"
year: "%s years ago" year: "%s years ago"
footer_deploy: "This site is provided with deployment services by %s"
deploy_provider:
github: GitHub Pages
vercel: Vercel
netlify: Netlify
gitee: Gitee Pages
aliyun: Alibaba Cloud
tencent_cloud: Tencent Cloud
upyun: UPYUN

View File

@ -10,7 +10,6 @@ page: 第 %d 页
recent_posts: 最新文章 recent_posts: 最新文章
share: 分享 share: 分享
powered_by: "由 %s 驱动" powered_by: "由 %s 驱动"
footer_upyun: "本站由 %s 提供 CDN 加速和云存储服务"
theme: 主题 theme: 主题
rss_feed: RSS Feed rss_feed: RSS Feed
category: 分类 category: 分类
@ -66,3 +65,12 @@ ago:
week: "%s 周前" week: "%s 周前"
month: "%s 个月前" month: "%s 个月前"
year: "%s 年前" year: "%s 年前"
footer_deploy: "本站由 %s 提供部署服务"
deploy_provider:
github: GitHub Pages
vercel: Vercel
netlify: Netlify
gitee: Gitee Pages
aliyun: 阿里云
tencent_cloud: 腾讯云
upyun: 又拍云

View File

@ -10,7 +10,6 @@ page: 第 %d 頁
recent_posts: 之前的文章 recent_posts: 之前的文章
share: 分享 share: 分享
powered_by: "%s 框架" powered_by: "%s 框架"
footer_upyun: "本站由 %s 提供 CDN 加速和雲存儲服務"
theme: 主題 theme: 主題
rss_feed: RSS 訂閱 rss_feed: RSS 訂閱
category: 分類 category: 分類
@ -66,3 +65,12 @@ ago:
week: "%s 周前" week: "%s 周前"
month: "%s 個月前" month: "%s 個月前"
year: "%s 年前" year: "%s 年前"
footer_deploy: "本站由 %s 提供部署服務"
deploy_provider:
github: GitHub Pages
vercel: Vercel
netlify: Netlify
gitee: Gitee Pages
aliyun: 阿裏雲
tencent_cloud: 騰訊雲
upyun: 又拍雲

View File

@ -1,5 +1,9 @@
<% <%
const { since: f_since, icp: f_icp, upyun: f_upyun } = theme.footer const {
since: f_since,
icp: f_icp,
site_deploy: f_site_deploy
} = theme.footer
const { author: bi_author } = theme.base_info const { author: bi_author } = theme.base_info
const { author: hexo_author } = config const { author: hexo_author } = config
const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme.website_count.busuanzi_count const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme.website_count.busuanzi_count
@ -41,11 +45,18 @@ const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme
</a> </a>
</div> </div>
<% } %> <% } %>
<% if (f_upyun) { %> <% if (f_site_deploy?.enable === true && f_site_deploy?.provider !== '') { %>
<div class="ypyun-info info-item"> <div class="deploy-info info-item">
<a target="_blank" rel="nofollow" href="<%= f_upyun %>"> <% if (f_site_deploy?.url) { %>
<%- __('footer_upyun', '<img src="/images/upyun.png" height="20">') %> <a target="_blank" rel="nofollow" href="<%= f_site_deploy?.url %>">
<% } %>
<%- __(
'footer_deploy',
'<span class="tooltip" data-content="' + __('deploy_provider.' + f_site_deploy?.provider) + '"><img src="/images/deploy-provider/' + f_site_deploy?.provider + '.png"></span>'
) %>
<% if (f_site_deploy?.url) { %>
</a> </a>
<% } %>
</div> </div>
<% } %> <% } %>
</div> </div>

View File

@ -261,6 +261,7 @@ button {
padding 0.2rem 0.6rem padding 0.2rem 0.6rem
color var(--text-color-6) color var(--text-color-6)
font-size 0.8rem font-size 0.8rem
letter-spacing 0.8px
white-space nowrap white-space nowrap
background var(--text-color-1) background var(--text-color-1)
border-radius 0.3rem border-radius 0.3rem

View File

@ -2,7 +2,6 @@
color var(--text-color-4) color var(--text-color-4)
font-size 1rem font-size 1rem
a { a {
color var(--text-color-4) color var(--text-color-4)
@ -12,24 +11,33 @@
} }
.info-container { .info-container {
padding-bottom 1rem
text-align center
}
.info-item {
margin 0.3rem 0
color var(--text-color-4)
&.ypyun-info a {
display flex display flex
flex-direction column
align-items center align-items center
justify-content center justify-content center
padding-bottom 1rem
.info-item {
margin 0.2rem 0
color var(--text-color-4)
&.deploy-info {
display flex
a
.tooltip {
display flex
align-items center
}
img { img {
margin 0 0.3rem height 1.2rem
margin 0 0.4rem
} }
} }
} }
}
.icon-animate { .icon-animate {
animation icon-animate 1.2s ease-in-out infinite animation icon-animate 1.2s ease-in-out infinite

View File

@ -13,14 +13,14 @@
&.is-home { &.is-home {
.transparent-1 { .transparent-1 {
background var(--header-transparent-background-1) background var(--header-transparent-background-1)
backdrop-filter: blur(4px); -webkit-backdrop-filter blur(4px)
-webkit-backdrop-filter: blur(4px); backdrop-filter blur(4px)
} }
.transparent-2 { .transparent-2 {
background var(--header-transparent-background-2) background var(--header-transparent-background-2)
backdrop-filter: blur(5px); -webkit-backdrop-filter blur(5px)
-webkit-backdrop-filter: blur(5px); backdrop-filter blur(5px)
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB