hexo-theme-volantis
Version:
Elegant and powerful theme for Hexo.
185 lines (171 loc) • 4.12 kB
text/stylus
// 文章列表卡片样式
// 卡片标题
.article-title
font-weight: 500
margin-bottom: $gap * 0.75
line-height: 1.4
a
color: var(--color-h1)
&:hover
color: var(--accent)
&[pin]
margin-right: 36px
.article-desc
word-break: break-word
.post-v3
overflow: hidden
text-align: justify
.md
color: var(--color-p)
.pin
position: absolute
width: 20px
height: 20px
border-radius: 20px
right: $gap * 1.5
top: $gap * 1.5
z-index: 1
pointer-events: none
.wiki-img-div
display: flex
margin: 1rem 3rem
align-items: center
img
margin: 0 auto
width: 96px
max-height: 96px
object-fit: contain
trans1: all 0.75s
svg
width: 96px
margin: 0 auto
display: block
// 文章卡片元信息
.meta-v3[line_style='solid']
border-top: 1px solid var(--color-text-a10)
.meta-v3[line_style='dashed']
border-top: 2px dashed var(--color-text-a10)
.meta-v3[line_style='dotted']
border-top: 4px dotted var(--color-text-a10)
.meta-v3
margin-top: $gap
padding-top: $gap * 0.75
display: flex
flex-wrap: wrap
justify-content: space-between
color: var(--color-meta)
>div
display: flex
flex-wrap: wrap
align-items: center
user-select: none
time
font-size: $fontsize-meta
.category-link
font-size: $fontsize-meta
color: var(--color-meta)
-webkit-font-smoothing: auto
-moz-osx-font-smoothing: auto
&:hover
color: var(--accent)
.readmore
font-weight: bold
.avatar
line-height: 0
margin-right: .75em
img
width: 24px
height: 24px
display: block
border-radius: 12px
object-fit: cover
// 文章封面图
.headimg-div
display: block
margin-left: 0 - 1.5 * $gap
margin-top: 0 - 1.5 * $gap
margin-bottom: 1.25 * $gap
width: "calc(100% + 3 * %s)" % $gap
.headimg-a
display: block
overflow: hidden
height: 280px
@media screen and (max-width: $device-tablet)
height: 250px
@media screen and (max-width: $device-mobile)
height: 220px
@media screen and (max-width: $device-mobile-l)
height: 190px
.headimg
object-fit: cover
width: 100%
height: 100%
transition transform 3s ease-out
&:hover
transform: scale(1.1)
&.lazyload:not(.placeholder)
transition transform 3s ease-out, opacity .5s ease-out
&:not(.loaded)
opacity: 0
&.loaded
opacity: 1
.headimg-div.headimg-cover
margin-bottom: -1.5 * $gap
.headimg-a
height: 380px
@media screen and (max-width: $device-tablet)
height: 350px
@media screen and (max-width: $device-mobile)
height: 320px
&:before
content: ''
z-index: 1
position: absolute
left: 0
right: 0
height: 152px
transition: all 0.2s ease-out
backdrop-filter: saturate(120%) blur(1em)
&[position=top]:before
top: 0
mask: linear-gradient(black, rgba(black, 0.75), transparent)
-webkit-mask: linear-gradient(black, rgba(black, 0.75), transparent)
&[position=bottom]:before
bottom: 0
mask: linear-gradient(transparent, rgba(black, 0.75), black)
-webkit-mask: linear-gradient(transparent, rgba(black, 0.75), black)
.cover-info
padding: 1.5 * $gap
@media screen and (max-width: $device-tablet)
padding: $gap
position: absolute
width: 100%
line-height: 1.2
color: #fff
z-index: 2
&[position=top]
top: 0
background-image: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0))
&[position=bottom]
bottom: 0
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
.text
color: inherit
transition: all 0.2s ease-out
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2)
.headline
margin-bottom: $gap * 0.75
font-weight: bold
line-height: 1.4
font-size: 1.5rem
.caption
font-size: 1rem
.wiki
.caps
line-height: 1
margin-bottom: 0.75rem
.cap
--theme-block: var(--block)
background: var(--theme-block)
padding: 2px 4px
border-radius: 2px