From 3bffe42e3e58e0620092ec54053b2f4b41686f4c Mon Sep 17 00:00:00 2001 From: elkan1788 Date: Thu, 30 Jan 2025 11:32:22 +0800 Subject: [PATCH] :bug: Fixed #158 Rollback animate style to old version. --- .../css/_common/components/pages/flinks.scss | 2 +- assets/css/_common/components/post/index.scss | 4 ++-- assets/css/noscript.scss | 3 +++ assets/js/motion.js | 6 +++--- data/resources.yaml | 2 +- exampleSite/content/about/index.en-us.md | 2 +- exampleSite/content/about/index.md | 3 +-- .../content/post/12-shortcodes/index.en-us.md | 16 ++++++++-------- .../content/post/12-shortcodes/index.md | 3 ++- exampleSite/hugo.yaml | 3 +-- layouts/flinks/single.html | 5 +++-- layouts/shortcodes/music.html | 18 +++++++++--------- .../js/3rd/animate.css/3.7.2/animate.min.css | 11 +++++++++++ .../js/3rd/animate.css/4.1.1/animate.min.css | 7 ------- 14 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 static/js/3rd/animate.css/3.7.2/animate.min.css delete mode 100644 static/js/3rd/animate.css/4.1.1/animate.min.css diff --git a/assets/css/_common/components/pages/flinks.scss b/assets/css/_common/components/pages/flinks.scss index 5f0ced2..95e3fc8 100644 --- a/assets/css/_common/components/pages/flinks.scss +++ b/assets/css/_common/components/pages/flinks.scss @@ -1,6 +1,6 @@ .flinks-block { - .flinks-block-title { + .flinks-header { text-align: center; font-weight: bold; } diff --git a/assets/css/_common/components/post/index.scss b/assets/css/_common/components/post/index.scss index 22f6d2f..68a27b9 100644 --- a/assets/css/_common/components/post/index.scss +++ b/assets/css/_common/components/post/index.scss @@ -24,13 +24,13 @@ } @if $motion_trans_post_header { - .post-header { + .post-header, .flinks-header { visibility: hidden; } } @if $motion_trans_post_body { - .post-body { + .post-body, .flinks-body { visibility: hidden; } } diff --git a/assets/css/noscript.scss b/assets/css/noscript.scss index 2ca321f..83c78aa 100644 --- a/assets/css/noscript.scss +++ b/assets/css/noscript.scss @@ -3,10 +3,13 @@ body { margin-top: 2rem; } .use-motion .menu-item, .use-motion .sidebar, .use-motion .post-block, +.use-motion .flinks-block, .use-motion .pagination, .use-motion .comments, .use-motion .post-header, +.use-motion .flinks-header, .use-motion .post-body, +.use-motion .flinks-body, .use-motion .collection-header { visibility: visible; } diff --git a/assets/js/motion.js b/assets/js/motion.js index dfc5a4a..138a417 100644 --- a/assets/js/motion.js +++ b/assets/js/motion.js @@ -95,10 +95,10 @@ NexT.motion.middleWares = { }); } - animate(postblock, '.post-block,.flinks-block, .pagination, .post-comments'); + animate(postblock, '.post-block, .flinks-block, .pagination, .post-comments'); animate(collheader, '.collection-header'); - animate(postheader, '.post-header'); - animate(postbody, '.post-body'); + animate(postheader, '.post-header, .flinks-header'); + animate(postbody, '.post-body, .flinks-body'); return sequence; }, diff --git a/data/resources.yaml b/data/resources.yaml index 5c6eabd..8d9d695 100644 --- a/data/resources.yaml +++ b/data/resources.yaml @@ -69,7 +69,7 @@ css: alias: '@fortawesome/fontawesome-free' - name: animate.css - version: 4.1.1 + version: 3.7.2 file: animate.min.css - name: viewerjs diff --git a/exampleSite/content/about/index.en-us.md b/exampleSite/content/about/index.en-us.md index 7a1813a..ff62087 100644 --- a/exampleSite/content/about/index.en-us.md +++ b/exampleSite/content/about/index.en-us.md @@ -26,4 +26,4 @@ Continuing the classic black-and-white color scheme of `NexT`, it maintains simp > [!INFO] > Chinese's users can also join the QQ group for communication: 604710815 -{{< music server="netease" type="playlist" id="1982066521" list-max-height="140" >}} \ No newline at end of file +{{< music url="/music/sky.mp3" name="City of the Sky" artist="Hayao Miyazaki" cover="/music/gongqijun.jpg" autoplay="true" >}} \ No newline at end of file diff --git a/exampleSite/content/about/index.md b/exampleSite/content/about/index.md index cf8241f..e05399f 100644 --- a/exampleSite/content/about/index.md +++ b/exampleSite/content/about/index.md @@ -1,6 +1,5 @@ --- title: "关于 Hugo NexT 组织" -description: "Hugo NexT 组织介绍说明。" date: 2022-06-09T20:12:52+08:00 lastmod: 2022-06-09T20:12:52+08:00 @@ -27,4 +26,4 @@ url: about.html > [!INFO] > 同时国内用户也可加入 QQ 群交流: 604710815 -{{< music server="netease" type="playlist" id="1982066521" list-max-height="140" >}} \ No newline at end of file +{{< music url="/music/sky.mp3" name="天空之城" artist="宫崎骏" cover="/music/gongqijun.jpg" autoplay="true" >}} \ No newline at end of file diff --git a/exampleSite/content/post/12-shortcodes/index.en-us.md b/exampleSite/content/post/12-shortcodes/index.en-us.md index 7a9bc7b..a7c623c 100644 --- a/exampleSite/content/post/12-shortcodes/index.en-us.md +++ b/exampleSite/content/post/12-shortcodes/index.en-us.md @@ -63,37 +63,37 @@ Actual effect: ### Default Header without icon -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} {{< note default >}} ### Default Header -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} {{< note primary >}} ### Primary Header -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} {{< note info >}} ### Info Header -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} {{< note success >}} ### Success Header -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} {{< note warning >}} ### Warning Header -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} {{< note danger >}} ### Danger Header -**Welcome** to [Hugo NexT!]( https://preview.hugo-next.eu.org ) +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) {{< /note >}} @@ -145,7 +145,7 @@ Based on [Player](https://github.com/DIYgod/APlayer) And [MatingJS](https://gith {{}} ``` -{{< music server="netease" type="playlist" id="1982066521" list-max-height="140px" >}} +{{< music server="netease" type="playlist" id="1982066521" list-max-height="140" >}} ### Customize music source diff --git a/exampleSite/content/post/12-shortcodes/index.md b/exampleSite/content/post/12-shortcodes/index.md index 01c9fd7..18ec4e1 100644 --- a/exampleSite/content/post/12-shortcodes/index.md +++ b/exampleSite/content/post/12-shortcodes/index.md @@ -141,7 +141,8 @@ toc: true {{}} ``` -{{< music server="netease" type="playlist" id="1982066521" list-max-height="140px" >}} +{{< music server="netease" type="playlist" id="1982066521" list-max-height="140" >}} + ### 自定义音乐源 ```markdown diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index c20e07b..04146f4 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -1189,11 +1189,10 @@ params: enable: true async: true transition: - # All available transition variants: https://theme-next.js.org/animate/ postBlock: fadeIn postHeader: fadeInDown postBody: fadeInDown - collHeader: fadeInLeft + collHeader: slideInRight # 侧边样效果 只有在 Pisces | Gemini 模式下才支持 # Only for Pisces | Gemini. sidebar: fadeInUp diff --git a/layouts/flinks/single.html b/layouts/flinks/single.html index 4b7e3ea..d7916c8 100644 --- a/layouts/flinks/single.html +++ b/layouts/flinks/single.html @@ -5,7 +5,8 @@ {{ define "main" }}