[opt] style

This commit is contained in:
xaoxuu 2024-01-11 22:03:17 +08:00
parent 9ae92ab35b
commit ace8dfbfcd
5 changed files with 12 additions and 19 deletions

View File

@ -59,6 +59,8 @@ breadcrumb:
article: article:
# 如果没有指定封面,是否根据 tags 作为关键词搜索封面图片? # 如果没有指定封面,是否根据 tags 作为关键词搜索封面图片?
auto_cover: false # search from https://source.unsplash.com/ auto_cover: false # search from https://source.unsplash.com/
# 封面图宽高比
cover_ratio: 2.4
# 如果没有指定横幅,是否根据 tags 作为关键词搜索横幅图片? # 如果没有指定横幅,是否根据 tags 作为关键词搜索横幅图片?
auto_banner: false # search from https://source.unsplash.com/ auto_banner: false # search from https://source.unsplash.com/
# 如果没有指定 excerpt 和 description将自动取多长的内容作为文章摘要 # 如果没有指定 excerpt 和 description将自动取多长的内容作为文章摘要

View File

@ -84,22 +84,16 @@
object-fit: cover object-fit: cover
width: 100% width: 100%
border-radius: 0 border-radius: 0
height: 280px aspect-ratio: hexo-config('article.cover_ratio')
@media screen and (max-width: 900px)
height: 240px
@media screen and (max-width: $device-tablet)
height: 220px
@media screen and (max-width: $device-mobile-425)
height: 200px
@media screen and (max-width: $device-mobile-375)
height: 180px
.post-list .post-card.post.photo .post-list .post-card.post.photo
.cover .cover
position: relative position: relative
line-height: 0 line-height: 0
img img
width: 100% width: 100%
object-fit: cover
aspect-ratio: hexo-config('article.cover_ratio')
.cover-info .cover-info
padding: 1.5rem 1rem padding: 1.5rem 1rem
position: absolute position: absolute

View File

@ -8,7 +8,7 @@
margin-bottom: .5em margin-bottom: .5em
position: relative position: relative
padding: 4px 0 padding: 4px 0
color: var(--text-p3) color: var(--text-p1)
&:after &:after
content: "" content: ""
position: absolute position: absolute
@ -18,7 +18,7 @@
right: 0 right: 0
z-index: -1 z-index: -1
border-radius: 4px border-radius: 4px
background: var(--block-border) background: $color-theme
a.post a.post
display: inline-flex display: inline-flex
align-items: baseline align-items: baseline
@ -34,13 +34,9 @@
color: var(--text-p4) color: var(--text-p4)
&:hover &:hover
border-bottom: 1px solid $color-theme border-bottom: 1px solid $color-theme
color: var(--text-p0)
time time
color: $color-theme color: $color-theme
&:hover
.archive-header
color: var(--text-p1)
&:after
background: $color-theme

View File

@ -21,6 +21,7 @@
font-size: 1.5rem font-size: 1.5rem
margin: 1rem 0 margin: 1rem 0
line-height: 1.2 line-height: 1.2
color: var(--text-p0)
.description .description
margin: 1rem 0 margin: 1rem 0
.start-wrap .start-wrap

View File

@ -6,9 +6,9 @@
flex-direction: column flex-direction: column
justify-content: flex-end justify-content: flex-end
align-items: flex-start align-items: flex-start
height: 240px height: 220px
@media screen and (max-width: $device-mobile-max) @media screen and (max-width: $device-mobile-max)
height: 200px height: 180px
.bg .bg
z-index: 0 z-index: 0
.content .content