You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# THEME REDEFINE CONFIGURATION FILE V2# BY EVANNOTFOUND# GITHUB: https://github.com/EvanNotFound/hexo-theme-redefine# DOCUMENTATION: https://redefine-docs.ohevan.com# DEMO: https://redefine.ohevan.com# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# BASIC INFORMATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/basic/infoinfo:
# Site titletitle: Theme Redefine# Author nameauthor: The Redefine Team# Site URLurl: https://redefine.ohevan.com# BASIC INFORMATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# IMAGE CONFIGURATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/basic/defaultsdefaults:
# Faviconfavicon: /images/redefine-favicon.svg# Site logologo:
# Site avataravatar: /images/redefine-avatar.svg# IMAGE CONFIGURATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# COLORS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/basic/colorscolors:
#Primary colorprimary: "#A31F34"# Secondary color (TBD)secondary:
# Default theme mode initial value (will be overwritten by prefer-color-scheme)default_mode: light # light, dark# COLORS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# SITE CUSTOMIZATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/basic/globalglobal:
# Custom global fontsfonts:
# Chinese fontschinese:
enable: false # Whether to enable custom chinese fontsfamily: # Font familyurl: # Font URL to CSS file# English fontsenglish:
enable: false # Whether to enable custom english fontsfamily: # Font familyurl: # Font URL to CSS file# Custom title fonts (navbar, sidebar)title:
enable: false # Whether to enable custom title fontsfamily: # Font familyurl: # Font URL to CSS file# Content max widthcontent_max_width: 1000px# Sidebar widthsidebar_width: 210px# Effects on mouse hoverhover:
shadow: true # shadow effectscale: false # scale effect# Scroll progressscroll_progress:
bar: false # progress barpercentage: true # percentage# Website counterwebsite_counter:
url: https://cn.vercount.one/js # counter API URL (no need to change)enable: true # enable website counter or notsite_pv: true # site page viewsite_uv: true # site unique visitorpost_pv: true # post page view# Whether to enable single page experience (using swup). See https://swup.js.org/. similar to pjaxsingle_page: true# Whether to enable Preloader.preloader:
enable: falsecustom_message: # Custom message. If empty, the site title will be displayed# Whether to enable open graphopen_graph: true# Google Analyticsgoogle_analytics:
enable: false # Whether to enable Google Analyticsid: # Google Analytics Measurement ID# SITE CUSTOMIZATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# FONTAWESOME >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/basic/fontawesomefontawesome: # Pro v6.2.1# Thin versionthin: false# Light versionlight: false# Duotone versionduotone: false# Sharp Solid versionsharp_solid: false# FONTAWESOME <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# HOME BANNER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/home/home_bannerhome_banner:
# Whether to enable home bannerenable: true# style of home bannerstyle: fixed # static or fixed# Home banner imageimage:
light: /images/wallhaven-wqery6-light.webp # light modedark: /images/wallhaven-wqery6-dark.webp # dark mode# Home banner titletitle: Theme Redefine# Home banner subtitlesubtitle:
text: [] # subtitle text, arrayhitokoto: # 一言配置enable: false # Whether to enable hitokotoshow_author: false # Whether to show authorapi: https://v1.hitokoto.cn # API URL, can add types, see https://developer.hitokoto.cn/sentence/#%E5%8F%A5%E5%AD%90%E7%B1%BB%E5%9E%8B-%E5%8F%82%E6%95%B0typing_speed: 100# Typing speed (ms)backing_speed: 80# Backing speed (ms)starting_delay: 500# Start delay (ms)backing_delay: 1500# Backing delay (ms)loop: true # Whether to loopsmart_backspace: true # Whether to smart backspace# Color of home banner texttext_color:
light: "#fff"# light modedark: "#d1d1b6"# dark mode# Specific style of the texttext_style:
# Title font sizetitle_size: 2.8rem# Subtitle font sizesubtitle_size: 1.5rem# Line height between title and subtitleline_height: 1.2# Home banner custom fontcustom_font:
# Whether to enable custom fontenable: false# Font familyfamily:
# URL to font CSS fileurl:
# Home banner social linkssocial_links:
# Whether to enableenable: false# Social links stylestyle: default # default, reverse, center# Social linkslinks:
github: # your GitHub URLinstagram: # your Instagram URLzhihu: # your ZhiHu URLtwitter: # your twitter URLemail: # your email# ...... # you can add more# Social links with QRcode drawersqrs:
weixin: # your Wechat QRcode image URL# ...... # you can add more# HOME BANNER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# NAVIGATION BAR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/home/navbarnavbar:
# Auto hide navbarauto_hide: false# Navbar background colorcolor:
left: "#f78736"#left sideright: "#367df7"#right sidetransparency: 35#percent (10-99)# Navbar width (usually no need to modify)width:
home: 1200px #home pagepages: 1000px #other pages# Navbar linkslinks:
Home:
path: /icon: fa-regular fa-house # can be emptyArchives:
path: /archivesicon: fa-regular fa-archive # can be empty# Status:# path: https://status.ohevan.com/# icon: fa-regular fa-chart-bar# About:# icon: fa-regular fa-user# submenus:# Me: /about# Github: https://github.com/EvanNotFound/hexo-theme-redefine# Blog: https://ohevan.com# Friends: /friends# Links:# icon: fa-regular fa-link# submenus:# Link1: /link1# Link2: /link2# Link3: /link3# ...... # you can add more# Navbar search (local search). Requires hexo-generator-searchdb (npm i hexo-generator-searchdb). See https://github.com/theme-next/hexo-generator-searchdbsearch:
# Whether to enableenable: false# Preload search data when the page loadspreload: true# NAVIGATION BAR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# HOME PAGE ARTICLE SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/home/homehome:
# Sidebar settingssidebar:
enable: true # Whether to enable sidebarposition: left # Sidebar position. left, rightfirst_item: menu # First item in sidebar. menu, infoannouncement: # Announcement textshow_on_mobile: true # Whether to show sidebar navigation on mobile sheet menulinks:
# Archives:# path: /archives# icon: fa-regular fa-archive # can be empty# Tags:# path: /tags# icon: fa-regular fa-tags # can be empty# Categories:# path: /categories# icon: fa-regular fa-folder # can be empty# ...... # you can add more# Article date formatarticle_date_format: auto # auto, relative, YYYY-MM-DD, YYYY-MM-DD HH:mm:ss etc.# Article excerpt lengthexcerpt_length: 200# Max length of article excerpt# Article categories visibilitycategories:
enable: true # Whether to enablelimit: 3# Max number of categories to display# Article tags visibilitytags:
enable: true # Whether to enablelimit: 3# Max number of tags to display# HOME PAGE ARTICLE SETTINGS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# ARTICLE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/posts/articlesarticles:
# Set the styles of the articlestyle:
font_size: 16px # Font sizeline_height: 1.5# Line heightimage_border_radius: 14px # image border radiusimage_alignment: center # image alignment. left, centerimage_caption: false # Whether to display image captionlink_icon: true # Whether to display link icontitle_alignment: left # Title alignment. left, centerheadings_top_spacing: # Top spacing for headings from h1-h6h1: 3.2remh2: 2.4remh3: 1.9remh4: 1.6remh5: 1.4remh6: 1.3rem# Word count. Requires hexo-wordcount (npm install hexo-wordcount). See https://github.com/willin/hexo-wordcountword_count:
enable: true # Whether to enablecount: true # Whether to display word countmin2read: true # Whether to display reading time# Author labelauthor_label:
enable: true # Whether to enableauto: false # Whether to automatically add author label, e.g. Lv1, Lv2, Lv3...list: []# Code block settingscode_block:
copy: true # Whether to enable code block copy buttonstyle: mac # mac | simplehighlight_theme: # Color scheme for highlightjs code highlighting. For preview, see https://highlightjs.org/exampleslight: github # light mode theme, support: github, atom-one-light, defaultdark: vs2015 # dark mode theme, support: github-dark, monokai-sublime, vs2015, night-owl, atom-one-dark, nord, tokyo-night-dark, a11y-dark, agatefont: # Custom fontenable: false # Whether to enablefamily: # Font familyurl: # Font URL to CSS file# Table of contents settingstoc:
enable: true # Whether to enable TOCmax_depth: 3# TOC depthnumber: false # Whether to add number to TOC automaticallyexpand: true # Whether to expand TOCinit_open: true # Open toc by default# Whether to enable copyright noticecopyright:
enable: true # Whether to enabledefault: cc_by_nc_sa # Default license, can be cc_by_nc_sa, cc_by_nd, cc_by_nc, cc_by_sa, cc_by, all_rights_reserved, public_domain# Whether to enable lazyload for imageslazyload: true# Article recommendation. Requires nodejieba (npm install nodejieba). Transplanted from hexo-theme-volantis.recommendation:
# Whether to enable article recommendationenable: false# Article recommendation titletitle: 推荐阅读# Max number of articles to displaylimit: 3# Max number of articles to display mobilemobile_limit: 2# Placeholder imageplaceholder: /images/wallhaven-wqery6-light.webp# Skip directoryskip_dirs: []# ARTICLE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# COMMENT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/posts/commentcomment:
# Whether to enable commentenable: true# Comment systemsystem: waline # waline, gitalk, twikoo, giscus# System configurationconfig:
# Waline comment system. See https://waline.js.org/waline:
serverUrl: https://example.example.com # Waline server URL. e.g. https://example.example.comlang: zh-CN # Waline language. e.g. zh-CN, en-US. See https://waline.js.org/guide/client/i18n.htmlemoji: [] # Waline emojis, see https://waline.js.org/guide/features/emoji.htmlrecaptchaV3Key: wasd # Google reCAPTCHA v3 key. See https://waline.js.org/reference/client/props.html#recaptchav3keyturnstileKey: # Turnstile key. See https://waline.js.org/reference/client/props.html#turnstilekeyreaction: false # Waline reaction. See https://waline.js.org/reference/client/props.html#reaction# Gitalk comment system. See https://github.com/gitalk/gitalkgitalk:
clientID: # GitHub Application Client IDclientSecret: # GitHub Application Client Secretrepo: # GitHub repositoryowner: # GitHub repository ownerproxy: # GitHub repository proxy# Twikoo comment system. See https://twikoo.js.org/twikoo:
version: 1.6.10 # Twikoo version, do not modify if you dont know what it isserver_url: # Twikoo server URL. e.g. https://example.example.comregion: # Twikoo region. can be empty# Giscus comment system. See https://giscus.app/giscus:
repo: # Github repository name e.g. EvanNotFound/hexo-theme-redefinerepo_id: # Github repository idcategory: # Github discussion categorycategory_id: # Github discussion category idmapping: pathname # Which value to use as the unique identifier for the page. e.g. pathname, url, title, og:title. DO NOT USE og:title WITH PJAX ENABLED since pjax will not update og:title when the page changesstrict: 0# Whether to enable strict mode. e.g. 0, 1reactions_enabled: 1# Whether to enable reactions. e.g. 0, 1emit_metadata: 0# Whether to emit metadata. e.g. 0, 1lang: en # Giscus language. e.g. en, zh-CN, zh-TWinput_position: bottom # Place the comment box above/below the comments. e.g. top, bottomloading: lazy # Load the comments lazily# COMMENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# FOOTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/footerfooter:
# Show website running timeruntime: true # show website running time or not# Icon in footer, write fontawesome icon code hereicon: '<i class="fa-solid fa-heart fa-beat" style="--fa-animation-duration: 0.5s; color: #f54545"></i>'# The start time of the website, format: YYYY/MM/DD HH:mm:ssstart: 2022/8/17 11:45:14# Site statisticsstatistics: true # show site statistics or not (total articles, total words)# Footer messagecustomize:
# ICP record number. See https://beian.miit.gov.cn/icp:
enable: false # Whether to enablenumber: # ICP record numberurl: # ICP record url# FOOTER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# INJECT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/injectinject:
# Whether to enable injectenable: false# Inject custom head html codehead:
-
-
# Inject custom footer html codefooter:
-
-
# INJECT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# PLUGINS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/pluginsplugins:
# RSS feed. Requires hexo-generator-feed (npm i hexo-generator-feed). See https://github.com/hexojs/hexo-generator-feedfeed:
enable: false # Whether to enable# Aplayer. See https://github.com/DIYgod/APlayeraplayer:
enable: false # Whether to enabletype: fixed # fixed, miniaudios:
- name: # audio nameartist: # audio artisturl: # audio urlcover: # audio cover urllrc: # audio cover lrc# - name: # audio name# artist: # audio artist# url: # audio url# cover: # audio cover url# lrc: # audio cover lrc# .... you can add more audios here# Mermaid JS. Requires hexo-filter-mermaid-diagrams (npm i hexo-filter-mermaid-diagrams). See https://mermaid.js.org/mermaid:
enable: false # enable mermaid or notversion: "9.3.0"# default v9.3.0# PLUGINS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# PAGE TEMPLATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/page_templatespage_templates:
# Friend Links page column numberfriends_column: 2# Tags page styletags_style: blur # blur, cloud# PAGE TEMPLATES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# CDN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/cdncdn:
# Whether to enable CDNenable: false# CDN Providerprovider: npmmirror # npmmirror, zstatic, sustech, cdnjs, jsdelivr, unpkg, custom# Custom CDN URL# format example: https://cdn.custom.com/hexo-theme-redefine/${version}/source/${path}# The ${path} must leads to the root of the "source" folder of the themecustom_url:
# CDN <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end# DEVELOPER MODE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start# Docs: https://redefine-docs.ohevan.com/developerdeveloper:
# Whether to enable developer mode (only for developers who want to modify the theme source code, not for ordinary users)enable: false# DEVELOPER MODE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end
文件`/_config.yml`
# Hexo Configuration## Docs: https://hexo.io/docs/configuration.html## Source: https://github.com/hexojs/hexo/# Sitetitle: XME Notes Librarysubtitle: "xzadudu179"description: "xzadudu179的小窝"keywords: "博客"author: xzadudu179language: zh-CNtimezone: "Asia/Shanghai"# URL## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'url: https://xzadudu179.github.iopermalink: :year/:month/:day/:title/permalink_defaults:
root: /pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinkstrailing_html: false # Set to false to remove trailing '.html' from permalinks# Directorysource_dir: sourcepublic_dir: publictag_dir: tagsarchive_dir: archivescategory_dir: categoriescode_dir: downloads/codei18n_dir: :langskip_render:
# Writingnew_post_name: :year-:month-:day-:title.md # File name of new postsdefault_layout: posttitlecase: false # Transform title into titlecaseexternal_link:
enable: true # Open external links in new tabfield: site # Apply to the whole siteexclude: ""filename_case: 0render_drafts: falsepost_asset_folder: truemarked:
prependRoot: truepostAsset: truerelative_link: falsefuture: falsesyntax_highlighter: highlight.jshighlight:
line_number: trueauto_detect: falsetab_replace: ""wrap: truehljs: falseprismjs:
preprocess: trueline_number: truetab_replace: ""# Home page setting# path: Root path for your blogs index page. (default = '')# per_page: Posts displayed per page. (0 = disable pagination)# order_by: Posts order. (Order by date descending by default)index_generator:
path: ""per_page: 10order_by: -datepagination_dir: pagelayout: ["index", "archive"]# Category & Tagdefault_category: uncategorizedcategory_map:
"coding": coding"record": recordtag_map:
# Metadata elements## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/metameta_generator: true# Date / Time format## Hexo uses Moment.js to parse and display date## You can customize the date format as defined in## http://momentjs.com/docs/#/displaying/format/date_format: YYYY-MM-DDtime_format: HH:mm:ss## updated_option supports 'mtime', 'date', 'empty'updated_option: "mtime"# Pagination## Set per_page to 0 to disable paginationper_page: 10pagination_dir: page# Include / Exclude file(s)## include:/exclude: options only apply to the 'source/' folderinclude:
exclude:
ignore:
# Extensions## Plugins: https://hexo.io/plugins/## Themes: https://hexo.io/themes/theme: redefine# Deployment## Docs: https://hexo.io/docs/one-command-deploymentdeploy:
type: gitrepo: https://github.com/xzadudu179/xzadudu179.github.io.gitbranch: maintoken: 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
复现方法
使用移动端 Chrome 时进入足够短而不会出现滚动条的页面时滚动页面,刷新页面,随后使用手指进行上下滚动,此时会出现工具栏百分比的元素。若往下滚动,显示的百分比值为 Infinity,若往上滚动,显示的百分比值为 -Infinity,在出现工具栏百分比且出现 Infinity 值后不进行滚动,此时工具栏百分比元素不会消失,且值为 NaN
提交 Issue 前检查清单
hexo clean
,问题仍然存在Bug 描述
在使用移动端 Chrome 时进入足够短而不会出现滚动条的页面时滚动页面,工具栏阅读进度百分比会出现
Infinity
-Infinity
且恢复后显示NaN
文件 `/themes/redefine/_config.yml`
文件`/_config.yml`
复现方法
使用移动端 Chrome 时进入足够短而不会出现滚动条的页面时滚动页面,刷新页面,随后使用手指进行上下滚动,此时会出现工具栏百分比的元素。若往下滚动,显示的百分比值为
Infinity
,若往上滚动,显示的百分比值为-Infinity
,在出现工具栏百分比且出现Infinity
值后不进行滚动,此时工具栏百分比元素不会消失,且值为NaN
预期结果
不显示工具栏阅读进度,或值为正常数值范围(0~100)
截图
向上滚动页面
向下滚动页面
滚动结束后
电脑操作系统
Windows
浏览器
Chrome
版本
128
移动端设备
iPad Pro (11-inch) (3rd generation)
移动端操作系统
iPadOS 17.5.1
浏览器
Chrome
版本
128
其他
相关代码
/themes/redefine/source/js/utils.js
中第 85 行函数calculatePercentage
:可能的解决方法:
/themes/redefine/source/js/utils.js
中第 85 行函数calculatePercentage
:此时再次进行测试,在同样情况下,工具栏不会出现错误值且能够自动消失。
The text was updated successfully, but these errors were encountered: