Skip to content

Commit

Permalink
Optimize .links-of-blogroll-item style
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Nov 27, 2024
1 parent 58004e8 commit 3fb181f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 32 deletions.
22 changes: 9 additions & 13 deletions source/css/_common/outline/sidebar/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,7 @@
}

.links-of-blogroll-item {
if (hexo-config('links_settings.layout') == 'inline') {
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;
}
padding: 0 5px;
}

.popular-posts .popular-posts-item .popular-posts-link:hover {
Expand Down Expand Up @@ -115,6 +103,14 @@
flex-column();
}

.links-of-blogroll-item {
max-width: calc(100% - 20px);

a {
sidebar-inline-links-item();
}
}

.cc-license {
.cc-opacity {
border-bottom: 0;
Expand Down
8 changes: 7 additions & 1 deletion source/css/_common/outline/sidebar/sidebar-blogroll.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

.links-of-blogroll-list {
list-style: none;
margin: 0;
gap: 5px;
margin: 5px 0 0;
padding: 0;
flex-wrap();

if (hexo-config('links_settings.layout') == 'block') {
flex-direction: column;
}
}
17 changes: 6 additions & 11 deletions source/css/_mixins.styl
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,12 @@ disable-user-select() {
}

sidebar-inline-links-item() {
margin: 5px 0 0;

a {
box-sizing: border-box;
display: inline-block;
max-width: 100%;
overflow: hidden;
padding: 0 5px;
text-overflow: ellipsis;
white-space: nowrap;
}
box-sizing: border-box;
display: inline-block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

flex-wrap() {
Expand Down
12 changes: 5 additions & 7 deletions source/css/_schemes/Pisces/_sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}

.links-of-author-item {
sidebar-inline-links-item();
margin: 5px 0 0;

if (not hexo-config('social_icons.icons_only')) {
width: 50%;
Expand All @@ -60,19 +60,17 @@
border-bottom: 0;
border-radius: 4px;
display: block;
padding: 0 5px;
sidebar-inline-links-item();

&:hover {
background: var(--body-bg-color);
}
}
}

.links-of-blogroll-item {
if (hexo-config('links_settings.layout') == 'inline') {
display: inline-block;
max-width: 100%;
sidebar-inline-links-item();
}
.links-of-blogroll-item a {
padding: 0 5px;
}

if (hexo-config('back2top.sidebar')) {
Expand Down

0 comments on commit 3fb181f

Please sign in to comment.