1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-09-12 16:40:40 +08:00

style,refactor,feat: 统一卡片布局为图片在上并优化细节

1. 调整全局默认卡片样式为image_top,更新各页面默认布局配置
2. 给文章卡片添加variant属性适配双列/单列布局
3. 优化文章内容区域文字样式与评论列表空状态
4. 简化快捷导航组件代码,移除冗余样式与多余props
5. 优化markdown渲染配置与评论头像空格格式
This commit is contained in:
小莫唐尼
2026-09-09 17:47:54 +08:00
parent b41e01106a
commit d528d214b5
9 changed files with 32 additions and 62 deletions
+3 -3
View File
@@ -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,
+3 -16
View File
@@ -1,16 +1,9 @@
/**
* mp-html 富文本 / markdown 渲染业务配置
* 源自旧项目 common/markdown/markdown.config.js,TS 化复刻(业务封装新建,插件本体走 npm mp-html)
* 用法:<mp-html :content="html" :tag-style="markdownConfig.tagStyle" :container-style="markdownConfig.containStyle" />
*/
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),
}