Skip to content

Commit 10552ba

Browse files
authored
Mobile refactoring (hestiacp#3106)
* Refactor toolbar sorting context menu * Refactor login pages on mobile * Reduce duplication of custom media queries
1 parent 7809ec7 commit 10552ba

36 files changed

+440
-383
lines changed

web/css/src/media_queries.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Custom media queries
2+
========================================================================== */
3+
4+
@custom-media --viewport-small (min-width: 480px);
5+
@custom-media --viewport-medium (min-width: 768px);
6+
@custom-media --viewport-large (min-width: 1024px);

web/css/src/themes/dark.css

Lines changed: 73 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Website: www.hestiacp.com
55
*/
66

7-
@custom-media --viewport-medium (min-width: 768px);
7+
@import url("../media_queries");
88

99
:root {
1010
--color-text: #cdcdcd;
@@ -238,68 +238,68 @@ strong {
238238
}
239239
}
240240

241-
.context-menu.sort-order {
242-
background-color: rgb(40 40 40 / 95%);
243-
box-shadow: 0 2px 16px 0 rgb(20 20 20 / 65%);
244-
border-radius: 4px;
245-
border: 1px solid rgb(90 90 90 / 100%);
246-
}
247-
248-
.context-menu li {
249-
border-bottom: 1px solid #454545;
250-
color: #dadada;
251-
}
241+
.toolbar-sorting-toggle {
242+
&:hover {
243+
color: #bcbcbc;
252244

253-
.context-menu.sort-order span.active {
254-
background-color: #454545 !important;
255-
color: #fff;
256-
background: linear-gradient(
257-
to bottom,
258-
rgb(15 15 15 / 60%) 0%,
259-
rgb(45 45 45 / 75%) 30%,
260-
rgb(60 60 60 / 100%) 95%
261-
);
262-
text-shadow: 0 1px rgb(0 0 0 / 80%);
245+
& b {
246+
color: #bcbcbc;
247+
}
248+
}
263249
}
264250

265-
.context-menu.sort-order span:hover {
266-
color: #fff;
267-
background: linear-gradient(
268-
to bottom,
269-
rgb(25 25 25 / 60%) 0%,
270-
rgb(55 55 55 / 75%) 30%,
271-
rgb(70 70 70 / 100%) 95%
272-
);
273-
text-shadow: 0 -1px 1px rgb(0 0 0 / 50%);
274-
box-shadow: inset 0 0 1px rgb(0 0 0 / 40%), inset -1px -1px 4px rgb(40 40 40 / 40%);
275-
}
251+
.toolbar-sorting-menu {
252+
background-color: rgb(40 40 40 / 95%);
253+
box-shadow: 0 2px 16px 0 rgb(20 20 20 / 65%);
254+
border-radius: 4px;
255+
border-color: rgb(90 90 90 / 100%);
276256

277-
.context-menu.sort-order span:active,
278-
.context-menu.sort-order span:focus {
279-
background: linear-gradient(
280-
to bottom,
281-
rgb(35 35 35 / 60%) 0%,
282-
rgb(65 65 65 / 75%) 30%,
283-
rgb(80 80 80 / 100%) 95%
284-
);
285-
color: #fff;
286-
text-shadow: 0 -1px 1px rgb(0 0 0 / 50%);
287-
box-shadow: inset 0 0 1px rgb(0 0 0 / 40%), inset -1px -1px 4px rgb(40 40 40 / 40%);
288-
}
257+
& li {
258+
border-bottom: 1px solid #454545;
259+
color: #dadada;
260+
}
289261

290-
.toolbar-right .sort-by:hover {
291-
color: #d4d4d4;
292-
}
262+
& span {
263+
&:hover {
264+
color: #fff;
265+
background: linear-gradient(
266+
to bottom,
267+
rgb(25 25 25 / 60%) 0%,
268+
rgb(55 55 55 / 75%) 30%,
269+
rgb(70 70 70 / 100%) 95%
270+
);
271+
text-shadow: 0 -1px 1px rgb(0 0 0 / 50%);
272+
box-shadow: inset 0 0 1px rgb(0 0 0 / 40%), inset -1px -1px 4px rgb(40 40 40 / 40%);
273+
}
293274

294-
.toolbar-right .sort-by:hover b {
295-
color: #d4d4d4;
296-
}
275+
&:active,
276+
&:focus {
277+
background: linear-gradient(
278+
to bottom,
279+
rgb(35 35 35 / 60%) 0%,
280+
rgb(65 65 65 / 75%) 30%,
281+
rgb(80 80 80 / 100%) 95%
282+
);
283+
color: #fff;
284+
text-shadow: 0 -1px 1px rgb(0 0 0 / 50%);
285+
box-shadow: inset 0 0 1px rgb(0 0 0 / 40%), inset -1px -1px 4px rgb(40 40 40 / 40%);
286+
}
297287

298-
.toolbar-right .toggle-all:hover {
299-
color: #d4d4d4;
288+
&.active {
289+
background-color: #454545 !important;
290+
color: #fff;
291+
background: linear-gradient(
292+
to bottom,
293+
rgb(15 15 15 / 60%) 0%,
294+
rgb(45 45 45 / 75%) 30%,
295+
rgb(60 60 60 / 100%) 95%
296+
);
297+
text-shadow: 0 1px rgb(0 0 0 / 80%);
298+
}
299+
}
300300
}
301301

302-
.toolbar-submit {
302+
.toolbar-input-submit {
303303
border-color: #454545;
304304
background-color: #424242;
305305
text-shadow: 1px 1px rgb(0 0 0 / 90%);
@@ -739,27 +739,36 @@ textarea:focus::placeholder {
739739
background: radial-gradient(circle, rgb(77 77 77 / 100%) 0%, rgb(31 31 31 / 100%) 100%);
740740
}
741741

742+
/* Login box
743+
========================================================================== */
744+
742745
.login {
743-
background-color: #282828;
744-
box-shadow: 0 8px 25px rgb(0 0 0 / 30%), inset 0 0 2px rgb(0 0 0 / 25%);
746+
& .error {
747+
color: #f864fa;
748+
}
749+
750+
@media (--viewport-small) {
751+
background-color: #282828;
752+
box-shadow: 0 8px 25px rgb(0 0 0 / 30%), inset 0 0 2px rgb(0 0 0 / 25%);
753+
754+
& .form-label {
755+
color: #fff;
756+
}
757+
}
745758
}
746759

747760
.login-title {
748761
color: #fff;
749762
}
750763

751-
.login .error {
752-
color: #f864fa;
753-
}
754-
755-
.login .label-link {
764+
.login-label-link {
756765
color: #eee;
757766
text-transform: initial;
758767
font-weight: 400;
759-
}
760768

761-
.login .label-link:hover {
762-
color: #ff3478;
769+
&:hover {
770+
color: #ff3478;
771+
}
763772
}
764773

765774
.form-title {

0 commit comments

Comments
 (0)