Skip to content

Commit 965f91e

Browse files
authored
Global sticky footer (hestiacp#4146)
* Global sticky footer And refactor how system information is loaded. * Get version from session * Refactor logs view code, include app footer * Fix "Discard all mail" JS behavior in Edit Mail Account form * Refactor update icons
1 parent 160ef6e commit 965f91e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+378
-381
lines changed

docs/docs/server-administration/customisation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ We currently only support changing the layout via CSS. You can customise HTML fi
99
Create a new theme in `/usr/local/hestia/web/css/theme/custom/my_theme.css`
1010

1111
```css
12-
.body-login,
13-
.body-reset {
12+
.page-login,
13+
.page-reset {
1414
height: auto;
1515
padding-top: 10%;
1616
background: rgb(231, 102, 194) !important;

web/css/src/base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ body {
3131
font-family: var(--font-family);
3232
font-size: 0.85rem;
3333
line-height: 1.5;
34-
height: 100%;
3534
color: var(--color-text);
3635
background-color: var(--color-background);
36+
height: 100%;
3737
}
3838

3939
a {

web/css/src/themes/dark.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,8 @@
676676
/* Login
677677
========================================================================== */
678678

679-
.body-login,
680-
.body-reset {
679+
.page-login,
680+
.page-reset {
681681
background: radial-gradient(circle, rgb(77 77 77 / 100%) 0%, rgb(31 31 31 / 100%) 100%), #303030;
682682
}
683683

@@ -808,6 +808,10 @@
808808
border-color: #454545;
809809
}
810810

811+
.app-footer-link {
812+
color: #cdcdcd;
813+
}
814+
811815
/* Inline alerts
812816
========================================================================== */
813817

web/css/src/themes/default.css

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,30 @@
5858
--chart-line-3-color: var(--icon-color-green);
5959
}
6060

61+
/* App
62+
========================================================================== */
63+
64+
.app {
65+
height: 100%;
66+
display: flex;
67+
flex-direction: column;
68+
}
69+
6170
/* App header
6271
========================================================================== */
6372

6473
.app-header {
74+
flex: none;
6575
padding-top: 40px;
6676
}
6777

78+
/* App content
79+
========================================================================== */
80+
81+
.app-content {
82+
flex: 1 0 auto;
83+
}
84+
6885
/* Container
6986
========================================================================== */
7087

@@ -994,7 +1011,6 @@
9941011
border-radius: 0;
9951012

9961013
&:last-child {
997-
border-bottom-color: transparent;
9981014
margin-bottom: 0;
9991015
}
10001016

@@ -1141,6 +1157,15 @@
11411157
}
11421158
}
11431159

1160+
.units-table-footer {
1161+
padding: 20px;
1162+
1163+
@media (--viewport-large) {
1164+
padding-left: 15px;
1165+
padding-right: 15px;
1166+
}
1167+
}
1168+
11441169
/* Cards
11451170
========================================================================== */
11461171

@@ -2104,17 +2129,20 @@
21042129
/* Login
21052130
========================================================================== */
21062131

2107-
.body-login,
2108-
.body-reset {
2109-
display: flex;
2110-
align-items: center;
2111-
justify-content: center;
2132+
.page-login,
2133+
.page-reset {
21122134
background: radial-gradient(circle, rgb(102 158 231 / 100%) 0%, rgb(43 86 177 / 100%) 100%),
21132135
rgb(102 158 231);
21142136

21152137
& .debug-panel {
21162138
display: none;
21172139
}
2140+
2141+
& .app {
2142+
align-items: center;
2143+
justify-content: center;
2144+
flex-direction: row;
2145+
}
21182146
}
21192147

21202148
.login {
@@ -2215,17 +2243,22 @@
22152243
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
22162244
}
22172245

2246+
.logs-container {
2247+
height: 100%;
2248+
padding: 20px;
2249+
overflow-y: auto;
2250+
max-height: calc(100vh - 40px - 40px);
2251+
2252+
@media (--viewport-medium) {
2253+
max-height: calc(100vh - 40px - 60px);
2254+
}
2255+
}
2256+
22182257
.console-output {
22192258
color: #202020;
22202259
font-family: var(--font-family-monospace);
22212260
font-size: 0.92rem;
2222-
line-height: 1.15;
2223-
padding-bottom: 20px;
2224-
overflow-x: scroll;
2225-
2226-
@media (--viewport-medium) {
2227-
overflow-x: initial;
2228-
}
2261+
line-height: 1.2;
22292262
}
22302263

22312264
/* Icon component
@@ -2381,26 +2414,21 @@
23812414
========================================================================== */
23822415

23832416
.app-footer {
2417+
flex: none;
23842418
color: #7c7c7c;
23852419
border-top: 1px solid #ddd;
2420+
text-align: center;
23862421
font-size: 0.8rem;
2387-
padding-top: 20px;
2388-
padding-bottom: 20px;
2422+
padding: 10px;
23892423

23902424
@media (--viewport-medium) {
2391-
padding-top: 40px;
2392-
padding-bottom: 40px;
2425+
text-align: left;
2426+
padding: 20px;
23932427
}
23942428
}
23952429

2396-
.app-footer-inner {
2397-
padding-left: 20px;
2398-
padding-right: 20px;
2399-
2400-
@media (--viewport-large) {
2401-
padding-left: 15px;
2402-
padding-right: 15px;
2403-
}
2430+
.app-footer-link {
2431+
color: #7c7c7c;
24042432
}
24052433

24062434
/* Alerts

web/css/src/themes/flat.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@
177177
/* Login
178178
========================================================================== */
179179

180-
.body-login,
181-
.body-reset {
180+
.page-login,
181+
.page-reset {
182182
background: #5f7eb3;
183183
}
184184

web/css/src/themes/vestia.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ h1 {
429429
/* Login
430430
========================================================================== */
431431

432-
.body-login,
433-
.body-reset {
432+
.page-login,
433+
.page-reset {
434434
background: #ededed;
435435
}
436436

web/list/server/index.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
exit();
1111
}
1212

13+
function end_html() {
14+
echo "</pre>\n</div>\n</main>\n";
15+
include $_SERVER["DOCUMENT_ROOT"] . "/templates/includes/app-footer.php";
16+
echo "</div>\n";
17+
include $_SERVER["DOCUMENT_ROOT"] . "/templates/includes/jump-to-top-link.php";
18+
echo "</body>\n</html>\n";
19+
}
20+
1321
// CPU info
1422
if (isset($_GET["cpu"])) {
1523
$TAB = "CPU";
@@ -18,7 +26,7 @@
1826
foreach ($output as $file) {
1927
echo $file . "\n";
2028
}
21-
echo "</pre>\n</div>\n</body>\n</html>\n";
29+
end_html();
2230
exit();
2331
}
2432

@@ -30,7 +38,7 @@
3038
foreach ($output as $file) {
3139
echo $file . "\n";
3240
}
33-
echo "</pre>\n</div>\n</body>\n</html>\n";
41+
end_html();
3442
exit();
3543
}
3644

@@ -42,7 +50,7 @@
4250
foreach ($output as $file) {
4351
echo $file . "\n";
4452
}
45-
echo "</pre>\n</div>\n</body>\n</html>\n";
53+
end_html();
4654
exit();
4755
}
4856

@@ -54,7 +62,7 @@
5462
foreach ($output as $file) {
5563
echo $file . "\n";
5664
}
57-
echo "</pre>\n</div>\n</body>\n</html>\n";
65+
end_html();
5866
exit();
5967
}
6068

@@ -70,7 +78,7 @@
7078

7179
echo $file . "\n";
7280
}
73-
echo "</pre>\n</div>\n</body>\n</html>\n";
81+
end_html();
7482
exit();
7583
}
7684

@@ -82,7 +90,7 @@
8290
foreach ($output as $file) {
8391
echo $file . "\n";
8492
}
85-
echo "</pre>\n</div>\n</body>\n</html>\n";
93+
end_html();
8694
exit();
8795
}
8896

@@ -96,7 +104,7 @@
96104
echo $file . "\n";
97105
}
98106
}
99-
echo "</pre>\n</div>\n</body>\n</html>\n";
107+
end_html();
100108
exit();
101109
}
102110

@@ -110,7 +118,7 @@
110118
echo $file . "\n";
111119
}
112120
}
113-
echo "</pre>\n</div>\n</body>\n</html>\n";
121+
end_html();
114122
exit();
115123
}
116124

web/list/web-log/index.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@
2323
echo htmlentities($file) . "\n";
2424
}
2525
}
26-
echo "</pre>\n</body>\n</html>\n";
26+
27+
echo "</pre>\n</div>\n</main>\n";
28+
include $_SERVER["DOCUMENT_ROOT"] . "/templates/includes/app-footer.php";
29+
echo "</div>\n";
30+
include $_SERVER["DOCUMENT_ROOT"] . "/templates/includes/jump-to-top-link.php";
31+
echo "</body>\n</html>\n";

web/src/app/WebApp/Installers/Opencart/OpencartSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class OpencartSetup extends BaseSetup {
88
protected $appInfo = [
9-
"name" => "Opencart",
9+
"name" => "OpenCart",
1010
"group" => "ecommerce",
1111
"enabled" => true,
1212
"version" => "4.0.2.2",

web/src/app/WebApp/Installers/Prestashop/PrestashopSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class PrestashopSetup extends BaseSetup {
88
protected $appInfo = [
9-
"name" => "Prestashop",
9+
"name" => "PrestaShop",
1010
"group" => "ecommerce",
1111
"enabled" => true,
1212
"version" => "8.1.0",

0 commit comments

Comments
 (0)