hexo-theme-stellar/source/css/_layout/post_list.styl

121 lines
2.5 KiB
Stylus
Raw Normal View History

2021-02-19 23:33:19 +08:00
// list
.post-list
margin: 1rem
.card-title,.list-title
2021-02-26 20:02:32 +08:00
color: var(--text-p3)
2021-02-19 23:33:19 +08:00
font-family: $ff-code
line-height: 1.2
.list-title
2021-02-26 20:02:32 +08:00
font-weight: 500
2021-02-19 23:33:19 +08:00
margin: 2rem 1rem 0rem
2021-02-26 20:02:32 +08:00
font-size: 1.2rem
2021-02-19 23:33:19 +08:00
.card-title
2021-02-26 20:02:32 +08:00
font-weight: 600
2021-02-19 23:33:19 +08:00
padding-bottom: 0.5rem
font-size: 1.2rem
// card
.post-list .post-card
display: block
margin: 1rem 0
color: var(--text-p2)
border-radius: $border-card
box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.02)
trans1 box-shadow
overflow: hidden
background: var(--card)
.meta.cap
2021-02-27 17:15:47 +08:00
display: flex
flex-wrap: wrap
align-items: center
2021-02-19 23:33:19 +08:00
margin-bottom: 0.5rem
span+span
margin-left: 0.5rem
2021-02-27 17:15:47 +08:00
span.pin
line-height: 0
img
object-fit: contain
height: 1.5em
2021-02-19 23:33:19 +08:00
.post-list .post-card:hover
box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.04), 0 4px 16px 0px rgba(0, 0, 0, 0.04)
2021-02-24 00:32:07 +08:00
.preview img
2021-02-19 23:33:19 +08:00
transform: scale(1.1)
.excerpt .readmore
color: $color-link
// common article
.post-list article
padding: 1rem
// posts
.post-list .post-card
.post-title
font-weight: 500
margin: .5em 0
line-height: 1.2
font-size: $fs-h3
border-bottom: none
color: var(--text-p1)
trans1 color
.excerpt
font-size: $fs14
.post-cover
2021-02-24 22:07:32 +08:00
overflow: hidden
margin-left: -1rem
margin-top: -1rem
margin-right: -1rem
img
object-fit: cover
disable-select()
width: 100%
border-radius: 0
2021-02-19 23:33:19 +08:00
height: 320px
2021-02-24 22:07:32 +08:00
@media screen and (max-width: 900px)
height: 280px
@media screen and (max-width: $device-tablet)
height: 320px
@media screen and (max-width: $device-mobile)
height: 280px
@media screen and (max-width: $device-mobile-l)
height: 240px
@media screen and (max-width: $device-mobile-m)
height: 200px
&:not(.lazyload)
trans1: transform 1s
2021-02-19 23:33:19 +08:00
.post-list .post-card.post:hover
.post-title
color: $color-hover
2021-02-24 22:07:32 +08:00
.post-cover img
2021-02-19 23:33:19 +08:00
transform: scale(1.04)
// wiki
.post-list .post-card.wiki article
display: flex
flex-wrap: wrap
trans1 box-shadow
justify-content: center
2021-02-24 00:32:07 +08:00
.post-list .post-card.wiki article .preview
2021-02-19 23:33:19 +08:00
display: flex
2021-02-24 00:32:07 +08:00
width: 200px
2021-02-19 23:33:19 +08:00
margin: 1rem
align-items: center
img
object-fit: contain
2021-02-24 21:27:31 +08:00
img:not(.lazyload)
trans1: transform 0.75s
2021-02-19 23:33:19 +08:00
.post-list .post-card.wiki article .excerpt
margin: 1rem
min-width: 220px
flex: 1
overflow: hidden
word-wrap: break-word
2021-02-24 00:32:07 +08:00
.post-title
margin-top: 0.5rem
font-weight: 500
font-size: 1.75rem
2021-02-19 23:33:19 +08:00
>p
margin: 0.5rem 0
font-size: $fs14