mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Refactor CSS
This commit is contained in:
parent
b51d269b30
commit
78cec5c94b
@ -158,11 +158,9 @@ try {
|
||||
|
||||
$page->set_info($page->type_info($type));
|
||||
|
||||
$style = 'style="font-size: 13px;"';
|
||||
|
||||
$label_type = $page->type;
|
||||
$label_name = Info::create($row, $page, $label_type)->name(); //ucfirst($label_type);
|
||||
$label = "<span $style class='label label-$label_type'>$label_name</span>";
|
||||
$label = "<span class='label litebans-label-history litebans-label-$label_type'>$label_name</span>";
|
||||
|
||||
$page->print_table_rows($row, array(
|
||||
$page->t("generic.type") => $label,
|
||||
|
@ -1,28 +1,50 @@
|
||||
.noselect {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
margin-bottom: 5px;
|
||||
margin-right: 5px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* header */
|
||||
|
||||
.col-lg-12 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* tables */
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table tr td {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
/* table links */
|
||||
a,
|
||||
a:hover,
|
||||
a:focus {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
tr.hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* pager */
|
||||
|
||||
.litebans-pager {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.litebans-pager-number {
|
||||
margin-top: 32px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.litebans-pager-left {
|
||||
float: left;
|
||||
}
|
||||
@ -39,29 +61,44 @@ table tr td {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* table links */
|
||||
a,
|
||||
a:hover,
|
||||
a:focus {
|
||||
text-decoration: none !important;
|
||||
/* index.php */
|
||||
.litebans-index {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tr.hover {
|
||||
cursor: pointer;
|
||||
/* info.php */
|
||||
.litebans-label-info {
|
||||
margin-left: 13px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.label-ban {
|
||||
/* history.php */
|
||||
.litebans-label-history {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.litebans-label-ban {
|
||||
background-color: darkred;
|
||||
}
|
||||
|
||||
.label-mute {
|
||||
.litebans-label-mute {
|
||||
background-color: dimgrey;
|
||||
}
|
||||
|
||||
.label-warn {
|
||||
.litebans-label-warn {
|
||||
background-color: darkorange;
|
||||
}
|
||||
|
||||
.label-kick {
|
||||
.litebans-label-kick {
|
||||
background-color: tomato;
|
||||
}
|
||||
|
||||
/* prevent mouse selection */
|
||||
.noselect {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
17
inc/page.php
17
inc/page.php
@ -404,20 +404,13 @@ class Page {
|
||||
$type = $this->type;
|
||||
echo "<tr>";
|
||||
foreach ($array as $header => $text) {
|
||||
$style = "";
|
||||
if ($header === $this->t("bans_reason") || $header === $this->t("mutes_reason") || $header === $this->t("warns_reason") || $header == $this->t("kicks_reason")) {
|
||||
$style = "style=\"width: 30%;\"";
|
||||
if ($text === "") {
|
||||
$text = "-";
|
||||
}
|
||||
}
|
||||
$a = "a";
|
||||
if ($header === $this->t("warnings.received")) {
|
||||
$icon = ($text !== "0") ? "glyphicon-ok" : "glyphicon-remove";
|
||||
$a .= " class=\"glyphicon $icon\" aria-hidden=true";
|
||||
$text = "";
|
||||
}
|
||||
echo "<td $style><$a href=\"info.php?type=$type&id=$id\">$text</a></td>";
|
||||
echo "<td><$a href=\"info.php?type=$type&id=$id\">$text</a></td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
@ -425,7 +418,7 @@ class Page {
|
||||
function table_print_headers($headers) {
|
||||
echo "<thead><tr>";
|
||||
foreach ($headers as $header) {
|
||||
echo "<th><div style=\"text-align: center;\">$header</div></th>";
|
||||
echo "<th>$header</th>";
|
||||
}
|
||||
echo "<tbody>";
|
||||
}
|
||||
@ -438,9 +431,9 @@ class Page {
|
||||
echo '<div class="container">';
|
||||
}
|
||||
|
||||
echo "<div class=\"row\"><div style=\"text-align: center;\" class=\"col-lg-12\"><h1 class=\"modal-header\">$title</h1></div></div>";
|
||||
echo "<div class=\"row\"><div class=\"col-lg-12\"><h1 class=\"modal-header\">$title</h1></div></div>";
|
||||
if ($container_start) {
|
||||
echo '<div class="row"><div style="text-align: center;" class="col-lg-12">';
|
||||
echo '<div class="row"><div class="col-lg-12">';
|
||||
}
|
||||
}
|
||||
|
||||
@ -493,7 +486,7 @@ class Page {
|
||||
if ($next_active) {
|
||||
$pager_next = "<a href=\"$page?page={$next}{$args}\">$pager_next</a>";
|
||||
}
|
||||
$pager_count = '<div style=\"margin-top: 32px;\"><div style=\"text-align: center; font-size:15px;\">' . $this->t("table.pager.number") . ' ' . $cur . '/' . $pages . '</div></div>';
|
||||
$pager_count = '<div><div class="litebans-pager-number">' . $this->t("table.pager.number") . ' ' . $cur . '/' . $pages . '</div></div>';
|
||||
echo "$pager_prev $pager_next $pager_count";
|
||||
}
|
||||
|
||||
|
@ -6,11 +6,11 @@ $page->print_title();
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="jumbotron">
|
||||
<div style="text-align: center;">
|
||||
<div class="litebans-index">
|
||||
<h2><?php echo str_replace("{server}", $page->settings->name, $page->t("index.welcome.main")); ?></h2>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;"><p><?php echo $page->t("index.welcome.sub"); ?></p></div>
|
||||
<div class="litebans-index"><p><?php echo $page->t("index.welcome.sub"); ?></p></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $page->print_footer(false); ?>
|
||||
|
9
info.php
9
info.php
@ -152,7 +152,6 @@ if ($st->execute(array($id))) {
|
||||
$header = $page->name;
|
||||
|
||||
if (!($info instanceof KickInfo)) {
|
||||
$style = 'style="margin-left: 13px; font-size: 16px;"';
|
||||
$active = $page->active($row);
|
||||
$ipban = $page->active($row, 'ipban');
|
||||
if ($ipban === true) {
|
||||
@ -163,16 +162,16 @@ if ($st->execute(array($id))) {
|
||||
$idx = "generic.ipmute";
|
||||
}
|
||||
if ($idx !== null) {
|
||||
$header .= "<span $style class='label label-danger'>" . $page->t($idx) . "</span>";
|
||||
$header .= "<span class='label label-danger litebans-label-info'>" . $page->t($idx) . "</span>";
|
||||
}
|
||||
}
|
||||
if ($active === true) {
|
||||
$header .= "<span $style class='label label-danger'>" . $page->t("generic.active") . "</span>";
|
||||
$header .= "<span class='label label-danger litebans-label-info'>" . $page->t("generic.active") . "</span>";
|
||||
if ($permanent) {
|
||||
$header .= "<span $style class='label label-danger'>" . $page->t("generic.permanent") . "</span>";
|
||||
$header .= "<span class='label label-danger litebans-label-info'>" . $page->t("generic.permanent") . "</span>";
|
||||
}
|
||||
} else {
|
||||
$header .= "<span $style class='label label-warning'>" . $page->t("generic.inactive") . "</span>";
|
||||
$header .= "<span class='label label-warning litebans-label-info'>" . $page->t("generic.inactive") . "</span>";
|
||||
}
|
||||
}
|
||||
$page->print_header(true, $header);
|
||||
|
Loading…
x
Reference in New Issue
Block a user