hexo-theme-stellar/source/css/_layout/partial/related.styl

107 lines
2.3 KiB
Stylus

.related-wrap
padding: 2rem 1rem
&:empty
display: none
section.header
display: flex
justify-content: space-between
align-items: center
>span.title
padding: 0.25rem 0
section.footer
margin-top: 1rem
a.more
padding: 0.25rem 0.5rem
border-radius: $border-block
color: var(--text-p1)
.related-wrap#related-posts
.related-posts
width: 100%
margin: 1rem 0
border-radius: $border-block
background: var(--block)
overflow: hidden
border: 1px solid var(--block-border)
.item
line-height: 1.2
display: block
padding: 1rem
.title
color: var(--text-p1)
font-weight: 500
font-size: 1rem
display: -webkit-box
-webkit-box-orient: vertical
overflow: hidden
-webkit-line-clamp: 2
.excerpt
color: var(--text-p3)
font-size: $fs-12
margin-top: 0.5rem
display: -webkit-box
-webkit-box-orient: vertical
overflow: hidden
-webkit-line-clamp: 3
&:hover
background: var(--block-hover)
.item+.item
border-top: 1px dashed var(--block-border)
.related-wrap#read-next
.body
margin-top: 1rem
display: grid
grid-gap: 16px
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 16px)
>a
display: flex
flex-direction: column
margin: 0
line-height: 1.2
padding: 0.75rem 0.5rem
color: var(--text-p1)
font-size: 1rem
background: var(--card)
border-radius: $border-block
box-shadow: $boxshadow-card
trans2: box-shadow transform
&:last-child
text-align: right
.note
flex-shrink: 0
margin-bottom: 4px
font-size: $fs-12
color: var(--text-p4)
font-weight: 500
&:hover
color: $color-hover !important
box-shadow: $boxshadow-card-float
transform: translateY(-1px)
.wiki+.related-wrap#read-next .body>a
font-size: $fs-h3
&:last-child
color: var(--text-p4)
.related-wrap#comments
div.cmt-title
p
margin: 0
a
color: inherit
text-decoration: underline
&:hover
color: $color-hover
&:after
display: none
div.cmt-body
min-height: 150px
position: relative
svg.loading
top: 60px