Fix search results on mobile
[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: $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       margin-right: $more-margin-right;
68       width: $more-button-width;
69       height: 30px;
70
71       ::ng-deep .dropdown-root:not(.show) {
72         opacity: 0;
73       }
74
75       ::ng-deep .playlist-dropdown.show + my-action-dropdown .dropdown-root {
76         opacity: 1;
77       }
78     }
79
80     &:hover .video-actions ::ng-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         ::ng-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         @media screen and (min-width: $small-view) {
113           width: auto;
114           min-width: 500px;
115         }
116
117         .video-miniature-name {
118           @include ellipsis-multiline(1.3em, 2);
119
120           margin-top: 2px;
121           margin-bottom: 5px;
122         }
123
124         .video-miniature-created-at-views,
125         .video-miniature-account,
126         .video-miniature-channel {
127           font-size: 14px;
128           width: fit-content;
129         }
130
131         .video-info-privacy {
132           margin-top: 5px;
133         }
134
135         .video-info-blacklisted {
136           margin-top: 3px;
137         }
138       }
139
140       .video-actions {
141         margin: 0;
142         top: -3px;
143       }
144     }
145
146     @media screen and (max-width: $small-view) {
147       flex-direction: column;
148       height: auto;
149
150       my-video-thumbnail {
151         margin-right: 0;
152       }
153
154       .video-miniature-information {
155         min-width: initial;
156       }
157     }
158   }
159 }