]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/include/_miniature.scss
Account/channel videos display as rows
[github/Chocobozzz/PeerTube.git] / client / src / sass / include / _miniature.scss
CommitLineData
830b4faf
C
1@import '_variables';
2@import '_mixins';
3
4@mixin miniature-name {
8fc02e47 5 @include ellipsis-multiline(1.1em, 2);
0c9945d9 6
33253c1a 7 word-break: break-all;
0f7407d9 8 word-wrap: break-word;
830b4faf 9 transition: color 0.2s;
830b4faf 10 font-weight: $font-semibold;
e66883b3 11 color: pvar(--mainForegroundColor);
830b4faf
C
12
13 &:hover {
14 text-decoration: none;
15 }
16
17 &.blur-filter {
18 filter: blur(3px);
19 padding-left: 4px;
20 }
21}
22
e2f01c47 23@mixin miniature-thumbnail {
830b4faf
C
24 @include disable-outline;
25
0f7407d9
C
26 $play-overlay-transition: 0.2s ease;
27 $play-overlay-height: 26px;
28 $play-overlay-width: 18px;
29
8fc02e47
C
30 display: flex;
31 flex-direction: column;
830b4faf
C
32 position: relative;
33 border-radius: 3px;
0f7407d9
C
34 width: 100%;
35 height: 100%;
830b4faf 36 overflow: hidden;
830b4faf
C
37 background-color: #ececec;
38 transition: filter $play-overlay-transition;
39
40 .play-overlay {
41 position: absolute;
42 right: 0;
43 bottom: 0;
44
c5a1ae50
C
45 width: inherit;
46 height: inherit;
830b4faf 47 opacity: 0;
41f8f620 48 background-color: rgba(0, 0, 0, 0.3);
830b4faf
C
49
50 &, .icon {
51 transition: all $play-overlay-transition;
52 }
53
54 .icon {
3efa3f4d 55 @include play-icon($play-overlay-width, $play-overlay-height);
830b4faf
C
56 }
57 }
58
59 &:hover {
60 text-decoration: none !important;
61
62 .play-overlay {
63 opacity: 1;
64
65 .icon {
66 transform: translate(-50%, -50%) scale(1);
67 }
68 }
69 }
70
71 &.focus-visible {
e66883b3 72 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
6a4c30de 73 outline: none;
830b4faf
C
74 }
75
76 img {
c5a1ae50
C
77 width: inherit;
78 height: inherit;
830b4faf
C
79
80 &.blur-filter {
1b8a8905 81 filter: blur(20px);
830b4faf
C
82 transform : scale(1.03);
83 }
84 }
85}
86
e2f01c47 87@mixin thumbnail-size-component ($width, $height) {
03652b31 88 ::ng-deep .video-thumbnail {
e2f01c47
C
89 width: $width;
90 height: $height;
91 }
92}
93
830b4faf
C
94@mixin static-thumbnail-overlay {
95 display: inline-block;
96 background-color: rgba(0, 0, 0, 0.7);
97 color: #fff;
98}
99
900f7820 100// Use margin by default, or padding if $margin is false
0f7407d9
C
101@mixin grid-videos-miniature-margins ($margin: true, $min-margin: 0) {
102 --gridVideosMiniatureMargins: #{pvar(--videosHorizontalMarginContent)};
d7941370 103
900f7820 104 @if $margin {
0f7407d9
C
105 margin-left: var(--gridVideosMiniatureMargins) !important;
106 margin-right: var(--gridVideosMiniatureMargins) !important;
900f7820 107 } @else {
0f7407d9
C
108 padding-left: var(--gridVideosMiniatureMargins) !important;
109 padding-right: var(--gridVideosMiniatureMargins) !important;
900f7820 110 }
c8487f3f 111
cf78883c 112 @media screen and (max-width: $mobile-view) {
0f7407d9 113 --gridVideosMiniatureMargins: #{$min-margin};
c8487f3f 114
d7941370 115 width: auto;
900f7820
C
116 }
117}
118
0f7407d9
C
119@mixin grid-videos-miniature-layout {
120 @include grid-videos-miniature-margins;
cf78883c 121
cf78883c 122 @media screen and (min-width: $mobile-view) {
0f7407d9
C
123 .videos,
124 .playlists {
125 --miniatureMinWidth: #{$video-thumbnail-width - 25px};
33253c1a 126 --miniatureMaxWidth: #{$video-thumbnail-width};
cf78883c
C
127
128 display: grid;
0f7407d9 129 column-gap: 30px;
cf78883c
C
130 grid-template-columns: repeat(
131 auto-fill,
132 minmax(
33253c1a 133 var(--miniatureMinWidth),
cf78883c
C
134 1fr
135 )
136 );
137
0f7407d9
C
138 .video-wrapper,
139 .playlist-wrapper {
cf78883c
C
140 margin: 0 auto;
141 width: 100%;
c8487f3f 142
0f7407d9
C
143 my-video-miniature,
144 my-video-playlist-miniature {
cf78883c 145 display: block;
33253c1a
C
146 min-width: var(--miniatureMinWidth);
147 max-width: var(--miniatureMaxWidth);
cf78883c 148 }
e66883b3 149 }
0f7407d9
C
150
151 @media screen and (min-width: #{breakpoint(xm)}) {
152 column-gap: 15px;
153 }
154
155 @media screen and (min-width: #{breakpoint(fhd)}) {
156 column-gap: 2%;
157 }
158 }
159 }
c8487f3f 160}