From c343fe3c841eddd93194e20aee5621ce3f0b1804 Mon Sep 17 00:00:00 2001 From: biss Date: Thu, 18 Jun 2026 22:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=AF=B4=E8=AF=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.astro | 14 +++- src/styles/site.css | 160 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 2 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 56ba7df..5f07eee 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -14,12 +14,21 @@ const pageData = getPageSlice(posts, 1); --- -
-
+
+

写给日常、技术和正在发生的自己

{siteConfig.site.name}

把折腾、学习和生活片段安静地收在这里。

+
@@ -34,4 +43,5 @@ const pageData = getPageSlice(posts, 1);
+ diff --git a/src/styles/site.css b/src/styles/site.css index e68966a..bed691d 100644 --- a/src/styles/site.css +++ b/src/styles/site.css @@ -266,6 +266,116 @@ a { font-size: 1.12rem; } +.home-hero { + grid-template-columns: minmax(320px, 0.74fr) minmax(360px, 1fr); + gap: clamp(28px, 6vw, 84px); +} + +.hero-copy { + min-width: 0; +} + +.hero-talk { + align-self: center; + width: 100%; + max-width: 820px; + min-height: 190px; + overflow: hidden; + border: 1px solid rgba(255, 255, 255, 0.52); + border-radius: 8px; + padding: 18px 18px 16px; + background: + linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(241, 250, 244, 0.16)), + rgba(255, 255, 255, 0.18); + box-shadow: + inset 0 1px 0 rgba(255, 255, 255, 0.58), + 0 18px 46px rgba(44, 55, 63, 0.12); + backdrop-filter: blur(10px) saturate(135%); + -webkit-backdrop-filter: blur(10px) saturate(135%); +} + +.hero-talk-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; + margin-bottom: 12px; + color: var(--accent-strong); + font-size: 0.86rem; + font-weight: 800; + letter-spacing: 0.04em; + text-transform: uppercase; +} + +.hero-talk-head a { + display: grid; + width: 34px; + height: 34px; + place-items: center; + border: 1px solid rgba(15, 118, 110, 0.16); + border-radius: 999px; + color: var(--accent); + background: rgba(236, 253, 245, 0.54); + transition: + color 0.2s ease, + background-color 0.2s ease, + transform 0.2s ease; +} + +.hero-talk-head a:hover { + color: #fff; + background: #3eb8be; + transform: translateY(-1px); +} + +.hero-talk .talk-list { + display: grid; + height: 120px; + margin: 0; + overflow: hidden; + padding: 0; + list-style: none; +} + +.hero-talk .talk-list:empty::before { + content: "说说加载中..."; + display: grid; + min-height: 58px; + align-items: center; + color: var(--muted); + font-size: 0.95rem; +} + +.hero-talk .item { + display: flex; + min-height: 40px; + align-items: center; + gap: 10px; + border-top: 1px dashed rgba(104, 111, 120, 0.22); + padding: 9px 2px; + color: #40505a; + font-size: 0.96rem; + line-height: 1.55; +} + +.hero-talk .item:first-child { + border-top: 0; +} + +.hero-talk .item::before { + content: ""; + width: 7px; + height: 7px; + flex: 0 0 auto; + border-radius: 999px; + background: #3eb8be; + box-shadow: 0 0 0 4px rgba(62, 184, 190, 0.14); +} + +.hero-talk .item i { + color: var(--accent); +} + .eyebrow { margin: 0 0 16px !important; color: var(--accent-strong) !important; @@ -2241,6 +2351,26 @@ meting-js { border-color: rgba(174, 205, 197, 0.2); } +:root[data-theme='dark'] .hero-talk { + border-color: rgba(174, 205, 197, 0.18); + background: + linear-gradient(135deg, rgba(28, 43, 47, 0.58), rgba(12, 22, 25, 0.38)), + rgba(17, 28, 31, 0.34); + box-shadow: + inset 0 1px 0 rgba(255, 255, 255, 0.1), + 0 18px 46px rgba(0, 0, 0, 0.2); +} + +:root[data-theme='dark'] .hero-talk .item { + border-top-color: rgba(174, 205, 197, 0.16); + color: #dce9e6; +} + +:root[data-theme='dark'] .hero-talk-head a { + border-color: rgba(114, 222, 210, 0.2); + background: rgba(114, 222, 210, 0.1); +} + .external-redirect { width: min(760px, calc(100% - (var(--page-gutter) * 2))); min-height: calc(100vh - 240px); @@ -2837,6 +2967,16 @@ meting-js { grid-template-columns: 1fr; } + .home-hero { + grid-template-columns: 1fr; + gap: 22px; + padding: 44px 0 28px; + } + + .hero-talk { + max-width: none; + } + .article-sidebar { align-self: auto; position: static; @@ -2907,6 +3047,26 @@ meting-js { min-height: 300px; } + .home-hero { + min-height: auto; + padding-top: 34px; + } + + .hero-talk { + min-height: 164px; + padding: 14px; + } + + .hero-talk .talk-list { + height: 102px; + } + + .hero-talk .item { + min-height: 34px; + padding: 7px 0; + font-size: 0.9rem; + } + .home-sidebar { grid-template-columns: 1fr; }