File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ github_username: chaincodelabs
29
29
30
30
# Build settings
31
31
theme : just-the-docs
32
+ # Color scheme supports "light" and "dark"
33
+ color_scheme : dark
32
34
plugins :
33
35
- asciidoctor-diagram
34
36
- jekyll-feed
Original file line number Diff line number Diff line change 1
1
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css ">
2
2
< link rel ="stylesheet " href ="/css/asciidoc.css ">
3
+
4
+ < button class ="btn js-toggle-dark-mode "> < i class ="fa fa-sun-o "> </ i > </ button >
5
+
6
+ < script >
7
+ const toggleDarkMode = document . querySelector ( '.js-toggle-dark-mode' ) ;
8
+ const toggleIcon = toggleDarkMode . querySelector ( 'i' ) ;
9
+
10
+ jtd . addEvent ( toggleDarkMode , 'click' , function ( ) {
11
+ if ( jtd . getTheme ( ) === 'dark' ) {
12
+ jtd . setTheme ( 'light' ) ;
13
+ toggleIcon . className = 'fa fa-moon-o' ;
14
+ } else {
15
+ jtd . setTheme ( 'dark' ) ;
16
+ toggleIcon . className = 'fa fa-sun-o' ;
17
+ }
18
+ } ) ;
19
+ </ script >
You can’t perform that action at this time.
0 commit comments