mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Fix badge centering on info.php, set as right-of-center
Badges are now treated as zero-width and will not weigh down the centered header title.
This commit is contained in:
parent
a4708ee3f8
commit
39fbdeb0a2
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
/* header */
|
/* header */
|
||||||
.litebans-header {
|
.litebans-header {
|
||||||
text-align: center;
|
|
||||||
display: block;
|
display: block;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-lg-12 {
|
.col-lg-12 {
|
||||||
@ -24,6 +24,7 @@ table tr td {
|
|||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* table links */
|
/* table links */
|
||||||
@ -71,8 +72,13 @@ tr.hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* info.php */
|
/* info.php */
|
||||||
|
.litebans-info-badges {
|
||||||
|
width: 0;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
.litebans-label-info {
|
.litebans-label-info {
|
||||||
margin-left: 13px;
|
margin-left: 15px;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ class Page {
|
|||||||
echo "<tbody>";
|
echo "<tbody>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_header($container_start = true, $title = null) {
|
function print_header($container_start = true, $title = null, $class = "modal-header litebans-header") {
|
||||||
if ($title === null) {
|
if ($title === null) {
|
||||||
$title = $this->title;
|
$title = $this->title;
|
||||||
}
|
}
|
||||||
@ -431,9 +431,9 @@ class Page {
|
|||||||
echo '<div class="container">';
|
echo '<div class="container">';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<div class=\"row\"><div class=\"col-lg-12\"><h1 class=\"modal-header litebans-header\">$title</h1></div></div>";
|
echo "<div class=\"row\"><div class=\"col-lg-12\"><h1 class=\"$class\">$title</h1></div>";
|
||||||
if ($container_start) {
|
if ($container_start) {
|
||||||
echo '<div class="row"><div class="col-lg-12">';
|
echo '</div><div class="row"><div class="col-lg-12">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
info.php
11
info.php
@ -150,6 +150,7 @@ if ($st->execute(array($id))) {
|
|||||||
$page->print_title();
|
$page->print_title();
|
||||||
|
|
||||||
$header = $page->name;
|
$header = $page->name;
|
||||||
|
$badges = "";
|
||||||
|
|
||||||
if (!($info instanceof KickInfo)) {
|
if (!($info instanceof KickInfo)) {
|
||||||
$active = $page->active($row);
|
$active = $page->active($row);
|
||||||
@ -162,19 +163,19 @@ if ($st->execute(array($id))) {
|
|||||||
$idx = "generic.ipmute";
|
$idx = "generic.ipmute";
|
||||||
}
|
}
|
||||||
if ($idx !== null) {
|
if ($idx !== null) {
|
||||||
$header .= "<span class='badge badge-danger litebans-label-info'>" . $page->t($idx) . "</span>";
|
$badges .= "<span class='badge badge-danger litebans-label-info'>" . $page->t($idx) . "</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($active === true) {
|
if ($active === true) {
|
||||||
$header .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.active") . "</span>";
|
$badges .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.active") . "</span>";
|
||||||
if ($permanent) {
|
if ($permanent) {
|
||||||
$header .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.permanent") . "</span>";
|
$badges .= "<span class='badge badge-danger litebans-label-info'>" . $page->t("generic.permanent") . "</span>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$header .= "<span class='badge badge-warning litebans-label-info'>" . $page->t("generic.inactive") . "</span>";
|
$badges .= "<span class='badge badge-warning litebans-label-info'>" . $page->t("generic.inactive") . "</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$page->print_header(true, $header);
|
$page->print_header(true, $header . "<div class=\"litebans-info-badges\">$badges</div>");
|
||||||
|
|
||||||
$map = $info->basic_info($row, $player_name);
|
$map = $info->basic_info($row, $player_name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user