diff options
| author | mayx <mayx@outlook.com> | 2026-05-22 12:52:39 +0000 |
|---|---|---|
| committer | mayx <mayx@outlook.com> | 2026-05-22 12:52:39 +0000 |
| commit | b25a864ee3ee6e8e8cb7875bfcd1e71c98bb5d67 (patch) | |
| tree | 490461566c0de762c1d12a84aca64ccee5777290 | |
| parent | c5ad917d9e3c193f30643871b42a6d2db2b35fb7 (diff) | |
Update 3 files
- /_layouts/default.html
- /assets/js/pjax.js
- /assets/css/style.scss
| -rw-r--r-- | _layouts/default.html | 4 | ||||
| -rw-r--r-- | assets/css/style.scss | 14 | ||||
| -rw-r--r-- | assets/js/pjax.js | 2 |
3 files changed, 16 insertions, 4 deletions
diff --git a/_layouts/default.html b/_layouts/default.html index f5656ee..39d534c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -76,8 +76,8 @@ layout: xslt_container <p class="p-note">{{ site.description | default: site.github.project_tagline }}</p> - <form action="/search.html"> - <input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" /> + <form id="search-input-all" action="/search.html"> + <input type="text" name="keyword" placeholder="Search blog posts.." /> <input type="submit" value="搜索" /> </form> <br /> diff --git a/assets/css/style.scss b/assets/css/style.scss index 879154e..44632e2 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -190,4 +190,16 @@ td.h-entry { td.h-entry:hover { background: #f9f9f9; -}
\ No newline at end of file +} + +body.pjax-loading::after { + content: ''; + position: fixed; + top: 16px; + right: 16px; + width: 20px; + height: 20px; + background: url('/images/loading.svg') center / contain no-repeat; + z-index: 9999; + pointer-events: none; + }
\ No newline at end of file diff --git a/assets/js/pjax.js b/assets/js/pjax.js index eafe723..358c67b 100644 --- a/assets/js/pjax.js +++ b/assets/js/pjax.js @@ -174,7 +174,7 @@ ':not([href$=".xml"]):not([href$=".json"]):not([href$=".tgz"]):not([href$=".zip"])' + ':not([href^="/Live2dHistoire"])'; $(document).pjax('a' + exclude, PJAX_OPTS.container, PJAX_OPTS); - $(document).on('submit', 'form', function (e) { + $(document).on('submit', 'form#search-input-all', function (e) { $.pjax.submit(e, PJAX_OPTS.container, PJAX_OPTS); }); $(document).on('pjax:send', function () { |
