Merge branch 'master' into develop
[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: 10px;
7
8 .video-miniature {
9   width: $video-miniature-width;
10   display: inline-flex;
11   flex-direction: column;
12   margin-bottom: 30px;
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       margin-right: $more-margin-right;
68       width: $more-button-width;
69       height: 30px;
70
71       /deep/ .dropdown-root:not(.show) {
72         opacity: 0;
73       }
74
75       /deep/ .playlist-dropdown.show + my-action-dropdown .dropdown-root {
76         opacity: 1;
77       }
78     }
79
80     &:hover .video-actions /deep/ .dropdown-root {
81       opacity: 1;
82     }
83
84     @media screen and (max-width: $small-view) {
85       .video-miniature-information .video-miniature-name {
86         margin-top: 0;
87       }
88
89       .video-actions {
90         margin: 0;
91         top: -3px;
92
93         /deep/ .dropdown-root {
94           opacity: 1 !important;
95         }
96       }
97     }
98   }
99
100   &.display-as-row {
101     flex-direction: row;
102     margin-bottom: 0;
103     height: auto;
104     width: 100%;
105
106     my-video-thumbnail {
107       margin-right: 10px;
108     }
109
110     .video-bottom {
111       .video-miniature-information {
112         width: auto;
113         min-width: 500px;
114
115         .video-miniature-name {
116           @include ellipsis-multiline(1.3em, 2);
117
118           margin-top: 2px;
119           margin-bottom: 5px;
120         }
121
122         .video-miniature-created-at-views,
123         .video-miniature-account,
124         .video-miniature-channel {
125           font-size: 14px;
126           width: fit-content;
127         }
128
129         .video-info-privacy {
130           margin-top: 5px;
131         }
132
133         .video-info-blacklisted {
134           margin-top: 3px;
135         }
136       }
137
138       .video-actions {
139         margin: 0;
140         top: -3px;
141       }
142     }
143
144     @media screen and (max-width: $small-view) {
145       flex-direction: column;
146       height: auto;
147
148       my-video-thumbnail {
149         margin-right: 0;
150       }
151
152       .video-miniature-information {
153         min-width: initial;
154       }
155     }
156   }
157 }