From 5c10849e64e81f163beba80f51a9dace1799ce83 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 9 Feb 2025 22:57:34 +0800 Subject: [PATCH] feat: update theme and style --- content/_index.md | 2 +- layouts/shortcodes/service_list.html | 76 +++++++++++++++++++++++----- static/style.css | 50 ++++++++++++++---- 3 files changed, 104 insertions(+), 24 deletions(-) diff --git a/content/_index.md b/content/_index.md index 7d7f045..e4b7b92 100644 --- a/content/_index.md +++ b/content/_index.md @@ -10,4 +10,4 @@ framed = true Welcome to my blog🎩 Check these -[💻 技术文章](/categories/%E6%8A%80%E6%9C%AF/) | [📖 My Readings](https://reading.colinx.one) | [💡 My Github](https://github.com/Colin-XKL/) | [💎 公开服务](/services/) +[💻 技术文章](/categories/%E6%8A%80%E6%9C%AF/) | [💡 My Github](https://github.com/Colin-XKL/) | [💎 公开服务&个人作品](/services/) diff --git a/layouts/shortcodes/service_list.html b/layouts/shortcodes/service_list.html index d27520f..26464fe 100644 --- a/layouts/shortcodes/service_list.html +++ b/layouts/shortcodes/service_list.html @@ -8,23 +8,71 @@ Params: {{ with $.Get "name" }} {{ $name := . }} {{ $data := getJSON $url }} - {{ range $data.data }} - {{ $item := . }} - -

{{$item.name}}

- {{ $link := urls.Parse $item.link }} -

{{$item.type}} - {{$item.subtitle}}

-

地址: + + {{ range $data.data }} + {{ $item := . }} +

+

{{$item.name}} {{$item.type}}

+

{{$item.subtitle}}

+

地址: + {{ $link := urls.Parse $item.link }} {{ if (gt (len $link.Host) 1) }} - {{$link.Host}} + {{$link.Host}} {{ else }} {{$item.link}} {{ end }} -

- {{ if (gt (len $item.StartServingAt) 1) }} -

上线于{{$item.StartServingAt}}

- {{ end }} - - {{ end }} +

+

上线时间: + {{ if (gt (len $item.StartServingAt) 1) }} + {{$item.StartServingAt}} + {{ else }} + 无 + {{ end }} +

+
+ {{ end }} {{ end }} + {{ end }} \ No newline at end of file diff --git a/static/style.css b/static/style.css index 9b76c77..56581dc 100644 --- a/static/style.css +++ b/static/style.css @@ -39,7 +39,7 @@ padding: 1rem 0rem; } -ol.toc-list > li > a:hover { +ol.toc-list>li>a:hover { text-underline-position: under; font-weight: bolder; } @@ -57,45 +57,47 @@ ol.toc-list > li > a:hover { } .is-active-link::before { - background-color: #d71a1b !important; + background-color: #9dd5c0 !important; } .logo__cursor { - background: #d71a1b; + background: #9dd5c0; } /* 超链接样式 */ .post-tags a, -.post-content a { +.post-content a, +.index-content a { text-decoration: none; - border-bottom: 1px dashed #d71a1b; + border-bottom: 1px dashed #9dd5c0; -webkit-transition: all 0.2s; transition: all 0.2s; } .post-tags a:hover, .post-content a:hover, +.index-content a:hover, nav a:hover { text-decoration: none; - border-bottom: 2px solid #d71a1b; + border-bottom: 2px solid #9dd5c0; -webkit-transition: all 0.1s ease; transition: all 0.1s ease; } /* custom ::selection */ ::selection { - background: #b5b5b5; + background: #9dd5c0; color: #fff; } ::-moz-selection { - background: #b5b5b5; + background: #9dd5c0; color: #fff; } ::-webkit-selection { - background: #b5b5b5; + background: #9dd5c0; color: #fff; } @@ -116,3 +118,33 @@ nav a:hover { .post-content a:active { background-size: 80% 100%; } */ + +.logo__cursor { + background-color: #9dd5c0 !important; +} + +.on-list .post-title:hover { + transform: translateY(-0.1rem); + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} + +.read-more:hover { + transform: translateX(0.1rem); + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} + +span.button.next:hover { + display: block; + transform: translateX(0.2rem); + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.21s ease-in-out; +} + +span.button.previous:hover { + display: block; + transform: translateX(-0.2rem); + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} \ No newline at end of file