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

180 lines
3.7 KiB
Stylus
Raw Normal View History

2021-02-19 23:33:19 +08:00
// list
2024-01-17 00:27:48 +08:00
.l_main .post-list
2021-02-19 23:33:19 +08:00
margin: 1rem
2022-10-22 13:03:47 +08:00
.post-title:first-child
margin-top: .5rem
2021-02-19 23:33:19 +08:00
2024-01-17 00:27:48 +08:00
.l_main .post-list
2022-10-23 22:41:09 +08:00
.post-title
font-weight: 500
2024-02-09 00:47:03 +08:00
margin: 1.25rem auto .75rem 0
2022-10-23 22:41:09 +08:00
line-height: 1.2
2024-02-02 14:53:35 +08:00
font-size: $fsh4
2022-10-23 22:41:09 +08:00
border-bottom: none
2024-01-31 22:45:07 +08:00
color: var(--text)
2022-10-23 22:41:09 +08:00
trans1 color
@media screen and (max-width: $device-mobile)
2024-02-02 14:53:35 +08:00
font-size: $fsh5
2022-10-23 22:41:09 +08:00
margin: 0.5rem 0
.wiki .post-title
margin-top: 0.5rem
2021-02-19 23:33:19 +08:00
// card
.post-list .post-card
display: block
margin: 1rem 0
border-radius: $border-card
2024-01-25 22:50:17 +08:00
background: var(--card)
2024-02-04 18:27:30 +08:00
hoverable-card()
2021-02-19 23:33:19 +08:00
overflow: hidden
2022-11-05 00:13:32 +08:00
z-index: 0
2024-01-25 22:50:17 +08:00
position: relative
2021-08-23 23:47:12 +08:00
.excerpt
margin: 1rem 0
2022-10-23 22:41:09 +08:00
@media screen and (max-width: $device-mobile)
margin: 0.5rem 0
2021-08-23 23:47:12 +08:00
>p
margin: 1rem 0
2022-10-23 22:41:09 +08:00
@media screen and (max-width: $device-mobile)
margin: 0.5rem 0
line-height: 1.5
2021-02-19 23:33:19 +08:00
.meta.cap
2024-02-01 21:27:34 +08:00
&,span
display: flex
align-items: center
2021-02-27 17:15:47 +08:00
flex-wrap: wrap
2024-02-01 21:27:34 +08:00
margin: 0
line-height: 2
2024-02-02 00:36:01 +08:00
--fsp: $fsp1
2024-02-01 21:27:34 +08:00
font-size: var(--fsp)
svg
height: 1em
width: auto
2021-02-27 17:15:47 +08:00
line-height: 0
2024-02-01 21:27:34 +08:00
transform: scale(1.2)
margin-right: 8px
>span+span
margin-left: 1.5rem
span.pin
2021-02-27 17:15:47 +08:00
img
object-fit: contain
2024-01-19 13:51:55 +08:00
svg
color: $c-red
2022-11-05 00:13:32 +08:00
2024-01-25 22:50:17 +08:00
.post-list.post .post-card:hover
img
filter: brightness(50%)
2021-02-19 23:33:19 +08:00
// common article
2022-11-23 22:44:11 +08:00
.post-list .md-text
2021-02-19 23:33:19 +08:00
padding: 1rem
2022-10-23 22:41:09 +08:00
@media screen and (max-width: $device-mobile)
padding: 0.5rem 1rem
2021-12-25 01:31:23 +08:00
p
color: var(--text-p2)
2022-10-23 22:41:09 +08:00
font-size: $fs-14
2022-01-04 23:34:21 +08:00
2021-02-19 23:33:19 +08:00
// posts
2021-12-25 01:31:23 +08:00
.post-list .post-card .post-cover
overflow: hidden
width: 'calc(100% + 2 * %s)' % 1rem
border-radius: 0
margin-left: -1rem
margin-top: -1rem
margin-right: -1rem
2022-10-22 13:03:47 +08:00
background: var(--block)
2021-12-25 01:31:23 +08:00
&:not(.lazy)
trans1: transform 1s
img
object-fit: cover
width: 100%
border-radius: 0
2024-01-11 22:03:17 +08:00
aspect-ratio: hexo-config('article.cover_ratio')
.post-list .post-card.post.photo
.cover
position: relative
line-height: 0
2021-02-24 22:07:32 +08:00
img
width: 100%
2024-01-11 22:03:17 +08:00
object-fit: cover
aspect-ratio: hexo-config('article.cover_ratio')
2021-12-25 01:31:23 +08:00
.cover-info
2022-10-23 01:05:16 +08:00
padding: 1.5rem 1rem
position: absolute
2021-12-25 01:31:23 +08:00
line-height: 1.2
width: 'calc(100% - %s * 2)' % 1rem
2024-01-31 22:45:07 +08:00
--text-banner: white
color: var(--text-banner)
2021-12-25 01:31:23 +08:00
&[position=top]
top: 0
2022-10-30 21:24:56 +08:00
background-image: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0))
2021-12-25 01:31:23 +08:00
&[position=bottom]
bottom: 0
2022-10-30 21:24:56 +08:00
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
2022-01-04 23:34:21 +08:00
div+div
2022-10-23 14:12:44 +08:00
margin-top: 4px
.cap
2022-01-04 23:34:21 +08:00
font-size: $fs-13
2022-10-29 23:10:23 +08:00
color: unset
2021-12-25 01:31:23 +08:00
.title
font-weight: 500
2024-02-02 00:36:01 +08:00
font-size: $fsh3
2022-10-23 14:12:44 +08:00
@media screen and (max-width: $device-mobile)
padding: 1rem
div+div
margin-top: 2px
.title
2024-02-02 00:36:01 +08:00
font-size: $fsh4
2022-10-23 14:12:44 +08:00
.cap
font-size: $fs-12
h2
margin: .25rem 0
2024-02-02 00:36:01 +08:00
font-size: $fsh4
2021-03-01 23:24:57 +08:00
2021-02-19 23:33:19 +08:00
// wiki
.post-list .post-card.wiki article
display: flex
flex-wrap: wrap
trans1 box-shadow
justify-content: center
2021-08-23 23:47:12 +08:00
padding: 1rem .5rem
2021-02-19 23:33:19 +08:00
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
2023-12-21 23:59:53 +08:00
margin: 1rem 3rem
2021-02-19 23:33:19 +08:00
align-items: center
img
2023-12-21 23:59:53 +08:00
width: 96px
max-height: 96px
2021-02-19 23:33:19 +08:00
object-fit: contain
2021-03-04 23:38:41 +08:00
&:not(.lazy)
trans1: transform 0.75s
2021-02-19 23:33:19 +08:00
.post-list .post-card.wiki article .excerpt
2021-08-23 23:47:12 +08:00
margin: 1rem .5rem
2021-11-20 13:18:52 +08:00
@media screen and (min-width: 950px)
margin-right: 2rem
min-width: 280px
2021-02-19 23:33:19 +08:00
flex: 1
overflow: hidden
word-wrap: break-word
2023-12-21 23:59:53 +08:00
.caps
line-height: 1
margin-bottom: 0.75rem
2023-12-18 13:21:20 +08:00
.cap
2024-01-05 19:43:39 +08:00
--theme-block: var(--block)
2023-12-18 13:21:20 +08:00
background: var(--theme-block)
padding: 2px 4px
border-radius: 2px
2021-08-23 23:47:12 +08:00
p:last-child
margin-bottom: 0
2023-12-17 19:39:23 +08:00
.cap+.cap
2024-01-04 22:50:57 +08:00
margin-left: 4px
.post-list.archives
@media screen and (max-width: $device-mobile)
margin: 1rem 0