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