File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 33
33
34
34
let self = this ;
35
35
36
- /* always follow the system prefers */
36
+ { % - comment - % } always follow the system prefers { % - endcomment - % }
37
37
this . sysDarkPrefers . addEventListener ( 'change' , ( ) = > {
38
38
if ( self . hasMode ) {
39
39
if ( self . isDarkMode ) {
51
51
52
52
self . notify ( ) ;
53
53
} ) ;
54
- } /* constructor() */
54
+ } { % - comment - % } constructor ( ) { % - endcomment - % }
55
55
56
56
get sysDarkPrefers ( ) {
57
57
return window . matchMedia ( '(prefers-color-scheme: dark)' ) ;
77
77
return sessionStorage . getItem ( ModeToggle . MODE_KEY ) ;
78
78
}
79
79
80
- /* get the current mode on screen */
80
+ { % - comment - % } get the current mode on screen { % - endcomment - % }
81
81
get modeStatus ( ) {
82
82
if ( this . isDarkMode || ( ! this . hasMode && this . isSysDarkPrefer ) ) {
83
83
return ModeToggle . DARK_MODE ;
101
101
sessionStorage . removeItem ( ModeToggle . MODE_KEY ) ;
102
102
}
103
103
104
- /* Notify another plugins that the theme mode has changed */
104
+ { % - comment - % }
105
+ Notify another plugins that the theme mode has changed
106
+ { % - endcomment - % }
105
107
notify ( ) {
106
108
window . postMessage (
107
109
{
136
138
}
137
139
138
140
this . notify ( ) ;
139
- } /* flipMode() */
140
- } /* ModeToggle */
141
+ }
142
+ }
141
143
142
144
const modeToggle = new ModeToggle ( ) ;
143
145
</ script >
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ <h2><a href="{url}">{title}</a></h2>
19
19
{% capture not_found %}< p class ="mt-5 "> {{ site.data.locales[include.lang].search.no_results }}</ p > {% endcapture %}
20
20
21
21
< 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 - % }
23
23
SimpleJekyllSearch ( {
24
24
searchInput : document . getElementById ( 'search-input' ) ,
25
25
resultsContainer : document . getElementById ( 'search-results' ) ,
You can’t perform that action at this time.
0 commit comments