Skip to content

Commit

Permalink
style: enhance link styling and icon behavior #460 #459
Browse files Browse the repository at this point in the history
- Update link icon to use solid style and add 'link-icon' class
- Improve link hover effects with smooth transitions
- Adjust padding and text decoration for better visual appearance
  • Loading branch information
EvanNotFound committed Nov 20, 2024
1 parent 9300935 commit 38cfbd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/filters/link-handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ hexo.extend.filter.register(
if (theme.config.articles.style.link_icon == false) {
return `<a class="link" ${attrBegin} href="${href}" ${attrEnd}>${html}</a>`;
} else {
return `<a class="link" ${attrBegin} href="${href}" ${attrEnd}>${html}<i class="fa-sharp fa-regular fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em]"></i>`;
return `<a class="link" ${attrBegin} href="${href}" ${attrEnd}>${html}<i class="fa-solid fa-arrow-up-right ml-[0.2em] font-light align-text-top text-[0.7em] link-icon"></i></a>`;
}
},
);
Expand Down
13 changes: 12 additions & 1 deletion source/css/common/markdown.styl
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,33 @@
// border-bottom 1px solid var(--third-text-color)
box-sizing border-box
padding-bottom 2px
padding-right 0.2em
text-underline-offset 2px
text-decoration-color var(--fourth-text-color)
transition: text-decoration-color 0.2s ease

.fas, .far, fab
margin 0 2px 0 6px
position relative
color var(--third-text-color)
font-size 0.88rem

.link-icon
transition transform 0.2s ease

&:hover
text-decoration underline
text-decoration underline !important
text-decoration-color var(--primary-color) !important

.link-icon
transform translate(0.1em, -0.1em)

&::after
background var(--primary-color)
text-decoration underline



strong
color var(--default-text-color)

Expand Down

0 comments on commit 38cfbd5

Please sign in to comment.