From 30a4d643c798adcaec646a4cd8e82f0bc3fd77ea Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 29 Aug 2025 23:41:02 +0800 Subject: refactor: move search UI to categories page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove global search panel (according to my web analytics, the search panel is rarely used) - remove relevant instructions and scripts - rename 'categories' to a more abstract and acurate name, 'find' (搜寻) --- i18n/zh.yml | 3 +- layouts/_partials/components/global-search.html | 87 ------------------------- layouts/_partials/home/home-nav.html | 4 +- layouts/baseof.html | 1 - layouts/taxonomy.html | 14 +++- 5 files changed, 13 insertions(+), 96 deletions(-) delete mode 100644 layouts/_partials/components/global-search.html diff --git a/i18n/zh.yml b/i18n/zh.yml index 718e131f..1d8b54b2 100644 --- a/i18n/zh.yml +++ b/i18n/zh.yml @@ -12,8 +12,7 @@ footer: searchInstruction: '⌘+K 搜索' postNav: latest: '最新' - categories: '分类' - tags: '标签' + categories: '搜寻' featured: '精选' cards: 最近在学 moreLinks: diff --git a/layouts/_partials/components/global-search.html b/layouts/_partials/components/global-search.html deleted file mode 100644 index 674ecdcc..00000000 --- a/layouts/_partials/components/global-search.html +++ /dev/null @@ -1,87 +0,0 @@ - - -
- - -
-
- - -
diff --git a/layouts/_partials/home/home-nav.html b/layouts/_partials/home/home-nav.html index cbeb034d..d6e8960e 100644 --- a/layouts/_partials/home/home-nav.html +++ b/layouts/_partials/home/home-nav.html @@ -20,9 +20,7 @@ (strings.HasPrefix $.Page.RelPermalink "/tags/")) ) }} {{ end }} -
  • - {{ T "searchInstruction" }} -
  • +
  • {{ partial "scripts.html" . }} - {{ partial "components/global-search" . }} diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html index 424f8071..150879f5 100644 --- a/layouts/taxonomy.html +++ b/layouts/taxonomy.html @@ -3,11 +3,19 @@ {{ partial "header" . }} {{ partial "home/home-nav" . }} +
    + + {{ partial "taxonomy/all-tags.html" . }} +
    +

    文章系列

    {{ partial "taxonomy/all-categories.html" . }} -
    -

    标签

    - {{ partial "taxonomy/all-tags.html" . }} + + {{ partial "footer.html" . }} {{ end }} -- cgit v1.2.3