]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/menu/menu.component.scss
Fix scroll menu on touch devices
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / menu.component.scss
CommitLineData
63c4db6d
C
1@import '_variables';
2@import '_mixins';
3
8afc19a6
C
4.menu-wrapper {
5 position: fixed;
6 height: calc(100vh - #{$header-height});
7 padding: 0;
8 width: $menu-width;
8ff3f883 9 z-index: 10000;
8afc19a6
C
10}
11
b33f657c 12menu {
ef80c66c
C
13 @include ellipsis;
14
1d9d9cfd 15 background-color: var(--menuBackgroundColor);
b33f657c
C
16 margin: 0;
17 padding: 0;
18 height: 100%;
606793b9 19 overflow-x: hidden;
1d9d9cfd 20 color: var(--menuForegroundColor);
8afc19a6
C
21 display: flex;
22 flex-direction: column;
46ae6f67 23 width: 100%;
8afc19a6 24
a54991da
RK
25 &:focus, &:hover {
26 overflow-y: auto;
27 }
28
a55052c9
C
29 &.logged-in {
30 .panel-block {
31 margin-bottom: 25px;
32 }
33
34 .block-title {
35 margin-bottom: 15px;
36 }
37 }
38
66467298
RK
39 .top-menu {
40 flex-grow: 1;
c13e2bf3 41 width: $menu-width;
66467298
RK
42 }
43
b33f657c
C
44 .logged-in-block {
45 height: 100px;
46 background-color: rgba(255, 255, 255, 0.15);
47 display: flex;
48 align-items: center;
49 justify-content: center;
a55052c9 50 margin-bottom: 20px;
b33f657c
C
51
52 .logged-in-info {
ef80c66c
C
53 @include ellipsis;
54
b33f657c 55 flex-grow: 1;
b33f657c 56
b7a7e801 57 .logged-in-display-name {
b33f657c
C
58 font-size: 16px;
59 font-weight: $font-semibold;
1d9d9cfd 60 color: var(--menuForegroundColor);
c30745f3
C
61 cursor: pointer;
62
63 @include disable-default-a-behaviour;
b33f657c
C
64 }
65
b7a7e801 66 .logged-in-username {
ef80c66c
C
67 @include ellipsis;
68
b33f657c
C
69 font-size: 13px;
70 color: #C6C6C6;
cadb46d8 71 max-width: 140px;
223b24e6 72 cursor: pointer;
b33f657c
C
73 }
74 }
75
76 .logged-in-more {
77 margin-right: 20px;
78
e5b432e0 79 my-global-icon.dropdown-toggle {
b33f657c 80 cursor: pointer;
63347a0f
C
81
82 &::after {
83 border: none;
84 }
e5b432e0 85
03652b31 86 ::ng-deep {
e5b432e0
C
87 @include apply-svg-color(var(--menuForegroundColor));
88 }
b33f657c 89 }
a55052c9
C
90
91 .dropdown-item {
92 @include dropdown-with-icon-item;
93
94 my-global-icon {
a55052c9
C
95 width: 22px;
96 height: 22px;
97
98 &[iconName="sign-out"] {
99 position: relative;
100 right: -1px;
101 height: 21px;
102 width: 21px;
103 }
104 }
105 }
b33f657c
C
106 }
107 }
108
109 .button-block {
110 margin: 30px 25px 35px 25px;
111
9bce8112
C
112 .login-button {
113 @include peertube-button-link;
114 @include orange-button;
115
c30745f3 116 display: block;
9bce8112
C
117 width: 100%;
118 margin-bottom: 10px;
119 }
c30745f3 120
9bce8112
C
121 .create-account-button {
122 @include peertube-button-link;
b33f657c 123
9bce8112
C
124 display: block;
125 width: 100%;
126
127 color: #fff;
128 background-color: rgba(255, 255, 255, 0.25);
b33f657c 129
9bce8112
C
130 &:hover {
131 background-color: rgba(255, 255, 255, 0.28);
b33f657c
C
132 }
133 }
134 }
135
136 .block-title {
137 text-transform: uppercase;
138 font-weight: $font-bold; // Bold
139 font-size: 13px;
140 margin-bottom: 25px;
829be6e8 141 margin-left: 26px;
b33f657c
C
142 }
143
144 .panel-block {
145 margin-bottom: 45px;
b33f657c
C
146
147 a {
24e0d900
C
148 @include disable-default-a-behaviour;
149
b33f657c 150 display: flex;
829be6e8 151 align-items: center;
35c29307 152 padding-left: $menu-lateral-padding;
1d9d9cfd 153 color: var(--menuForegroundColor);
c30745f3 154 cursor: pointer;
24e0d900 155 min-height: 40px;
c30745f3 156 font-size: 16px;
829be6e8 157 transition: background-color .1s ease-in-out;
24e0d900
C
158 white-space: normal;
159 word-break: break-word;
160 padding-right: 20px;
b33f657c 161
e6d5a4f1 162 &.active {
829be6e8
CL
163 background-color: rgba(255, 255, 255, 0.15);
164 }
165
e6d5a4f1
C
166 &:hover, &.focus-visible {
167 background-color: rgba(255, 255, 255, 0.10);
168 }
169
a55052c9
C
170 my-global-icon {
171 @include apply-svg-color(#808080);
0727cab0 172
a55052c9
C
173 display: flex;
174 width: 22px;
175 height: 22px;
b33f657c 176 margin-right: 18px;
b33f657c 177
a55052c9
C
178 &[iconName="playlists"] {
179 height: 24px;
180 width: 24px;
b33f657c 181
a55052c9 182 margin-right: 16px;
b33f657c
C
183 }
184
a55052c9 185 &[iconName="videos"] {
066e94c5 186 position: relative;
a55052c9 187 right: -1px;
b33f657c 188 }
a55052c9 189 }
36f9424f 190
a55052c9
C
191 .icon {
192 @include icon(22px);
36f9424f 193
a55052c9 194 margin-right: 18px;
b33f657c
C
195 }
196 }
197 }
8afc19a6
C
198
199 .footer {
9a0fc840 200 padding-bottom: 15px;
35c29307
RK
201 padding-left: $menu-lateral-padding;
202 padding-right: $menu-lateral-padding;
c13e2bf3 203 width: $menu-width;
8afc19a6 204
4a216666 205 .language, .shortcuts, .color-palette {
8afc19a6
C
206 display: inline-block;
207 color: $menu-bottom-color;
208 cursor: pointer;
209 font-size: 12px;
210 font-weight: $font-semibold;
211
212 .icon {
e78980eb 213 @include disable-outline;
8afc19a6
C
214 @include icon(28px);
215 opacity: 0.9;
216
217 &.icon-language {
218 position: relative;
219 top: -1px;
220 width: 28px;
221 height: 24px;
222
223 background-image: url('../../assets/images/menu/language.png');
224 }
225
4a216666
RK
226 &.icon-shortcuts {
227 position: relative;
228 top: -1px;
229 width: 24px;
230 height: 24px;
231
232 background-image: url('../../assets/images/menu/keyboard.png');
4a216666
RK
233 filter: invert(100%);
234 }
235
9a0fc840
RK
236 &.icon-moonsun {
237 margin-left: 10px;
238 position: relative;
239 top: -1px;
240 width: 24px;
241 height: 24px;
242
243 background-image: url('../../assets/images/menu/moonsun.svg');
244 }
245
8afc19a6
C
246 &:hover {
247 opacity: 1;
248 }
249 }
250 }
251 }
b33f657c 252}
46ae6f67 253
fdebd9a3 254@media screen and (max-width: $mobile-view) {
46ae6f67
C
255 .menu-wrapper {
256 width: 100% !important;
46ae6f67
C
257 }
258
c13e2bf3
RK
259 .top-menu, .footer {
260 width: 100% !important;
46ae6f67
C
261 }
262}
c06be129
C
263
264@media (hover: none) and (pointer: coarse) {
265 .menu-wrapper {
266 menu {
267 overflow-y: auto;
268 }
269 }
270}