友链部分样式优化

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

@@ -22,4 +22,26 @@ html:not(.dark) .VPHome::before {
.blog-item .pin.pin::before {
// 修改颜色
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);
}