File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 3333
3434 let self = this ;
3535
36- /* always follow the system prefers */
36+ { % - comment - % } always follow the system prefers { % - endcomment - % }
3737 this . sysDarkPrefers . addEventListener ( 'change' , ( ) = > {
3838 if ( self . hasMode ) {
3939 if ( self . isDarkMode ) {
5151
5252 self . notify ( ) ;
5353 } ) ;
54- } /* constructor() */
54+ } { % - comment - % } constructor ( ) { % - endcomment - % }
5555
5656 get sysDarkPrefers ( ) {
5757 return window . matchMedia ( '(prefers-color-scheme: dark)' ) ;
7777 return sessionStorage . getItem ( ModeToggle . MODE_KEY ) ;
7878 }
7979
80- /* get the current mode on screen */
80+ { % - comment - % } get the current mode on screen { % - endcomment - % }
8181 get modeStatus ( ) {
8282 if ( this . isDarkMode || ( ! this . hasMode && this . isSysDarkPrefer ) ) {
8383 return ModeToggle . DARK_MODE ;
101101 sessionStorage . removeItem ( ModeToggle . MODE_KEY ) ;
102102 }
103103
104- /* Notify another plugins that the theme mode has changed */
104+ { % - comment - % }
105+ Notify another plugins that the theme mode has changed
106+ { % - endcomment - % }
105107 notify ( ) {
106108 window . postMessage (
107109 {
136138 }
137139
138140 this . notify ( ) ;
139- } /* flipMode() */
140- } /* ModeToggle */
141+ }
142+ }
141143
142144 const modeToggle = new ModeToggle ( ) ;
143145</ script >
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ <h2><a href="{url}">{title}</a></h2>
1919{% capture not_found %}< p class ="mt-5 "> {{ site.data.locales[include.lang].search.no_results }}</ p > {% endcapture %}
2020
2121< script >
22- /* Note: dependent library will be loaded in `js-selector.html` */
22+ { % - comment - % } Note: dependent library will be loaded in `js-selector.html` { % - endcomment - % }
2323 SimpleJekyllSearch ( {
2424 searchInput : document . getElementById ( 'search-input' ) ,
2525 resultsContainer : document . getElementById ( 'search-results' ) ,
You can’t perform that action at this time.
0 commit comments