Optimize .links-of-blogroll-item style

This commit is contained in:
Mimi 2024-11-28 01:57:10 +08:00
parent 58004e8180
commit 3fb181fd5d
4 changed files with 27 additions and 32 deletions

View File

@ -70,19 +70,7 @@
} }
.links-of-blogroll-item { .links-of-blogroll-item {
if (hexo-config('links_settings.layout') == 'inline') { padding: 0 5px;
display: inline-block;
}
padding: 2px 10px;
a {
box-sizing: border-box;
display: inline-block;
max-width: 280px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
.popular-posts .popular-posts-item .popular-posts-link:hover { .popular-posts .popular-posts-item .popular-posts-link:hover {
@ -115,6 +103,14 @@
flex-column(); flex-column();
} }
.links-of-blogroll-item {
max-width: calc(100% - 20px);
a {
sidebar-inline-links-item();
}
}
.cc-license { .cc-license {
.cc-opacity { .cc-opacity {
border-bottom: 0; border-bottom: 0;

View File

@ -9,6 +9,12 @@
.links-of-blogroll-list { .links-of-blogroll-list {
list-style: none; list-style: none;
margin: 0; gap: 5px;
margin: 5px 0 0;
padding: 0; padding: 0;
flex-wrap();
if (hexo-config('links_settings.layout') == 'block') {
flex-direction: column;
}
} }

View File

@ -76,17 +76,12 @@ disable-user-select() {
} }
sidebar-inline-links-item() { sidebar-inline-links-item() {
margin: 5px 0 0;
a {
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;
overflow: hidden; overflow: hidden;
padding: 0 5px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
}
} }
flex-wrap() { flex-wrap() {

View File

@ -50,7 +50,7 @@
} }
.links-of-author-item { .links-of-author-item {
sidebar-inline-links-item(); margin: 5px 0 0;
if (not hexo-config('social_icons.icons_only')) { if (not hexo-config('social_icons.icons_only')) {
width: 50%; width: 50%;
@ -60,6 +60,8 @@
border-bottom: 0; border-bottom: 0;
border-radius: 4px; border-radius: 4px;
display: block; display: block;
padding: 0 5px;
sidebar-inline-links-item();
&:hover { &:hover {
background: var(--body-bg-color); background: var(--body-bg-color);
@ -67,12 +69,8 @@
} }
} }
.links-of-blogroll-item { .links-of-blogroll-item a {
if (hexo-config('links_settings.layout') == 'inline') { padding: 0 5px;
display: inline-block;
max-width: 100%;
sidebar-inline-links-item();
}
} }
if (hexo-config('back2top.sidebar')) { if (hexo-config('back2top.sidebar')) {