File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,18 @@ disqus:
6767# The year your website first ran.
6868first_run : 2019
6969
70+
71+ # Prefer color scheme setting, available values:
72+ #
73+ # dual - Follow the system prefer color by default, and a toggle will display
74+ # in the left bottom of Sidebar, which used for switch the theme between dark and light.
75+ #
76+ # light - Use the light color scheme
77+ #
78+ # dark - Use the dark color scheme
79+ #
80+ theme_mode : dual
81+
7082# boolean type, global switch for ToC in posts.
7183toc : true
7284
Original file line number Diff line number Diff line change 5757
5858< div class ="sidebar-bottom d-flex justify-content-around mt-4 ">
5959
60+ {% if site.theme_mode == "dual" %}
6061 < span id ="mode-toggle-wrapper " class ="d-flex justify-content-center align-items-center ">
6162 {% include mode-toggle.html %}
6263 </ span >
64+ {% endif %}
6365
6466 < a href ="https://github.com/{{ site.github.username }} " target ="_blank ">
6567 < i class ="fab fa-github-alt "> </ i >
Original file line number Diff line number Diff line change 88---
99
1010<!DOCTYPE html>
11- < html lang ="en ">
11+
12+ {% capture prefer_mode %}
13+ {% if site.theme_mode != "dual" %}
14+ mode="{{ site.theme_mode }}"
15+ {% endif %}
16+ {% endcapture %}
17+
18+ < html lang ="en " {{ prefer_mode }} >
1219
1320 {% include head.html %}
1421
You can’t perform that action at this time.
0 commit comments