File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ github_username: chaincodelabs
2929
3030# Build settings
3131theme : just-the-docs
32+ # Color scheme supports "light" and "dark"
33+ color_scheme : dark
3234plugins :
3335 - asciidoctor-diagram
3436 - jekyll-feed
Original file line number Diff line number Diff line change 11< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css ">
22< 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