Skip to content

Commit

Permalink
Change hamburger menu icon to angle icons
Browse files Browse the repository at this point in the history
Signed-off-by: Christian König <ckoenig@posteo.de>
  • Loading branch information
yubiuser committed Aug 12, 2022
1 parent aa17619 commit b1d35e1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scripts/pi-hole/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ function updateSummaryData(runOnce) {
};

$.getJSON("api.php?summaryRaw", function (data) {

if ("FTLnotrunning" in data) {
data.dns_queries_today = "Lost";
data.ads_blocked_today = "connection";
Expand Down Expand Up @@ -1210,3 +1209,8 @@ $(function () {
window.addEventListener("resize", function () {
$(".chartjs-tooltip").remove();
});

// change sidebar icon on collapse/expand
$(".sidebar-toggle-svg").click(function () {
$(this).find("svg").toggleClass("fa-angle-double-left fa-angle-double-right");
});
2 changes: 1 addition & 1 deletion scripts/pi-hole/php/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function getTemperature()
<nav class="navbar navbar-static-top">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle-svg" data-toggle="push-menu" role="button">
<i aria-hidden="true" class="fa fa-bars"></i>
<i aria-hidden="true" class="fa fa-angle-double-left"></i>
<span class="sr-only">Toggle navigation</span>
<span class="warning-count hidden" id="top-warning-count"></span>
</a>
Expand Down
7 changes: 7 additions & 0 deletions style/pi-hole.css
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,13 @@ li:not(.menu-open) .treeview-menu .warning-count {
}
}

/* reverse side menu collapse arrows on mobile screens */
@media (max-width: 767px) {
.sidebar-toggle-svg {
transform: scaleX(-1);
}
}

.icon-bounce {
display: inline-block;
position: relative;
Expand Down

0 comments on commit b1d35e1

Please sign in to comment.