1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-24 16:37:30 +00:00
cloudtube/sass/includes/_video-list-item.sass

208 lines
3.8 KiB
Sass
Raw Normal View History

$_theme: () !default
@use "sass:map"
@use "_dimensions" as dimensions
2020-10-02 12:32:56 +00:00
2021-10-06 07:55:14 +00:00
// navigator hacks
.thumbnail > .thumbnail__options-container
float: right
2021-05-11 12:29:44 +00:00
.thumbnail
$more-size: 24px
&__more
position: absolute
top: 4px
right: 4px
width: $more-size
height: $more-size
border-radius: 50%
background-color: rgba(20, 20, 20, 0.85)
padding: 0px
color: #fff
visibility: hidden
@at-root .thumbnail:hover &, body.show-focus &
visibility: visible
&[open]
2021-05-11 12:29:44 +00:00
visibility: visible
&__show-more
display: block
height: $more-size
color: #fff
2021-05-11 12:29:44 +00:00
line-height: 16px
font-size: 25px
text-align: center
&::-webkit-details-marker
display: none
2021-10-06 07:55:14 +00:00
// "&__more" is needed for navigator hacks
&__more &__options-container
2021-05-11 12:29:44 +00:00
position: absolute
z-index: 1
top: $more-size
left: -1000px
right: 0
padding-top: 4px
display: flex
justify-content: flex-end
pointer-events: none
&__options-list
pointer-events: auto
display: grid
background-color: map.get($_theme, "bg-3")
2021-05-11 12:29:44 +00:00
padding: 8px 0px
border-radius: 8px
box-shadow: 0 2px 6px 2px #000
&::before
content: ""
display: block
height: 12px
width: 12px
position: absolute
top: 0
right: 0
transform: translate(-6px, -1px) rotate(-45deg)
clip-path: polygon(-5% -20%, 120% -20%, 120% 125%)
background-color: map.get($_theme, "bg-3")
2021-05-11 12:29:44 +00:00
box-shadow: 0px 0px 4px 0px #000
pointer-events: none
2020-08-24 10:43:55 +00:00
@mixin video-list-item
display: grid
grid-template-columns: 160px 1fr
grid-gap: 8px
align-items: start
align-content: start
margin-bottom: 12px
2020-12-29 10:07:23 +00:00
@at-root .video-list-item--watched#{&}
background: map.get($_theme, "bg-dim")
padding: 4px 4px 0px
margin: -4px -4px 8px
2020-12-29 10:07:23 +00:00
.thumbnail
margin-bottom: 4px
2020-12-29 10:07:23 +00:00
.image
opacity: 0.4
2020-08-24 10:43:55 +00:00
.thumbnail
position: relative
display: flex
background: map.get($_theme, "bg-0")
2020-08-24 10:43:55 +00:00
&__link
font-size: 0 // remove whitespace around the image
2020-08-24 10:43:55 +00:00
.image
width: 160px
height: 90px
.duration
position: absolute
bottom: 3px
right: 3px
color: #fff
2020-08-24 10:43:55 +00:00
font-size: 14px
background: rgba(20, 20, 20, 0.85)
line-height: 1
padding: 3px 5px 4px
border-radius: 4px
pointer-events: none
2020-08-24 10:43:55 +00:00
.title
font-size: 15px
line-height: 1.2
.title-link
color: map.get($_theme, "fg-main")
2020-08-24 10:43:55 +00:00
text-decoration: none
.author-line
margin-top: 4px
font-size: 15px
color: map.get($_theme, "fg-dim")
2020-08-24 10:43:55 +00:00
.author
color: map.get($_theme, "fg-dim")
2020-08-24 10:43:55 +00:00
text-decoration: none
&:hover, &:active
color: map.get($_theme, "fg-bright")
2020-08-24 10:43:55 +00:00
text-decoration: underline
2020-08-29 13:21:48 +00:00
@mixin recommendation-item
@include video-list-item
@mixin large-item
@include video-list-item
.title
2020-10-02 12:32:56 +00:00
font-size: 17px
2020-08-29 13:21:48 +00:00
+dimensions.wide
2020-10-02 12:32:56 +00:00
grid-gap: 16px
grid-template-columns: auto 1fr
margin-bottom: 20px
max-height: 150px
@at-root .video-list-item--watched#{&}
padding: 8px 8px 0px
margin: -8px -8px 20px
.thumbnail
margin-bottom: 8px
2020-10-02 12:32:56 +00:00
.image
width: 240px
height: 135px
.duration
font-size: 17px
padding: 4px 5px
right: 5px
bottom: 5px
2021-05-11 12:29:44 +00:00
.info
overflow: hidden
max-height: 150px
2020-10-02 12:32:56 +00:00
.title
font-size: 24px
.author-line
font-size: 15px
color: map.get($_theme, "fg-main")
2020-10-02 12:32:56 +00:00
.author
color: map.get($_theme, "fg-main")
2020-10-02 12:32:56 +00:00
.description
margin-top: 16px
font-size: 15px
color: map.get($_theme, "fg-dim")
2020-10-02 12:32:56 +00:00
+dimensions.thin
2020-10-02 12:32:56 +00:00
.description
display: none
2020-08-29 13:21:48 +00:00
@mixin search-result
@include large-item
.description b
font-weight: normal
color: map.get($_theme, "fg-main")
2020-08-29 13:21:48 +00:00
@mixin channel-video
@include large-item
2020-08-30 15:14:05 +00:00
@mixin subscriptions-video
@include large-item