diff --git a/hermes/preferences.md b/hermes/preferences.md
index a30edac..44d246f 100644
--- a/hermes/preferences.md
+++ b/hermes/preferences.md
@@ -43,9 +43,9 @@ layout: {
| 页面 | listLayout | cardType |
|------|-----------|----------|
-| home(首页) | `single` | `image_bottom` |
-| articles(文章列表) | `double` | `image_bottom` |
-| archives(文章归档) | `single` | `image_bottom` |
+| home(首页) | `single` | `image_top` |
+| articles(文章列表) | `double` | `image_top` |
+| archives(文章归档) | `single` | `image_top` |
## 3. 后端插件字段映射(getConfigs.preferences)
@@ -73,7 +73,7 @@ layout: {
| `src/pages/tabbar/home/home.vue` | `layout.home.listLayout` 决定容器单/双列;卡片 `from="home"` 读 `layout.home.cardType` |
| `src/pages-blog/articles/articles.vue` | `layout.articles.listLayout` 决定容器与 `variant`(grid/list);卡片 `from="articles"` |
| `src/pages-blog/archives/archives.vue` | `layout.archives.listLayout` 决定归档时间线内单/双列;卡片 `from="archives"` |
-| `src/components/uh-article-card/uh-article-card.vue` | 按 `from` 读取对应页面 `cardType` 作为 layout;grid/双列窄列自动回退 `image_top`;非法值兜底 `image_bottom` |
+| `src/components/uh-article-card/uh-article-card.vue` | 按 `from` 读取对应页面 `cardType` 作为 layout;grid/双列窄列自动回退 `image_top`;非法值兜底 `image_top` |
## 5. 设置页枚举(「默认」= 跟随站点默认)
@@ -85,5 +85,6 @@ layout: {
| 版本 | 变更 |
|------|------|
-| v2.4 | 卡片样式值体系由旧 `lr_*/tb_*` 改为组件 layout 值 `image_top/image_right/image_bottom/image_left`;内置默认 cardType 统一为 `image_bottom`;移除 `uh-article-card` 旧值映射(`CARD_TYPE_TO_LAYOUT`),非法值兜底 `image_bottom` |
+| v2.5 | 内置默认 cardType 统一为 `image_top`;组件非法值兜底同步为 `image_top` |
+| v2.4 | 卡片样式值体系由旧 `lr_*/tb_*` 改为组件 layout 值 `image_top/image_right/image_bottom/image_left`;移除 `uh-article-card` 旧值映射(`CARD_TYPE_TO_LAYOUT`) |
| v2.3 | 布局偏好由全局 `layout.home` / `layout.cardType`(字符串)重构为按页面分组 `layout.{home,articles,archives}.{listLayout,cardType}`;设置页增加「布局 / 功能」分段器与页面分组设置项;三个消费页面联动卡片 |
diff --git a/src/components/uh-article-card/uh-article-card.vue b/src/components/uh-article-card/uh-article-card.vue
index 64a913f..a6314d6 100644
--- a/src/components/uh-article-card/uh-article-card.vue
+++ b/src/components/uh-article-card/uh-article-card.vue
@@ -117,7 +117,7 @@
return raw
})
- const cardLayout = computed(() => CARD_LAYOUTS[effectiveLayout.value] ?? CARD_LAYOUTS.image_bottom)
+ const cardLayout = computed(() => CARD_LAYOUTS[effectiveLayout.value] ?? CARD_LAYOUTS.image_top)
/** 社交卡片形态(封面在下):左上用户信息(头像 + 昵称/日期垂直)、右上浏览数 */
const isSocialCard = computed(() => effectiveLayout.value === 'image_bottom')
@@ -183,7 +183,7 @@
-
+
@@ -199,11 +199,11 @@
- {{ article.owner.displayName }}
+ {{ article.owner.displayName }}
{{ publishTimeText }}
-
+
浏览
{{ visitCount }}
次
diff --git a/src/components/uh-comment-list/uh-comment-list.vue b/src/components/uh-comment-list/uh-comment-list.vue
index ae2bfeb..30c2cf0 100644
--- a/src/components/uh-comment-list/uh-comment-list.vue
+++ b/src/components/uh-comment-list/uh-comment-list.vue
@@ -39,7 +39,7 @@
result.value = res.data
dataList.value = res.data.items.map((item) => {
// todo:临时
- item.spec.owner.avatar = checkAvatarUrl(item.spec.owner.avatar??'https://api.dicebear.com/10.x/adventurer-neutral/svg')
+ item.spec.owner.avatar = checkAvatarUrl(item.spec.owner.avatar ?? 'https://api.dicebear.com/10.x/adventurer-neutral/svg')
return item
})
loading.value = 'success'
@@ -101,8 +101,7 @@
评论列表
-
+
刷新
@@ -135,20 +134,15 @@
-
-
-
-
-
- {{disallowComment ? '暂无评论' : '暂无评论'}}
-
- 文章已开启禁止评论
-
-
- 抢沙发
-
-
-
+
+ {{disallowComment ? '暂无评论' : '暂无评论'}}
+
+ 文章已开启禁止评论
+
+
+ 抢沙发
+
diff --git a/src/components/uh-home-quick-nav/uh-home-quick-nav.vue b/src/components/uh-home-quick-nav/uh-home-quick-nav.vue
index 788fdfe..b5ef8a3 100644
--- a/src/components/uh-home-quick-nav/uh-home-quick-nav.vue
+++ b/src/components/uh-home-quick-nav/uh-home-quick-nav.vue
@@ -96,7 +96,7 @@
:style="{
backgroundColor: item.bgGlass
}">
-
+
{{ item.title }}
@@ -104,17 +104,4 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/config/appSettings.ts b/src/config/appSettings.ts
index 8861b50..9c907ab 100644
--- a/src/config/appSettings.ts
+++ b/src/config/appSettings.ts
@@ -63,9 +63,9 @@ export const DefaultAppSettings: IAppSettings = {
dotPosition: 'right',
},
layout: {
- home: { listLayout: 'single', cardType: 'image_bottom' },
- articles: { listLayout: 'double', cardType: 'image_bottom' },
- archives: { listLayout: 'single', cardType: 'image_bottom' },
+ home: { listLayout: 'single', cardType: 'image_top' },
+ articles: { listLayout: 'double', cardType: 'image_top' },
+ archives: { listLayout: 'single', cardType: 'image_top' },
},
ad: {
timeout: 3,
diff --git a/src/config/markdown.ts b/src/config/markdown.ts
index 29d6f88..610e4bc 100644
--- a/src/config/markdown.ts
+++ b/src/config/markdown.ts
@@ -1,16 +1,9 @@
-/**
- * mp-html 富文本 / markdown 渲染业务配置
- * 源自旧项目 common/markdown/markdown.config.js,TS 化复刻(业务封装新建,插件本体走 npm mp-html)
- * 用法:
- */
import { checkImageUrl } from '@/utils/url'
const primaryColor = '#B9E424'
export const markdownConfig = {
- /** 图片域名前缀(mp-html 相对路径补全,源自旧配置 domain: BASE_API) */
domain: import.meta.env.VITE_SERVER_BASEURL || '',
- /** 标签样式定制(表格/引用/标题/代码等) */
tagStyle: {
table: `
table-layout: fixed;
@@ -25,13 +18,9 @@ export const markdownConfig = {
`,
th: `
padding: 8px;
- border-right: 1px solid var(--classE);
- border-bottom: 1px solid var(--classE);
`,
td: `
padding: 8px;
- border-right: 1px solid var(--classE);
- border-bottom: 1px solid var(--classE);
`,
blockquote: `
padding: 8px 15px;
@@ -66,7 +55,7 @@ export const markdownConfig = {
color: ${primaryColor};
line-height: 24px;
position: relative;
- margin: 26px 0 18px;
+ margin: 20px 0 14px;
font-size: 1.14em;
`,
h4: `
@@ -93,15 +82,13 @@ export const markdownConfig = {
p: `
line-height: 1.65;
margin-bottom: 14px;
- font-size: 14px;
`,
code: ' ',
strong: 'font-weight: 700;color: rgb(248, 57, 41);',
+ img: 'border-radius: 10px',
video: 'width: 100%',
},
- /** 容器样式 */
- containStyle: 'font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;padding:0;font-size: 14px;color: #606266;word-spacing: 0.8px;letter-spacing: 0.8px;border-radius: 0px;background-color:transparent;',
- /** 加载图 / 空图(来自应用配置 imagesConfig) */
+ containStyle: 'padding:0;background-color:transparent;',
loadingGif: checkImageUrl(undefined),
emptyGif: checkImageUrl(undefined),
}
diff --git a/src/pages-blog/archives/archives.vue b/src/pages-blog/archives/archives.vue
index be37108..a4620c9 100644
--- a/src/pages-blog/archives/archives.vue
+++ b/src/pages-blog/archives/archives.vue
@@ -282,6 +282,7 @@ onReachBottom(() => {
v-for="post in item.posts"
:key="post.metadata.name"
from="archives"
+ :variant="archivesListLayout === 'double' ? 'grid' : 'list'"
:article="post"
:audit-mode="calcAuditModeEnabled"
/>
diff --git a/src/pages-blog/article-detail/article-detail.vue b/src/pages-blog/article-detail/article-detail.vue
index c68f0fc..6499222 100644
--- a/src/pages-blog/article-detail/article-detail.vue
+++ b/src/pages-blog/article-detail/article-detail.vue
@@ -539,7 +539,7 @@
-
+
diff --git a/src/pages/tabbar/home/home.vue b/src/pages/tabbar/home/home.vue
index 09fdf88..7218543 100644
--- a/src/pages/tabbar/home/home.vue
+++ b/src/pages/tabbar/home/home.vue
@@ -249,7 +249,7 @@
+ :variant="homeListLayout === 'double' ? 'grid' : 'list'" :audit-mode="calcAuditModeEnabled" />
{{ loadMoreText }}