From 505e314a3142c332e39365fbe2dac23df1bf0abe Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 8 Sep 2023 22:48:37 +0800 Subject: [PATCH] perf: refactor using semantic HTML (#1207) Fixes #1196 --- _includes/comments/disqus.html | 3 +- _includes/datetime.html | 9 +- _includes/footer.html | 3 +- _includes/notification.html | 24 +++ _includes/post-nav.html | 21 ++- _includes/related-posts.html | 21 ++- _includes/search-loader.html | 18 ++- _includes/search-results.html | 2 +- _includes/sidebar.html | 123 ++++++++-------- _includes/toc.html | 6 +- _includes/topbar.html | 27 ++-- _includes/trending-tags.html | 6 +- _includes/update-list.html | 8 +- .../modules/components/img-lazyload.js | 2 +- .../modules/components/search-display.js | 16 +- _javascript/modules/components/toc.js | 4 +- _layouts/archives.html | 37 +++-- _layouts/category.html | 4 +- _layouts/default.html | 81 ++++++---- _layouts/home.html | 23 +-- _layouts/page.html | 84 +++-------- _layouts/post.html | 138 +++++++++--------- _layouts/tag.html | 4 +- _sass/addon/commons.scss | 98 +++++++------ _sass/addon/module.scss | 2 +- _sass/addon/syntax.scss | 4 +- _sass/addon/variables.scss | 2 +- _sass/colors/typography-dark.scss | 2 +- _sass/colors/typography-light.scss | 2 +- _sass/layout/category-tag.scss | 5 - _sass/layout/home.scss | 4 +- _sass/layout/post.scss | 24 +-- assets/404.html | 4 +- 33 files changed, 412 insertions(+), 399 deletions(-) create mode 100644 _includes/notification.html diff --git a/_includes/comments/disqus.html b/_includes/comments/disqus.html index d2f59df..02a5367 100644 --- a/_includes/comments/disqus.html +++ b/_includes/comments/disqus.html @@ -1,5 +1,6 @@ -
+ +

Comments powered by Disqus.

diff --git a/_includes/datetime.html b/_includes/datetime.html index 53258ba..9f954b6 100644 --- a/_includes/datetime.html +++ b/_includes/datetime.html @@ -3,12 +3,13 @@ See: ${JS_ROOT}/utils/locale-dateime.js --> -{% assign wrap_elem = include.wrap | default: 'em' %} {% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %} {% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %} -<{{ wrap_elem }} - class="{% if include.class %}{{ include.class }}{% endif %}" + diff --git a/_includes/footer.html b/_includes/footer.html index 25ea771..a992355 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,6 +1,7 @@