chore: remove comments from compressed HTML
This commit is contained in:
parent
662cd331e3
commit
63c51384df
2 changed files with 9 additions and 7 deletions
|
@ -33,7 +33,7 @@
|
|||
|
||||
let self = this;
|
||||
|
||||
/* always follow the system prefers */
|
||||
{%- comment -%} always follow the system prefers {%- endcomment -%}
|
||||
this.sysDarkPrefers.addEventListener('change', () => {
|
||||
if (self.hasMode) {
|
||||
if (self.isDarkMode) {
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
self.notify();
|
||||
});
|
||||
} /* constructor() */
|
||||
} {%- comment -%} constructor() {%- endcomment -%}
|
||||
|
||||
get sysDarkPrefers() {
|
||||
return window.matchMedia('(prefers-color-scheme: dark)');
|
||||
|
@ -77,7 +77,7 @@
|
|||
return sessionStorage.getItem(ModeToggle.MODE_KEY);
|
||||
}
|
||||
|
||||
/* get the current mode on screen */
|
||||
{%- comment -%} get the current mode on screen {%- endcomment -%}
|
||||
get modeStatus() {
|
||||
if (this.isDarkMode || (!this.hasMode && this.isSysDarkPrefer)) {
|
||||
return ModeToggle.DARK_MODE;
|
||||
|
@ -101,7 +101,9 @@
|
|||
sessionStorage.removeItem(ModeToggle.MODE_KEY);
|
||||
}
|
||||
|
||||
/* Notify another plugins that the theme mode has changed */
|
||||
{%- comment -%}
|
||||
Notify another plugins that the theme mode has changed
|
||||
{%- endcomment -%}
|
||||
notify() {
|
||||
window.postMessage(
|
||||
{
|
||||
|
@ -136,8 +138,8 @@
|
|||
}
|
||||
|
||||
this.notify();
|
||||
} /* flipMode() */
|
||||
} /* ModeToggle */
|
||||
}
|
||||
}
|
||||
|
||||
const modeToggle = new ModeToggle();
|
||||
</script>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
{% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %}
|
||||
|
||||
<script>
|
||||
/* Note: dependent library will be loaded in `js-selector.html` */
|
||||
{%- comment -%} Note: dependent library will be loaded in `js-selector.html` {%- endcomment -%}
|
||||
SimpleJekyllSearch({
|
||||
searchInput: document.getElementById('search-input'),
|
||||
resultsContainer: document.getElementById('search-results'),
|
||||
|
|
Loading…
Reference in a new issue