Customized Red Webpanel

Includes config option to add a new red themes webpanel, including
slight changes to the code to make the default template appear with a
better layout.
This commit is contained in:
Anthony 2016-05-27 13:18:35 +01:00
parent 3d9d9fe25f
commit 33c64e5e95
4 changed files with 80 additions and 17 deletions

View File

@ -26,13 +26,17 @@ define("MYSQL_PREFIX", "");
// header title // header title
define("HEADER_TITLE", "Welcome!"); define("HEADER_TITLE", "Welcome!");
// page styling
define("PAGE_STYLE", "0"); // 0 - Default | 1 - Red/Black
// setup multi styles here // setup multi styles here
$styles = array( $styles = array(
"Forwards", // 0 "Forwards", // 0
"Sideways", // 1 "Sideways", // 1
"W-Only", // 2 "W-Only", // 2
"Scroll", // 3 "Scroll", // 3
"400 Velocity" // 4 "400 Velocity", // 4
"Half-Sideways" // 5
); );
define("DEFAULT_STYLE", 0); // 0 - forwards define("DEFAULT_STYLE", 0); // 0 - forwards

View File

@ -129,8 +129,14 @@ $rr = isset($_REQUEST["rr"]);
</div> </div>
</nav> </nav>
<div class="jumbotron"> <div class="container-fluid">
<div class="container"> <div class="row-fluid">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading cam-heading center">
<?php echo(HOMEPAGE_TITLE);?> <strong>-</strong> Record Database
</div>
<div class="panel-body table-responsive">
<?php <?php
if(!isset($_REQUEST["map"]) && !$rr) if(!isset($_REQUEST["map"]) && !$rr)
{ {
@ -169,8 +175,6 @@ $rr = isset($_REQUEST["rr"]);
$first = true; $first = true;
echo("<p>Recent records:</p>");
while($row = $stmt->fetch()) while($row = $stmt->fetch())
{ {
if($first) if($first)
@ -202,7 +206,7 @@ $rr = isset($_REQUEST["rr"]);
<td><?php <td><?php
$steamid = SteamID::Parse($auth, SteamID::FORMAT_STEAMID3); $steamid = SteamID::Parse($auth, SteamID::FORMAT_STEAMID3);
echo("<a href=\"http://steamcommunity.com/profiles/" . $steamid->Format(SteamID::FORMAT_STEAMID64) . "/\">" . $auth . "</a>"); echo("<a href=\"http://steamcommunity.com/profiles/" . $steamid->Format(SteamID::FORMAT_STEAMID64) . "/\" target=\"_blank\">" . $auth . "</a>");
?></td> ?></td>
<td><?php echo($date); ?></td> <td><?php echo($date); ?></td>
@ -275,19 +279,19 @@ $rr = isset($_REQUEST["rr"]);
{ {
case 1: case 1:
{ {
echo("<i class=\"fa fa-trophy\"></i> #".$rank); echo("<i class=\"fa fa-trophy\" style=\"color:#C98910\"></i>");
break; break;
} }
case 2: case 2:
{ {
echo("<i class=\"fa fa-star\"></i> #".$rank); echo("<i class=\"fa fa-trophy\" style=\"color:#A8A8A8\"></i>");
break; break;
} }
case 3: case 3:
{ {
echo("<i class=\"fa fa-thumbs-up\"></i> #".$rank); echo("<i class=\"fa fa-trophy\" style=\"color:#965A38\"></i>");
break; break;
} }
@ -301,7 +305,7 @@ $rr = isset($_REQUEST["rr"]);
<td><?php echo($id); ?></td> <td><?php echo($id); ?></td>
<td><?php <td><?php
$steamid = SteamID::Parse($auth, SteamID::FORMAT_STEAMID3); $steamid = SteamID::Parse($auth, SteamID::FORMAT_STEAMID3);
echo("<a href=\"http://steamcommunity.com/profiles/" . $steamid->Format(SteamID::FORMAT_STEAMID64) . "/\">" . $auth . "</a>"); ?></td> echo("<a href=\"http://steamcommunity.com/profiles/" . $steamid->Format(SteamID::FORMAT_STEAMID64) . "/\" target=\"_blank\">" . $auth . "</a>"); ?></td>
<td><?php echo($name); ?></td> <td><?php echo($name); ?></td>
<td> <td>
@ -337,6 +341,11 @@ $rr = isset($_REQUEST["rr"]);
?> ?>
</div> </div>
</div> </div>
</div>
</div>
</div>
</div>
</body> </body>
<!-- load those lately because it makes the page load faster --> <!-- load those lately because it makes the page load faster -->
@ -344,7 +353,16 @@ $rr = isset($_REQUEST["rr"]);
<link rel="stylesheet" href="assets/css/ie10-viewport-bug-workaround.css"> <link rel="stylesheet" href="assets/css/ie10-viewport-bug-workaround.css">
<!-- Custom styles for this template, if we'll ever use it --> <!-- Custom styles for this template, if we'll ever use it -->
<link rel="stylesheet" href="timer.css"> <?php
if(PAGE_STYLE =='0')
{
echo('<link rel="stylesheet" href="timer.css">');
}
else
{
echo('<link rel="stylesheet" href="timer-red.css">');
}
?>
<!-- font awesome --> <!-- font awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

42
webserver/timer-red.css Normal file
View File

@ -0,0 +1,42 @@
/* Custom Red Style CSS */
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
background-color: #171C22;
padding-top: 75px;
padding-bottom: 20px;
}
th,td {
text-align:center;
}
.btn {
outline: none !important;
border: 0.25px solid #171C22;
padding:inherit;
}
select,select:focus,select:active {
background-color:#FFF;
outline:none;
border:none;
box-shadow:none;
}
.navbar-brand {
color: #fff !important;
}
.panel-default>.panel-heading {
background-color: #EA003D;
color: #fff;
}
.panel
{
border-color: #EA003D;
}
h1,h2 {
margin: 0 0 20px 0;
}
table
{
table-layout: fixed;
width: 100%;
}

View File

@ -1,6 +1,5 @@
/* Is this even needed for now? /* Default CSS Styling '*/
I'll just keep it there. '*/
body { body {
padding-top: 50px; padding-top: 75px;
padding-bottom: 20px; padding-bottom: 20px;
} }