From cedadddfc03982f2f7539729bc67f33f9d599811 Mon Sep 17 00:00:00 2001 From: ericsalesdeandrade Date: Fri, 8 Mar 2024 08:01:38 +0000 Subject: [PATCH] Dark Mode / Add Popup --- _config.yml | 38 ++++++++++++------------ layout/_layout.njk | 72 ++++++---------------------------------------- 2 files changed, 26 insertions(+), 84 deletions(-) diff --git a/_config.yml b/_config.yml index 378f7ee8f..6d253218b 100644 --- a/_config.yml +++ b/_config.yml @@ -30,7 +30,6 @@ custom_file_path: #mixin: source/_data/mixins.styl #style: source/_data/styles.styl - # --------------------------------------------------------------- # Scheme Settings # --------------------------------------------------------------- @@ -42,8 +41,25 @@ scheme: Mist #scheme: Gemini # Dark Mode -darkmode: true +darkmode: false +# Darkmode JS +# For more information: https://github.com/rqh656418510/hexo-next-darkmode, https://github.com/sandoche/Darkmode.js +darkmode_js: + enable: true + bottom: "64px" # default: '32px' + right: "32px" # default: '32px' + left: "unset" # default: 'unset' + time: "0.5s" # default: '0.3s' + mixColor: "transparent" # default: '#fff' + backgroundColor: "transparent" # default: '#fff' + buttonColorDark: "#100f2c" # default: '#100f2c' + buttonColorLight: "#fff" # default: '#fff' + isActivated: false # default false + saveInCookies: true # default: true + label: "🌓" # default: '' + autoMatchOsTheme: true # default: true + libUrl: # Set custom library cdn url for Darkmode.js # --------------------------------------------------------------- # Site Information Settings @@ -85,7 +101,6 @@ open_graph: #fb_admins: #fb_app_id: - # --------------------------------------------------------------- # Menu Settings # --------------------------------------------------------------- @@ -109,7 +124,6 @@ menu_settings: icons: true badges: true - # --------------------------------------------------------------- # Sidebar Settings # See: https://theme-next.js.org/docs/theme-settings/sidebar @@ -192,7 +206,6 @@ toc: # Maximum heading depth of generated toc. max_depth: 8 - # --------------------------------------------------------------- # Footer Settings # See: https://theme-next.js.org/docs/theme-settings/footer @@ -231,7 +244,6 @@ footer: # The icon for gongan beian. See: http://www.beian.gov.cn/portal/download gongan_icon_url: - # --------------------------------------------------------------- # Post Settings # See: https://theme-next.js.org/docs/theme-settings/posts @@ -301,7 +313,6 @@ post_edit: # Available values: left | right | false post_navigation: left - # --------------------------------------------------------------- # Custom Page Settings # See: https://theme-next.js.org/docs/theme-settings/custom-pages @@ -328,7 +339,6 @@ calendar: singleEvents: true maxResults: 250 - # --------------------------------------------------------------- # Misc Theme Settings # See: https://theme-next.js.org/docs/theme-settings/miscellaneous @@ -374,7 +384,6 @@ codeblock: # Available values: default | flat | mac style: flat - back2top: enable: true # Back to top in sidebar. @@ -408,7 +417,6 @@ github_banner: permalink: https://github.com/ericsalesdeandrade title: Follow me on GitHub - # --------------------------------------------------------------- # Font Settings # --------------------------------------------------------------- @@ -460,7 +468,6 @@ font: external: true family: - # --------------------------------------------------------------- # SEO Settings # See: https://theme-next.js.org/docs/theme-settings/seo @@ -491,7 +498,6 @@ yandex_site_verification: # See: https://ziyuan.baidu.com/site baidu_site_verification: - # --------------------------------------------------------------- # Tags Settings # See: https://theme-next.js.org/docs/tag-plugins/ @@ -535,7 +541,6 @@ mermaid: light: default dark: dark - # --------------------------------------------------------------- # Third Party Plugins & Services Settings # See: https://theme-next.js.org/docs/third-party-services/ @@ -565,7 +570,6 @@ math: # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex copy_tex: false - # --------------------------------------------------------------- # External Libraries # See: https://theme-next.js.org/docs/third-party-services/external-libraries @@ -611,7 +615,6 @@ quicklink: # Default (true) will attempt to use the fetch() API if supported (rather than link[rel=prefetch]). priority: true - # --------------------------------------------------------------- # Animation Settings # --------------------------------------------------------------- @@ -651,7 +654,6 @@ canvas_ribbon: alpha: 0.6 # The transparency of the ribbon zIndex: -1 # The display level of the ribbon - # --------------------------------------------------------------- # Comments Settings # See: https://theme-next.js.org/docs/third-party-services/comments @@ -739,7 +741,6 @@ utterances: # For more information: https://isso-comments.de isso: # - # --------------------------------------------------------------- # Post Widgets & Content Sharing Services # See: https://theme-next.js.org/docs/third-party-services/post-widgets @@ -749,7 +750,6 @@ isso: # # Go to https://www.addthis.com/dashboard to customize your tools. add_this_id: - # --------------------------------------------------------------- # Statistics and Analytics # See: https://theme-next.js.org/docs/third-party-services/statistics-and-analytics @@ -833,7 +833,6 @@ busuanzi_count: post_views: true post_views_icon: far fa-eye - # --------------------------------------------------------------- # Search Services # See: https://theme-next.js.org/docs/third-party-services/search-services @@ -893,7 +892,6 @@ gitter: enable: false room: - # --------------------------------------------------------------- # CDN Settings # See: https://theme-next.js.org/docs/advanced-settings/vendors diff --git a/layout/_layout.njk b/layout/_layout.njk index c499eb75e..4296db7ac 100644 --- a/layout/_layout.njk +++ b/layout/_layout.njk @@ -23,71 +23,15 @@ - - - +