build(config): change scroll.progress_bar and scroll.percent enable mode
This commit is contained in:
parent
c2ee33fa60
commit
d404e93c26
|
@ -73,12 +73,10 @@ style:
|
|||
# Page scroll style settings
|
||||
scroll:
|
||||
# Show progress bar in top when page scroll
|
||||
progress_bar:
|
||||
enable: false # Option values: true | false
|
||||
progress_bar: false # Option values: true | false
|
||||
|
||||
# Show percent when page scroll
|
||||
percent:
|
||||
enable: false # Option values: true | false
|
||||
percent: false # Option values: true | false
|
||||
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Navigation menu
|
||||
|
|
|
@ -3,6 +3,7 @@ const { title: bi_title, logo_img: bi_logo_img } = theme.base_info
|
|||
const { logo: s_logo, first_screen: s_first_screen } = theme.style
|
||||
const { enable: s_fs_enable, header_transparent: s_fs_header_transparent } = s_first_screen
|
||||
const { title: config_title } = config
|
||||
const { enable: local_search_enable } = theme.local_search
|
||||
%>
|
||||
<header class="header-wrapper<%= s_fs_enable === true && is_home() && s_fs_header_transparent ? ' transparent-1' : '' %>">
|
||||
|
||||
|
@ -21,7 +22,7 @@ const { title: config_title } = config
|
|||
<div class="right">
|
||||
<div class="pc">
|
||||
<ul class="menu-list">
|
||||
<% for (let i in theme.menu) { %>
|
||||
<% for (const i in theme.menu) { %>
|
||||
<li class="menu-item">
|
||||
<a class="<%- isInHomePaging(page.path, theme.menu[i]) ? 'active' : is_current(theme.menu[i]) ? 'active' : '' %>"
|
||||
href="<%- url_for(theme.menu[i]) %>"
|
||||
|
@ -30,7 +31,7 @@ const { title: config_title } = config
|
|||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<% if (theme.local_search.enable === true) { %>
|
||||
<% if (local_search_enable === true) { %>
|
||||
<li class="menu-item search search-popup-trigger">
|
||||
<i class="fas fa-search"></i>
|
||||
</li>
|
||||
|
@ -38,7 +39,7 @@ const { title: config_title } = config
|
|||
</ul>
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<% if (theme.local_search.enable === true) { %>
|
||||
<% if (local_search_enable === true) { %>
|
||||
<div class="icon-item search search-popup-trigger"><i class="fas fa-search"></i></div>
|
||||
<% } %>
|
||||
<div class="icon-item menu-bar">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="progress-bar-container">
|
||||
<% if (theme.style.scroll.progress_bar.enable === true) { %>
|
||||
<% if (theme.style.scroll.progress_bar === true) { %>
|
||||
<span class="scroll-progress-bar"></span>
|
||||
<% } %>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</li>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.style.scroll.percent.enable !== true) { %>
|
||||
<% if (theme.style.scroll.percent !== true) { %>
|
||||
<li class="tools-item tool-scroll-to-top flex-center">
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
</li>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<li class="tools-item tool-toggle-show flex-center">
|
||||
<i class="fas fa-cog fa-spin"></i>
|
||||
</li>
|
||||
<% if (theme.style.scroll.percent.enable === true) { %>
|
||||
<% 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>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (hexo-config('style.scroll.progress_bar.enable') == true) {
|
||||
if (hexo-config('style.scroll.progress_bar') == true) {
|
||||
|
||||
.scroll-progress-bar {
|
||||
position absolute
|
||||
|
|
|
@ -70,7 +70,7 @@ $tools-item-border-radius = 0.1rem
|
|||
|
||||
.exposed-tools-list {
|
||||
|
||||
if (hexo-config('style.scroll.percent.enable') == true) {
|
||||
if (hexo-config('style.scroll.percent') == true) {
|
||||
.tool-scroll-to-top {
|
||||
display none
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ KEEP.initUtils = () => {
|
|||
|
||||
initData() {
|
||||
const { scroll, first_screen } = KEEP.theme_config.style
|
||||
this.isHasScrollProgressBar = scroll.progress_bar.enable === true
|
||||
this.isHasScrollPercent = scroll.percent.enable === true
|
||||
this.isHasScrollProgressBar = scroll.progress_bar === true
|
||||
this.isHasScrollPercent = scroll.percent === true
|
||||
const { enable, header_transparent } = first_screen
|
||||
this.isHeaderTransparent = enable === true && header_transparent === true
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue