]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/include/_miniature.scss
Improve abstract videos list
[github/Chocobozzz/PeerTube.git] / client / src / sass / include / _miniature.scss
CommitLineData
830b4faf
C
1@import '_variables';
2@import '_mixins';
3
4@mixin miniature-name {
5 @include ellipsis-multiline(
6 $font-size: 1rem,
7 $line-height: 1,
8 $lines-to-show: 2
9 );
10 transition: color 0.2s;
11 font-size: 16px;
12 font-weight: $font-semibold;
13 color: var(--mainForegroundColor);
14 margin-top: 5px;
15 margin-bottom: 5px;
16
17 &:hover {
18 text-decoration: none;
19 }
20
21 &.blur-filter {
22 filter: blur(3px);
23 padding-left: 4px;
24 }
25}
26
27$play-overlay-transition: 0.2s ease;
28$play-overlay-height: 26px;
29$play-overlay-width: 18px;
30
e2f01c47 31@mixin miniature-thumbnail {
830b4faf
C
32 @include disable-outline;
33
34 display: inline-block;
35 position: relative;
36 border-radius: 3px;
37 overflow: hidden;
e2f01c47
C
38 width: $video-thumbnail-width;
39 height: $video-thumbnail-height;
830b4faf
C
40 background-color: #ececec;
41 transition: filter $play-overlay-transition;
42
43 .play-overlay {
44 position: absolute;
45 right: 0;
46 bottom: 0;
47
c5a1ae50
C
48 width: inherit;
49 height: inherit;
830b4faf
C
50 opacity: 0;
51 background-color: rgba(0, 0, 0, 0.7);
52
53 &, .icon {
54 transition: all $play-overlay-transition;
55 }
56
57 .icon {
58 width: 0;
59 height: 0;
60
61 position: absolute;
62 left: 50%;
63 top: 50%;
64 transform: translate(-50%, -50%) scale(0.5);
65
66 border-top: ($play-overlay-height / 2) solid transparent;
67 border-bottom: ($play-overlay-height / 2) solid transparent;
68
69 border-left: $play-overlay-width solid rgba(255, 255, 255, 0.95);
70 }
71 }
72
73 &:hover {
74 text-decoration: none !important;
75
76 .play-overlay {
77 opacity: 1;
78
79 .icon {
80 transform: translate(-50%, -50%) scale(1);
81 }
82 }
83 }
84
85 &.focus-visible {
86 box-shadow: 0 0 0 2px var(--mainColor);
87 }
88
89 img {
c5a1ae50
C
90 width: inherit;
91 height: inherit;
830b4faf
C
92
93 &.blur-filter {
94 filter: blur(5px);
95 transform : scale(1.03);
96 }
97 }
98}
99
e2f01c47
C
100@mixin thumbnail-size-component ($width, $height) {
101 /deep/ .video-thumbnail {
102 width: $width;
103 height: $height;
104 }
105}
106
830b4faf
C
107@mixin static-thumbnail-overlay {
108 display: inline-block;
109 background-color: rgba(0, 0, 0, 0.7);
110 color: #fff;
111}
112
113@mixin video-miniature-small-screen {
114 text-align: center;
115
116 /deep/ .video-miniature {
117 padding-right: 0;
118 height: auto;
119 width: 100%;
120 margin-bottom: 20px;
121
122 .video-miniature-information {
123 width: 100% !important;
11dd0c2e 124 text-align: left;
830b4faf
C
125
126 span {
127 width: 100%;
128 }
129 }
130
131 .video-thumbnail {
11dd0c2e 132 width: calc(100% + 30px);
830b4faf 133 height: auto;
11dd0c2e 134 margin: 0 -15px;
830b4faf
C
135
136 img {
137 width: 100%;
138 height: auto;
139 }
140 }
141 }
142}