Skip to content

Commit f3aca0c

Browse files
authored
Merge pull request #117 from yigitkeremoktay/patch-4
Some Graphical Improvements
2 parents d9f0587 + 10b4854 commit f3aca0c

File tree

3 files changed

+51
-43
lines changed

3 files changed

+51
-43
lines changed

config.php.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ define("WHO_WE_ARE","##who_we_are##");
3434
define("POLICY_URL","##policy_url##");
3535
define("INSTALL_OVERRIDE", false);
3636
define("DEFAULT_LANGUAGE", "en_GB");
37+
define("CUSTOM_LOGO_URL",""); // This will use the default logo if left empty
38+
define("COPYRIGHT_TEXT",""); // Leave this empty if you don't want your copyright displayed
39+
// Without COPYRIGHT_TEXT Set
40+
// 2020 Server Status Project Contributors
41+
// With COPYRIGHT_TEXT Set
42+
// 2020 Server Status Project Contributors and COPYRIGHT_TEXT
3743
//Stop editing
3844
require("classes/locale-negotiator.php");
3945

css/main.css

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese');
22
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,700&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese');
33

4-
body {
5-
background: #ffffff;
6-
margin: 0;
7-
height: 100%;
8-
line-height: 24px;
9-
font-family: 'Open Sans', sans-serif;
4+
body {
5+
background: #ffffff;
6+
margin: 0;
7+
margin-top: 80px;
8+
height: 100%;
9+
line-height: 24px;
10+
font-family: 'Open Sans', sans-serif;
1011
}
1112

1213
img {
13-
height: auto;
14-
max-width: 100%;
14+
height: auto;
15+
max-width: 100%;
1516
}
1617

17-
a {
18-
padding: 0;
19-
margin: 0;
20-
text-decoration: none;
18+
a {
19+
padding: 0;
20+
margin: 0;
21+
text-decoration: none;
2122
}
2223

2324
a:hover,
2425
a:focus {
2526
text-decoration: none;
26-
color:#3566a8;
27+
color:#f5f4f4;
2728
}
2829

2930
.centered {
30-
text-align: center
31+
text-align: center
3132
}
3233

3334

3435
.navbar {
35-
padding-top: 5px;
36-
margin-bottom: 0px;
36+
padding-top: 5px;
37+
margin-bottom: 0px;
3738
}
3839

3940
.navbar-brand {
@@ -42,28 +43,32 @@ a:focus {
4243

4344

4445
.navbar-default .navbar-nav > li > a {
45-
color: #f5f4f4;
46-
font-size: 1em;
46+
color: #f5f4f4;
47+
font-size: 1em;
4748
}
4849

4950
.navbar-default .navbar-nav > li > a:hover {
50-
color: #a7a7a7;
51+
color: #a7a7a7;
5152
}
5253

5354
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
54-
color: #ffffff;
55-
background-color: transparent;
55+
color: #f5f4f4;
56+
background-color: transparent;
5657
}
5758
.navbar-collapse
5859
{
59-
background: #2f60a3;
60+
background: #2f60a3;
6061
}
6162
.navbar-default {
6263
z-index: 200;
63-
background-color: #2f60a3;
64+
background-color: gray;
6465
border-color: transparent;
65-
border-radius: 0px;
66+
border-radius: 0px 0px 30px 30px;
6667
height: 77px;
68+
overflow: hidden;
69+
position: fixed;
70+
top: 0;
71+
width: 100%;
6772
}
6873

6974

@@ -160,7 +165,7 @@ body a h1{
160165

161166
.navbar-header .btn
162167
{
163-
margin-top: 15px;
168+
margin-top: 15px;
164169
margin-right: 10px
165170
}
166171

@@ -243,11 +248,11 @@ body a h1{
243248
border-left-color: transparent;
244249
}
245250

246-
.timeline .panel .panel-heading.icon * {
251+
.timeline .panel .panel-heading.icon * {
247252
/*This shouldn't be relative in size...*/
248-
font-size: 20px;
249-
vertical-align: middle;
250-
line-height: 40px;
253+
font-size: 20px;
254+
vertical-align: middle;
255+
line-height: 40px;
251256
}
252257
.timeline .panel .panel-heading.icon {
253258
position: absolute;
@@ -296,10 +301,11 @@ body a h1{
296301

297302
/* Footer */
298303
#footerwrap {
304+
border-radius: 30px 30px 0px 0px;
299305
min-height: 60px;
300306
padding-top: 15px;
301307
padding-bottom: 10px;
302-
background: #2f60a3;
308+
background: gray;
303309
}
304310

305311
#footerwrap a{
@@ -564,7 +570,7 @@ i.danger{
564570
}
565571

566572
#footerwrap .dropdown-menu{
567-
background: #337ab7
573+
background: gray;
568574
}
569575

570576
#footerwrap .dropdown-menu a{
@@ -573,7 +579,7 @@ i.danger{
573579
padding: 2px 5px;
574580
display: block;
575581
transition: 125ms ease-in-out background-color;
576-
background-color: #337ab7
582+
background-color: gray;
577583
}
578584

579585
#footerwrap .dropdown-menu a:hover{
@@ -616,7 +622,3 @@ label.form-name
616622
{
617623
line-height: 20px
618624
}
619-
.panel .panel-footer .label
620-
{
621-
display: inline-block;
622-
}

template.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
//This should later be translatable, maybe find a better solution?
33
//This is here for better generation of POT files :)
44
$statuses = array(_("Major outage"), _("Minor outage"), _("Planned maintenance"), _("Operational") );
@@ -55,7 +55,7 @@ public static function render_header($page_name, $admin = false){
5555
<div class="navbar navbar-default" role="navigation">
5656
<div class="container">
5757
<div class="navbar-header">
58-
<a class="navbar-brand" href="<?php echo WEB_URL;?>"><img src="<?php echo WEB_URL;?>/img/logo_white.png" alt="logo" class="menu-logo" width="50" height="50"></a>
58+
<a class="navbar-brand" href="<?php echo WEB_URL;?>"><a class="navbar-brand" href="<?php echo WEB_URL;?>/admin"><img src="<?php if(strlen(CUSTOM_LOGO_URL)>1){ echo CUSTOM_LOGO_URL; } else { echo WEB_URL."/img/logo_white.png"; } ?>" alt="logo" class="menu-logo" style="height:50px;"></a>
5959
</div>
6060
<div class="navbar-left hidden-xs">
6161
<ul class="nav navbar-nav">
@@ -66,7 +66,7 @@ public static function render_header($page_name, $admin = false){
6666
</div>
6767
</div>
6868
<div id="wrapper" class="center">
69-
<?php
69+
<?php
7070
}else{
7171
global $user;
7272
?>
@@ -108,7 +108,7 @@ public static function render_header($page_name, $admin = false){
108108
<span class="icon-bar"></span>
109109
<span class="icon-bar"></span>
110110
</button>
111-
<a class="navbar-brand" href="<?php echo WEB_URL;?>/admin"><img src="<?php echo WEB_URL;?>/img/logo_white.png" alt="logo" class="menu-logo" width="50" height="50"></a>
111+
<a class="navbar-brand" href="<?php echo WEB_URL;?>/admin"><img src="<?php if(strlen(CUSTOM_LOGO_URL)>1){ echo CUSTOM_LOGO_URL; } else { echo WEB_URL."/img/logo_white.png"; } ?>" alt="logo" class="menu-logo" width="50" height="50"></a>
112112
</div>
113113
<div class="navbar-collapse collapse navbar-right navbar-admin">
114114
<ul class="nav navbar-nav">
@@ -121,7 +121,7 @@ public static function render_header($page_name, $admin = false){
121121
</div>
122122
</div>
123123
<div id="wrapper" class="center admin">
124-
<?php
124+
<?php
125125
}
126126
}
127127

@@ -138,7 +138,7 @@ public static function render_footer($admin = false)
138138
<div id="footerwrap">
139139
<div class="container">
140140
<div class="row centered">
141-
<div class="col-md-4 text-left"><a href="https://github.com/Pryx/server-status/" target="_blank"><i class="fab fa-github" aria-hidden="true"></i>&nbsp;</a>Copyright © <?php echo date("Y");?> Vojtěch Sajdl</div>
141+
<div class="col-md-4 text-left"><a href="https://github.com/Pryx/server-status/graphs/contributions" target="_blank">Copyright © <?php echo date("Y");?> Server Status Project Contributors </a><?php if(strlen(COPYRIGHT_TEXT)>1){ echo " and ".COPYRIGHT_TEXT; } ?></div>
142142
<div class="col-md-4 text-center">
143143
<div class="btn-group dropup">
144144
<button type="button" class="btn btn-primary"><?php echo '<img src="'.WEB_URL.'/locale/'.$_SESSION['locale'].'/flag.png" alt="'.$lang_names[$_SESSION['locale']].'">'.$lang_names[$_SESSION['locale']];?></button>
@@ -147,7 +147,7 @@ public static function render_footer($admin = false)
147147
<span class="sr-only"><?php echo _("Toggle Dropdown");?></span>
148148
</button>
149149
<div class="dropdown-menu">
150-
<?php
150+
<?php
151151
foreach ($lang_names as $key => $value) {
152152
echo '<a href="?lang='.$key.'"><img src="'.WEB_URL.'/locale/'.$key.'/flag.png" alt="'.$value.'">'.$value.'</a>';
153153
}

0 commit comments

Comments
 (0)