diff --git a/README.md b/README.md index 744999b..421ff4f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ - 内置搜索按钮(依赖官方 `PluginSearchWidget` 插件,未安装则不显示) - 阅读进度条、代码块复制、相对时间、回到顶部、移动端菜单等交互 - **二级导航**:菜单项的子项自动渲染为下拉菜单(桌面端 hover/focus 展开,移动端嵌套缩进展开) -- **页脚可关闭的主题署名**:默认「Theme by 暖心向阳335」,可在设置中修改名称或整体关闭 +- **页脚可关闭的主题署名**:默认「Theme by WhiteSpace」并链接到主题仓库,可在设置中修改名称 / 链接或整体关闭 - **页脚全站数据统计**:文章 / 分类 / 标签 / 评论 / 访问量 / 字数,可按项开关,整体可关闭 - **文章卡片字数 + 阅读时长**:可在设置中关闭(需 `halo-plugin-extra-api` 提供数据) - 多语言:`i18n/default.properties`(回退)+ `i18n/zh_CN.properties` @@ -28,7 +28,7 @@ - **plugin-moments**:`/moments` 瞬间页 - **plugin-photos**:`/photos` 图库页 - **plugin-links**:`/links` 友链页;友链申请表单已**直接内嵌**在友链页底部(点击「申请友链」展开,调用插件公共 REST API,含图形验证码);并额外提供 - - `links-subscribe.html`:RSS 订阅动态聚合页(使用 `linkFeedFinder`) + - `links-subscribe.html`:RSS 订阅动态聚合页(使用 `linkFeedFinder`);每条仅显示作者与发布时间,作者名链接到来源博客,摘要默认折叠为 5 行 - **halo-weread-plugin**:`weread.html` 微信读书书架页(前端拉取插件 `/shelf-html` 并注入) - **plugin-douban**:`douban.html` 豆瓣收藏页(按「读过 / 在读 / 看过 / 在追」分栏展示书影音,使用 `doubanFinder.getMovies(...)`;未安装插件时显示提示)。在控制台新建单页并选择「豆瓣页面」模板即可启用 - **留言板**:`page_guestbook.html` 以评论区作为留言板的单页模板 diff --git a/settings.yaml b/settings.yaml index f6a8be4..b70c06b 100644 --- a/settings.yaml +++ b/settings.yaml @@ -33,9 +33,15 @@ spec: - $formkit: text name: theme_credit_text label: 署名名称 - value: "暖心向阳335" + value: "WhiteSpace" placeholder: 显示在「Theme by」之后的名称 help: 页脚主题署名的展示名称 + - $formkit: text + name: theme_credit_url + label: 署名链接 + value: "https://git.nxxy335.top/nxxy335/halo-theme-whitespace" + placeholder: 点击署名跳转的地址 + help: 页脚「Theme by」署名的跳转链接,默认主题仓库地址 - $formkit: checkbox name: show_word_count label: 文章卡片显示字数 diff --git a/src/css/main.css b/src/css/main.css index 6c27ef7..e5b64c6 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -262,9 +262,10 @@ textarea { .nav-dropdown { position: absolute; - top: calc(100% + 0.5rem); + top: 100%; left: 50%; transform: translateX(-50%); + margin-top: 0.5rem; min-width: 11rem; display: none; flex-direction: column; @@ -275,6 +276,15 @@ textarea { box-shadow: var(--shadow, 0 12px 32px rgba(0, 0, 0, 0.12)); z-index: 50; } +/* 透明桥接:填补父项与下拉之间的间隙,鼠标从一级移到二级时下拉不再收起 */ +.nav-dropdown::before { + content: ""; + position: absolute; + left: 0; + right: 0; + top: -0.5rem; + height: 0.5rem; +} .nav-has-children:hover > .nav-dropdown, .nav-has-children:focus-within > .nav-dropdown { @@ -384,6 +394,8 @@ textarea { .mobile-nav-sub { padding-left: calc(var(--spacing-md) + 1rem); + margin-left: var(--spacing-md); + border-left: 2px solid var(--color-border); font-size: 0.9rem; opacity: 0.85; } @@ -711,12 +723,59 @@ textarea { .article-content ul, .article-content ol { - margin-bottom: var(--spacing-lg); - padding-left: var(--spacing-lg); + margin: 0 0 var(--spacing-lg); + padding-left: 1.5rem; +} + +.article-content ul { + list-style: disc; +} + +.article-content ol { + list-style: decimal; } .article-content li { margin-bottom: var(--spacing-sm); + line-height: 1.9; + padding-left: 0.25rem; +} + +.article-content li::marker { + color: var(--color-primary); +} + +.article-content ul ul, +.article-content ol ol, +.article-content ul ol, +.article-content ol ul { + margin: var(--spacing-sm) 0; + padding-left: 1.25rem; +} + +.article-content hr { + border: none; + border-top: 1px solid var(--color-border); + margin: var(--spacing-xl) 0; +} + +.article-content table { + width: 100%; + border-collapse: collapse; + margin: 0 0 var(--spacing-lg); + font-size: 0.9375rem; +} + +.article-content th, +.article-content td { + border: 1px solid var(--color-border); + padding: 0.5rem 0.75rem; + text-align: left; +} + +.article-content th { + background: var(--color-bg-secondary); + font-weight: 600; } .article-content blockquote { diff --git a/src/js/main.ts b/src/js/main.ts index 6fe4bff..d69f077 100644 --- a/src/js/main.ts +++ b/src/js/main.ts @@ -100,6 +100,11 @@ function initMobileNav(): void { closeMobileNav(); } }); + + // 点击移动端菜单内的任意链接后自动收起 + mobileNav.querySelectorAll("a").forEach((link) => { + link.addEventListener("click", closeMobileNav); + }); } // ======================================== diff --git a/src/links-subscribe.html b/src/links-subscribe.html index 32e04a5..f802e63 100644 --- a/src/links-subscribe.html +++ b/src/links-subscribe.html @@ -28,10 +28,26 @@ font-size: 0.8rem; color: var(--color-text-muted); } + .feed-item-author { + color: var(--color-text-secondary); + transition: color var(--transition-fast); + } + .feed-item-author:hover { + color: var(--color-primary); + } + .feed-item-sep { + color: var(--color-border); + margin: 0 0.3rem; + } .feed-item-summary { margin: 0.5rem 0 0; color: var(--color-text-secondary); line-height: 1.7; + display: -webkit-box; + -webkit-line-clamp: 5; + line-clamp: 5; + -webkit-box-orient: vertical; + overflow: hidden; } @@ -57,15 +73,35 @@

- 来源 - - · 作者 + 作者 + 作者 + · + - · Theme by kehua

+ > + Theme by WhiteSpace +