3988cc0556380d0135a1eb524a7aeb931e9c1962
[oweals/peertube.git] / client / src / app / shared / video / video-miniature.component.scss
1 @import '_variables';
2 @import '_mixins';
3 @import '_miniature';
4
5 $more-button-width: 41px;
6 $more-margin-right: 15px;
7
8 .video-miniature {
9   width: $video-miniature-width;
10   display: inline-flex;
11   flex-direction: column;
12   margin-bottom: $video-miniature-margin-bottom;
13   height: 195px;
14   vertical-align: top;
15
16   .video-bottom {
17     display: flex;
18
19     .video-miniature-information {
20       width: $video-miniature-width - $more-button-width - $more-margin-right;
21       line-height: normal;
22
23       .video-miniature-name {
24         @include miniature-name;
25       }
26
27       .video-miniature-created-at-views {
28         display: block;
29         font-size: 13px;
30       }
31
32       .video-miniature-account,
33       .video-miniature-channel {
34         @include disable-default-a-behaviour;
35         @include ellipsis;
36
37         display: block;
38         font-size: 13px;
39         color: $grey-foreground-color;
40
41         &:hover {
42           color: $grey-foreground-hover-color;
43         }
44       }
45
46       .video-info-privacy,
47       .video-info-blacklisted .blacklisted-label,
48       .video-info-nsfw {
49         font-weight: $font-semibold;
50       }
51
52       .video-info-blacklisted {
53         color: red;
54
55         .blacklisted-reason::before {
56           content: ' - ';
57         }
58       }
59
60       .video-info-nsfw {
61         color: red;
62       }
63     }
64
65     .video-actions {
66       margin-top: 3px;
67       width: $more-button-width;
68       height: 30px;
69
70       ::ng-deep .dropdown-root:not(.show) {
71         opacity: 0;
72       }
73
74       ::ng-deep .playlist-dropdown.show + my-action-dropdown .dropdown-root {
75         opacity: 1;
76       }
77     }
78
79     &:hover .video-actions ::ng-deep .dropdown-root {
80       opacity: 1;
81     }
82
83     @media screen and (max-width: $small-view) {
84       .video-miniature-information .video-miniature-name {
85         margin-top: 0;
86       }
87
88       .video-actions {
89         margin: 0;
90         top: -3px;
91
92         ::ng-deep .dropdown-root {
93           opacity: 1 !important;
94         }
95       }
96     }
97   }
98
99   &.display-as-row {
100     flex-direction: row;
101     margin-bottom: 0;
102     height: auto;
103     width: 100%;
104
105     my-video-thumbnail {
106       margin-right: 10px;
107     }
108
109     .video-bottom {
110       .video-miniature-information {
111         @media screen and (min-width: $small-view) {
112           width: auto;
113           min-width: 500px;
114         }
115
116         .video-miniature-name {
117           @include ellipsis-multiline(1.3em, 2);
118
119           margin-top: 2px;
120           margin-bottom: 5px;
121         }
122
123         .video-miniature-created-at-views,
124         .video-miniature-account,
125         .video-miniature-channel {
126           font-size: 14px;
127           width: fit-content;
128         }
129
130         .video-info-privacy {
131           margin-top: 5px;
132         }
133
134         .video-info-blacklisted {
135           margin-top: 3px;
136         }
137       }
138
139       .video-actions {
140         margin: 0;
141         top: -3px;
142       }
143     }
144
145     @media screen and (max-width: $small-view) {
146       flex-direction: column;
147       height: auto;
148
149       my-video-thumbnail {
150         margin-right: 0;
151       }
152
153       .video-miniature-information {
154         min-width: initial;
155       }
156     }
157   }
158 }