Minor tweaks

* use the background-color property instead of the background shorthand
* add multiple classes with one `addClass` call
* rename `underline` to `text-underline`
* use the CSS class `pointer` instead of adding CSS via JS
* change `border-color: transparent` to `border: 0` in the navbar right dropdown image
* add image dimensions in the dropdown donate image
* remove the obsolete and unneeded `center` element from network.php
* remove commented out PHP code from header.php
* fix wrong `form-control` class used in buttons

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2020-05-11 16:08:09 +03:00
parent c2f3baf25e
commit 8db0957a28
6 changed files with 29 additions and 47 deletions

View File

@@ -53,11 +53,11 @@ $token = $_SESSION['token'];
<label>Background color: Last query from this device seen ...</label>
<table width="100%">
<tr class="text-center">
<td style="background: #e7ffde;" width="15%">just now</td>
<td style="background-image: linear-gradient(to right, #e7ffde 0%, #ffffdf 100%)" width="30%"><center>... to ...</center></td>
<td style="background: #ffffdf;" width="15%">24 hours ago</td>
<td style="background: #ffedd9;" width="20%">&gt; 24 hours ago</td>
<td style="background: #ffbfaa;" width="20%">Device does not use Pi-hole</td>
<td style="background-color: #e7ffde;" width="15%">just now</td>
<td style="background-image: linear-gradient(to right, #e7ffde 0%, #ffffdf 100%)" width="30%">... to ...</td>
<td style="background-color: #ffffdf;" width="15%">24 hours ago</td>
<td style="background-color: #ffedd9;" width="20%">&gt; 24 hours ago</td>
<td style="background-color: #ffbfaa;" width="20%">Device does not use Pi-hole</td>
</tr>
</table>
</div>

View File

@@ -283,8 +283,7 @@ $(document).ready(function () {
new_tab.focus();
}
});
$("td:eq(4)", row).addClass("underline");
$("td:eq(4)", row).addClass("pointer");
$("td:eq(4)", row).addClass("text-underline pointer");
}
// Substitute domain by "." if empty
@@ -447,7 +446,7 @@ $(document).ready(function () {
this.style.color = "";
}
);
api.$("td:eq(1)").css("cursor", "pointer");
api.$("td:eq(1)").addClass("pointer");
// Domain
api.$("td:eq(2)").click(function () {
if (autofilter()) {
@@ -471,7 +470,7 @@ $(document).ready(function () {
this.style.color = "";
}
);
api.$("td:eq(2)").css("cursor", "pointer");
api.$("td:eq(2)").addClass("pointer");
// Client
api.$("td:eq(3)").click(function () {
if (autofilter()) {
@@ -493,7 +492,7 @@ $(document).ready(function () {
this.style.color = "";
}
);
api.$("td:eq(3)").css("cursor", "pointer");
api.$("td:eq(3)").addClass("pointer");
}
});

View File

@@ -271,13 +271,13 @@ if($auth) {
</li>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<img src="img/logo.svg" class="user-image" style="border-radius: 0" alt="Pi-hole logo" width="25" height="25">
<img src="img/logo.svg" class="user-image" alt="Pi-hole logo" style="border-radius: 0" width="25" height="25">
<span class="hidden-xs">Pi-hole</span>
</a>
<ul class="dropdown-menu" style="right:0">
<!-- User image -->
<li class="user-header">
<img src="img/logo.svg" alt="User Image" style="border-color:transparent" width="90" height="90">
<img src="img/logo.svg" alt="Pi-hole Logo" style="border: 0" width="90" height="90">
<p>
Open Source Ad Blocker
<small>Designed For Raspberry Pi</small>
@@ -300,26 +300,10 @@ if($auth) {
</li>
<!-- Menu Footer -->
<li class="user-footer">
<!-- Version Infos -->
<?php /*
<div class="<?php if(!isset($core_commit) && !isset($web_commit)) { ?>hidden-md <?php } ?>hidden-lg">
<b>Pi-hole Version </b> <?php
echo $core_current;
if(isset($core_commit)) { echo "<br>(".$core_branch.", ".$core_commit.")"; }
if($core_update){ ?> <a class="alert-link lookatme btn-link" href="https://github.com/pi-hole/pi-hole/releases" rel="noopener" target="_blank" style="background:none">(Update available!)</a><?php } ?><br>
<b>Web Interface Version </b><?php
echo $web_current;
if(isset($web_commit)) { echo "<br>(".$web_branch.", ".$web_commit.")"; }
if($web_update){ ?> <a class="alert-link lookatme btn-link" href="https://github.com/pi-hole/AdminLTE/releases" rel="noopener" target="_blank" style="background:none">(Update available!)</a><?php } ?><br>
<b>FTL Version </b> <?php
echo $FTL_current;
if($FTL_update){ ?> <a class="alert-link lookatme btn-link" href="https://github.com/pi-hole/FTL/releases" rel="noopener" target="_blank" style="background:none">(Update available!)</a><?php } ?><br><br>
</div>
*/ ?>
<!-- PayPal -->
<div class="text-center">
<a href="https://pi-hole.net/donate/" rel="noopener" target="_blank" style="background:none">
<img src="img/donate.gif" alt="Donate">
<a href="https://pi-hole.net/donate/" rel="noopener" target="_blank">
<img src="img/donate.gif" alt="Donate" width="147" height="47">
</a>
</div>
</li>

View File

@@ -10,7 +10,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<div class="text-center">
<img src="img/logo.svg" alt="" style="width: <?php if ($boxedlayout) { ?>50%<?php } else { ?>30%<?php } ?>;">
<img src="img/logo.svg" alt="Pi-hole logo" style="width: <?php if ($boxedlayout) { ?>50%<?php } else { ?>30%<?php } ?>;">
</div>
<br>
@@ -26,7 +26,7 @@
<div class="panel-body">
<form action="" id="loginform" method="post">
<div class="form-group has-feedback <?php if ($wrongpassword) { ?>has-error<?php } ?> ">
<div class="form-group has-feedback <?php if ($wrongpassword) { ?>has-error<?php } ?>">
<input type="password" id="loginpw" name="pw" class="form-control" placeholder="Password" autofocus>
<span class="fa fa-key form-control-feedback"></span>
</div>

View File

@@ -1292,37 +1292,37 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
<div class="row">
<div class="col-md-4">
<?php if ($piHoleLogging) { ?>
<button type="button" class="btn btn-warning confirm-disablelogging-noflush form-control">Disable query logging</button>
<button type="button" class="btn btn-warning confirm-disablelogging-noflush btn-block">Disable query logging</button>
<?php } else { ?>
<form role="form" method="post">
<input type="hidden" name="action" value="Enable">
<input type="hidden" name="field" value="Logging">
<input type="hidden" name="token" value="<?php echo $token ?>">
<button type="submit" class="btn btn-success form-control">Enable query logging</button>
<button type="submit" class="btn btn-success btn-block">Enable query logging</button>
</form>
<?php } ?>
</div>
<p class="hidden-md hidden-lg"></p>
<div class="col-md-4">
<button type="button" class="btn btn-warning confirm-flusharp form-control">Flush network table</button>
<button type="button" class="btn btn-warning confirm-flusharp btn-block">Flush network table</button>
</div>
<p class="hidden-md hidden-lg"></p>
<div class="col-md-4">
<button type="button" class="btn btn-warning confirm-restartdns form-control">Restart DNS resolver</button>
<button type="button" class="btn btn-warning confirm-restartdns btn-block">Restart DNS resolver</button>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-4">
<button type="button" class="btn btn-danger confirm-flushlogs form-control">Flush logs</button>
<button type="button" class="btn btn-danger confirm-flushlogs btn-block">Flush logs</button>
</div>
<p class="hidden-md hidden-lg"></p>
<div class="col-md-4">
<button type="button" class="btn btn-danger confirm-poweroff form-control">Power off system</button>
<button type="button" class="btn btn-danger confirm-poweroff btn-block">Power off system</button>
</div>
<p class="hidden-md hidden-lg"></p>
<div class="col-md-4">
<button type="button" class="btn btn-danger confirm-reboot form-control">Restart system</button>
<button type="button" class="btn btn-danger confirm-reboot btn-block">Restart system</button>
</div>
</div>

View File

@@ -261,6 +261,10 @@
}
/* Utilities */
.text-underline {
text-decoration: underline;
}
.text-black {
color: #000 !important;
}
@@ -286,11 +290,10 @@
}
td.highlight {
background-color: yellow;
background-color: #ff0 !important;
}
code.breakall
{
code.breakall {
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
@@ -299,10 +302,6 @@ code.breakall
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
.underline {
text-decoration: underline;
}
.pointer {
cursor: pointer;
}
@@ -310,4 +309,4 @@ code.breakall
.bootstrap-select.bs-container.align-right {
left: unset !important;
right: 10px;
}
}