mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
HTML cleanup, make header mobile-friendly
This commit is contained in:
parent
17f13948f0
commit
8bc3af57f9
@ -1,7 +1,3 @@
|
||||
body {
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
.noselect {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
|
@ -0,0 +1,3 @@
|
||||
<script src="includes/js/jquery.min.js"></script>
|
||||
<script src="includes/js/bootstrap.min.js"></script>
|
||||
<?php echo "</html>"; ?>
|
@ -1,7 +0,0 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="LiteBans">
|
||||
<link rel="shortcut icon" href="includes/img/minecraft.ico">
|
||||
<link href="includes/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="includes/css/custom.css" rel="stylesheet">
|
@ -3,24 +3,59 @@ namespace litebans;
|
||||
|
||||
require_once './includes/settings.php';
|
||||
$settings = new Settings(false);
|
||||
|
||||
function navbar($links) {
|
||||
echo '<ul class="nav navbar-nav">';
|
||||
foreach ($links as $page => $title) {
|
||||
$li = "li";
|
||||
if ((substr($_SERVER['SCRIPT_NAME'], -strlen($page))) === $page) {
|
||||
$li .= ' class="active"';
|
||||
}
|
||||
echo "<$li><a href=\"$page\">$title</a></li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="LiteBans">
|
||||
<link rel="shortcut icon" href="includes/img/minecraft.ico">
|
||||
<!-- CSS -->
|
||||
<link href="includes/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="includes/css/custom.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<header class="navbar navbar-default navbar-static-top" role="banner">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
|
||||
data-target="#litebans-navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?php echo $settings->name_link; ?>"><?php echo $settings->name; ?></a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="index.php">Home</a></li>
|
||||
<li><a href="bans.php">Bans</a></li>
|
||||
<li><a href="mutes.php">Mutes</a></li>
|
||||
<li><a href="warnings.php">Warnings</a></li>
|
||||
<li><a href="kicks.php">Kicks</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text" style="float: right; font-size:15px;">©
|
||||
<a href="https://www.spigotmc.org/resources/litebans.3715/" target="_blank">LiteBans</a>
|
||||
<nav id="litebans-navbar" class="collapse navbar-collapse">
|
||||
<?php
|
||||
navbar(array(
|
||||
"index.php" => "Home",
|
||||
"bans.php" => "Bans",
|
||||
"mutes.php" => "Mutes",
|
||||
"warnings.php" => "Warnings",
|
||||
"kicks.php" => "Kicks",
|
||||
));
|
||||
?>
|
||||
<div class="nav navbar-nav navbar-right">
|
||||
<a href="https://www.spigotmc.org/resources/litebans.3715/" class="navbar-text"
|
||||
target="_blank">© LiteBans</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<script src="includes/js/jquery.min.js"></script>
|
||||
<script src="includes/js/bootstrap.min.js"></script>
|
||||
</header>
|
||||
|
@ -7,7 +7,6 @@ use PDOException;
|
||||
class Page {
|
||||
public function __construct($name, $header = true) {
|
||||
if ($header) {
|
||||
require_once './includes/head.php';
|
||||
require_once './includes/header.php';
|
||||
}
|
||||
require_once './includes/settings.php';
|
||||
@ -329,9 +328,10 @@ class Page {
|
||||
if ($container_end) {
|
||||
echo "</div></div></div>";
|
||||
}
|
||||
include './includes/footer.php';
|
||||
$time = microtime(true) - $this->time;
|
||||
echo "<!-- Page generated in $time seconds. -->";
|
||||
|
||||
include_once './includes/footer.php';
|
||||
}
|
||||
|
||||
public function table_begin() {
|
||||
|
@ -1,8 +1,7 @@
|
||||
<?php
|
||||
namespace litebans;
|
||||
|
||||
include './includes/head.php';
|
||||
include './includes/header.php';
|
||||
include_once './includes/header.php';
|
||||
include_once './includes/settings.php';
|
||||
$settings = new Settings(false);
|
||||
?>
|
||||
@ -14,4 +13,4 @@ $settings = new Settings(false);
|
||||
<div style="text-align: center;"><p>Here is where our Bans, Mutes, Warnings, and Kicks are listed.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include './includes/footer.php'; ?>
|
||||
<?php include_once './includes/footer.php'; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user