]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/video/video-miniature.component.scss
add keyboard navigation for video actions (#2854)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-miniature.component.scss
CommitLineData
63c4db6d
C
1@import '_variables';
2@import '_mixins';
830b4faf 3@import '_miniature';
63c4db6d 4
adcf9212 5$more-button-width: 40px;
5dfb7c1d 6$more-margin-right: 15px;
743f023c 7
501bc6c2 8.video-miniature {
e2409062
C
9 display: inline-flex;
10 flex-direction: column;
a7257b0e 11 padding-bottom: $video-miniature-margin-bottom;
e5fc7811 12 height: 195px;
0d7d2ad9 13 vertical-align: top;
501bc6c2 14
0f4905e1
C
15 .video-bottom {
16 display: flex;
501bc6c2 17
0f4905e1 18 .video-miniature-information {
743f023c 19 width: $video-miniature-width - $more-button-width - $more-margin-right;
0f4905e1 20 line-height: normal;
cf78883c
C
21
22 .avatar {
23 margin: 10px 10px 0 0;
24
25 img {
26 @include avatar(40px);
27 }
28 }
501bc6c2 29
0f4905e1
C
30 .video-miniature-name {
31 @include miniature-name;
32 }
00a44645 33
adcf9212
CC
34 .video-miniature-meta {
35 width: calc(100% + #{$more-button-width});
36 overflow: hidden;
37 }
38
0f4905e1
C
39 .video-miniature-created-at-views {
40 display: block;
cf78883c 41 font-size: 13px;
0f4905e1 42 }
03e12d7c 43
0f4905e1
C
44 .video-miniature-account,
45 .video-miniature-channel {
46 @include disable-default-a-behaviour;
47 @include ellipsis;
03e12d7c 48
0f4905e1 49 display: block;
cf78883c 50 font-size: 13px;
e66883b3 51 color: pvar(--greyForegroundColor);
0f4905e1
C
52
53 &:hover {
54 color: $grey-foreground-hover-color;
55 }
03e12d7c 56 }
e2409062 57
0f4905e1 58 .video-info-privacy,
5baee5fc 59 .video-info-blocked .blocked-label,
0f4905e1
C
60 .video-info-nsfw {
61 font-weight: $font-semibold;
62 }
e2409062 63
5baee5fc 64 .video-info-blocked {
0f4905e1 65 color: red;
e2409062 66
5baee5fc 67 .blocked-reason::before {
0f4905e1
C
68 content: ' - ';
69 }
e2409062 70 }
e2409062 71
0f4905e1
C
72 .video-info-nsfw {
73 color: red;
74 }
e2409062 75 }
3a0fb65c
C
76
77 .video-actions {
78 margin-top: 3px;
743f023c
C
79 width: $more-button-width;
80 height: 30px;
3a0fb65c 81
03652b31 82 ::ng-deep .dropdown-root:not(.show) {
2b3f1919 83 opacity: 0;
0f4905e1 84 }
3a0fb65c 85
03652b31 86 ::ng-deep .playlist-dropdown.show + my-action-dropdown .dropdown-root {
2b3f1919 87 opacity: 1;
0f4905e1 88 }
3a0fb65c 89
3fbba1d2
RK
90 ::ng-deep .more-icon {
91 opacity: .6;
92
93 &:hover {
94 opacity: 1;
95 }
96 }
3a0fb65c
C
97 }
98
99 @media screen and (max-width: $small-view) {
d056b019
C
100 .video-miniature-information {
101 margin: 0 10px;
3a0fb65c
C
102 }
103
0f4905e1
C
104 .video-actions {
105 margin: 0;
106 top: -3px;
107
03652b31 108 ::ng-deep .dropdown-root {
743f023c 109 opacity: 1 !important;
0f4905e1 110 }
3a0fb65c
C
111 }
112 }
113 }
114
3fbba1d2
RK
115 &:hover ::ng-deep .video-thumbnail .video-thumbnail-actions-overlay,
116 &:hover .video-bottom .video-actions ::ng-deep .dropdown-root {
117 opacity: 1;
118 }
119
e66883b3
RK
120 &.fit-width {
121 width: 100%;
122 height: unset;
a7257b0e 123 padding-bottom: $video-miniature-margin-bottom / 2;
e66883b3
RK
124
125 .video-bottom {
126 width: 100% !important;
127
128 .video-miniature-information {
adcf9212 129 width: calc(100% - #{$more-button-width}) !important;
e66883b3
RK
130 }
131 }
132
133 my-video-thumbnail {
134 @include large-screen-ratio($selector: '::ng-deep .video-thumbnail');
135 }
136 }
137
e2409062
C
138 &.display-as-row {
139 flex-direction: row;
a7257b0e 140 padding-bottom: 0;
e2409062 141 height: auto;
bf64ed41
RK
142 display: flex;
143 flex-grow: 1;
e2409062
C
144
145 my-video-thumbnail {
146 margin-right: 10px;
147 }
148
0f4905e1
C
149 .video-bottom {
150 .video-miniature-information {
dd570a34
C
151 @media screen and (min-width: $small-view) {
152 width: auto;
153 min-width: 500px;
154 }
0f4905e1
C
155
156 .video-miniature-name {
157 @include ellipsis-multiline(1.3em, 2);
158
159 margin-top: 2px;
160 margin-bottom: 5px;
161 }
162
163 .video-miniature-created-at-views,
164 .video-miniature-account,
165 .video-miniature-channel {
e66883b3 166 font-size: 95%;
0f4905e1
C
167 width: fit-content;
168 }
169
170 .video-info-privacy {
171 margin-top: 5px;
172 }
173
5baee5fc 174 .video-info-blocked {
0f4905e1
C
175 margin-top: 3px;
176 }
e2409062
C
177 }
178
0f4905e1
C
179 .video-actions {
180 margin: 0;
181 top: -3px;
e2409062
C
182 }
183 }
184
185 @media screen and (max-width: $small-view) {
186 flex-direction: column;
187 height: auto;
188
189 my-video-thumbnail {
190 margin-right: 0;
191 }
8dfceec4
C
192
193 .video-miniature-information {
194 min-width: initial;
195 }
e2409062 196 }
501bc6c2
C
197 }
198}