Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for #142 #143

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion classes/service.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,20 @@ public function render(){
}

// Render the service status
echo '<div>';
echo '<li class="list-group-item sub-component"><strong>' . $this->name .'</strong>';
//echo '<li class="list-group-item d-flex flex-columns justify-content-between><span>+</span><h3 class="py-2 my-0 flex-fill expanded">' . $this->name . '</h3>';
if(!empty($this->description)) {
echo '<a class="desc-tool-tip" data-toggle="tooltip" data-placement="top" title="'.$this->description.'"> <span><i class="glyphicon glyphicon-question-sign"></i></span></a>';
}
if ($this->status!=-1){?><div class="status pull-right <?php echo $classes[$this->status];?>"><?php echo _($statuses[$this->status]);?></div>
if ($this->status!=-1){?><div class="status <?php echo $classes[$this->status];?>"><?php echo _($statuses[$this->status]);?></div>
<?php
}
echo '</li>';
if ( isset($boolFinish) && $boolFinish) {
echo '</ul>';
}
echo '</div>';
}

public function jsonSerialize() {
Expand Down
7 changes: 7 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ div.center {
font-family: 'Fira Sans', sans-serif;
}

body.admin .status{
box-sizing: border-box;
padding: 15px 35px;
font-size: 1.1em;
font-family: 'Fira Sans', sans-serif;
}

body a h1{
font-size: 1.3em;
margin: 0;
Expand Down
21 changes: 11 additions & 10 deletions template.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function render_header($page_name, $admin = false){
if ( 'admin' == $str_url ) {
$strSubsMenu = '';
} else {
if (SUBSCRIBE_EMAIL || SUBSCRIBE_TELEGRAM ) {
if ($SUBSCRIBE_EMAIL || $SUBSCRIBE_TELEGRAM ) {
// Subscriber menu is to be shown...
$strSubsMenu = '<ul class="nav navbar-nav mr-auto">';
// If subscriber is not logged on, display subscriber menus
Expand All @@ -35,11 +35,11 @@ public static function render_header($page_name, $admin = false){
<a class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"><span class="glyphicon glyphicon-th"></span>&nbsp;'. _('Subscribe').'</a>
<ul class="dropdown-menu ">';

if ( SUBSCRIBE_EMAIL ) {
if ( $SUBSCRIBE_EMAIL ) {
$strSubsMenu .= '<li><a href="?do=email_subscription&amp;new=1"><span class="glyphicon glyphicon-envelope"></span>&nbsp;'._('Subscribe via email').'</a></li>';
}
if ( SUBSCRIBE_TELEGRAM ) {
$strSubsMenu .= '<li><a href="#"><script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="'.TG_BOT_USERNAME.'" data-size="small" data-userpic="false" data-auth-url="'.WEB_URL.'/telegram_check.php" data-request-access="write"></script></a></li>';
if ( $SUBSCRIBE_TELEGRAM ) {
$strSubsMenu .= '<li><a href="#"><script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="'.$TG_BOT_USERNAME.'" data-size="small" data-userpic="false" data-auth-url="'.WEB_URL.'/telegram_check.php" data-request-access="write"></script></a></li>';
}
$strSubsMenu .= '</ul>';
}
Expand All @@ -56,9 +56,10 @@ public static function render_header($page_name, $admin = false){
<html lang="en">
<head>
<?php
if(!admin){
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
$head_additionalcode = fread($versionfile,filesize("head.txt"));
if(!$admin){
$headpath = $_SERVER['DOCUMENT_ROOT'] . "/head.txt";
$headfile = fopen("$headpath", "r") or die("Unable to open head.txt!");
$head_additionalcode = fread($headfile,filesize($headpath));
fclose($headfile);
echo $head_additionalcode;
}
Expand Down Expand Up @@ -207,15 +208,15 @@ public static function render_footer($admin = false)
<div class="col-md-4 text-left"><a href="https://github.com/server-status-project/server-status/graphs/contributors" target="_blank">Copyright © <?php echo date("Y");?> Server Status Project Contributors </a><?php if(strlen(COPYRIGHT_TEXT)>1){ echo " and ".COPYRIGHT_TEXT; } ?></div>
<div class="col-md-4 text-center">
<div class="btn-group dropup">
<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>
<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>
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only"><?php echo _("Toggle Dropdown");?></span>
</button>
<div class="dropdown-menu">
<?php
foreach ($lang_names as $key => $value) {
echo '<a href="?lang='.$key.'"><img src="'.WEB_URL.'/locale/'.$key.'/flag.png" alt="'.$value.'">'.$value.'</a>';
echo '<a href="?lang='.$key.'"><img src="'.$WEB_URL.'/locale/'.$key.'/flag.png" alt="'.$value.'">'.$value.'</a>';
}
?>
<hr role="separator" class="divider">
Expand All @@ -237,7 +238,7 @@ public static function render_footer($admin = false)
<?php }?>
<script src="<?php echo WEB_URL;?>/js/vendor/bootstrap.min.js"></script>
<script src="<?php echo WEB_URL;?>/js/main.js"></script>
<?php if ( GOOGLE_RECAPTCHA ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
<?php if ( $GOOGLE_RECAPTCHA ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
</body>
</html>
<?php
Expand Down