优化样式

This commit is contained in:
xaoxuu 2021-11-19 23:46:31 +08:00
parent 700e0cc136
commit 61769c80b0
5 changed files with 12 additions and 12 deletions

View File

@ -34,14 +34,14 @@ hexo.extend.tag.register('link', function(args) {
return '<span class="title">' + args.title + '</span>';
}
function loadDesc() {
return '<span class="url fs12">' + (args.description || args.url) + '</span>';
return '<span class="desc fs12">' + (args.description || full_url_for(args.url)) + '</span>';
}
if (args.description) {
// top
el += '<div class="top">';
el += loadIcon();
el += '<span class="url fs12">' + full_url_for(args.url) + '</span>';
el += '<span class="desc fs12">' + full_url_for(args.url) + '</span>';
el += '</div>';
// bottom
el += '<div class="bottom">';

View File

@ -88,6 +88,7 @@ article.md .highlight
padding: 4px 0.5rem
opacity: .25
font-weight: 700
color: var(--theme)
&.yaml .code:before
content: "YAML"

View File

@ -21,11 +21,10 @@ nav.cap
display: flex
overflow: scroll visible
scrollbar(0, 0)
padding-left: .25rem
>p
margin: 0
a
padding: .25rem .75rem
padding: .25rem 1rem
margin: 10px 0 8px 0
line-height: 2
color: var(--text-p3)
@ -35,11 +34,11 @@ nav.cap
position: relative
z-index: 1
&:after
width: 'calc(100% - 2 * %s)' % .5rem
height: 2px
position: absolute
bottom: -8px
left: .5rem
left: 1rem
right: 1rem
background: $color-theme
border-radius: 2px
pointer-events: none

View File

@ -51,7 +51,7 @@
background-repeat: no-repeat
background-size: contain
background-position: left center
.url
.desc
opacity: .75
line-height: 1.5
span
@ -73,8 +73,8 @@
margin: .5rem 0 .5rem 1rem
.title
font-size: $fs-14
margin: 4px 0
.url
margin: 1px 0 5px 0
.desc
flex-shrink: 0
txt-ellipsis()
span
@ -83,5 +83,5 @@
span.title
font-weight: 500
color: var(--text-p1)
span.url
span.desc
color: var(--text-p3)

View File

@ -64,10 +64,10 @@
z-index: 1
position: absolute
background: $color-theme
width: 'calc(100% - 2 * %s)' % .5rem
height: 2px
bottom: -8px
left: .5rem
left: .75rem
right: .75rem
border-radius: 2px
.tab-content