友链部分样式优化

This commit is contained in:
2025-12-14 00:08:15 +08:00
parent f2ad1e4ee3
commit 1c8afc1841
4 changed files with 186 additions and 33 deletions

View File

@@ -51,19 +51,19 @@ const blogTheme = getThemeConfig({
// 友链 // 友链
friend: [ friend: [
{
nickname: 'NoahのBlog',
des: '我们生来就是为了成为自己,\n而不是成为某种正确的人',
avatar: 'https://cdn.tulan.cyou/noah/2025/07/26/b_5255bd8e31082e2a4332c4eb4172686e.jpg',
url: 'https://blog.noah0932.top/',
},
{ {
nickname: 'LINUX DO', nickname: 'LINUX DO',
des: '真诚、友善、团结、专业,共建你我引以为荣之社区。', des: '真诚、友善、团结、专业,\n共建你我引以为荣之社区。',
avatar: avatar:
'linuxdo.png', 'linuxdo.png',
url: 'https://linux.do/', url: 'https://linux.do/',
}, },
{
nickname: 'NoahのBlog',
des: '我们生来就是为了成为自己,而不是成为某种正确的人',
avatar: 'https://cdn.tulan.cyou/noah/2025/07/26/b_5255bd8e31082e2a4332c4eb4172686e.jpg',
url: 'https://blog.noah0932.top/',
},
], ],
// 公告 // 公告

File diff suppressed because one or more lines are too long

View File

@@ -22,4 +22,26 @@ html:not(.dark) .VPHome::before {
.blog-item .pin.pin::before { .blog-item .pin.pin::before {
// 修改颜色 // 修改颜色
background-image: linear-gradient(#1E90FF, #1E90FF); background-image: linear-gradient(#1E90FF, #1E90FF);
}
/* 友链描述支持多行 */
.friend-list li .des {
white-space: pre-wrap !important;
display: -webkit-box !important;
-webkit-line-clamp: 2 !important;
-webkit-box-orient: vertical !important;
text-overflow: ellipsis !important;
line-height: 1.4 !important;
height: auto !important;
overflow: hidden !important;
font-size: 13px !important;
}
/* 增加间距,让文字靠右一点 */
.friend-list li .info-wrapper {
padding-left: 16px !important;
}
.friend-list li {
padding: 0 4px !important;
} }

View File

@@ -1,26 +0,0 @@
/* 所有变量https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */
/* 自定义主题色示例,如下 */
/* 浅色模式使用的变量 */
html[theme] {
--vp-c-user-1:red;
--vp-c-user-2:blue;
--vp-c-user-3:green;
--vp-c-user-soft:rgba(255,0,0,.5);
}
/* 深色模式使用的变量 */
html[theme].dark {
--vp-c-user-1:yellow;
--vp-c-user-2:purple;
--vp-c-user-3:orange;
--vp-c-user-soft:rgba(255,255,0,.5);
}
/* 覆盖默认变量 */
html[theme],html[theme].dark {
--vp-c-brand-1: var(--vp-c-user-1);
--vp-c-brand-2: var(--vp-c-user-2);
--vp-c-brand-3: var(--vp-c-user-3);
--vp-c-brand-soft: var(--vp-c-user-soft);
}