From 63c51384dfb8e7ad17dbd92259ae741c8bb77fd3 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 20 Apr 2024 23:59:59 +0800 Subject: [PATCH] chore: remove comments from compressed HTML --- _includes/mode-toggle.html | 14 ++++++++------ _includes/search-loader.html | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/_includes/mode-toggle.html b/_includes/mode-toggle.html index a347750..ab20234 100644 --- a/_includes/mode-toggle.html +++ b/_includes/mode-toggle.html @@ -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(); diff --git a/_includes/search-loader.html b/_includes/search-loader.html index be3ca8a..2582580 100644 --- a/_includes/search-loader.html +++ b/_includes/search-loader.html @@ -19,7 +19,7 @@ {% capture not_found %}
{{ site.data.locales[include.lang].search.no_results }}
{% endcapture %}