Skip to content

Commit

Permalink
Fix visual bugs
Browse files Browse the repository at this point in the history
- fix top circle position;
- fix circle background colors for each theme;
- special CSS for LCARS theme;
- change CSS selector for top navbar `<li>`: after removing the first
  item, the "old" second item became the first one.
- use a better color for all themes;
- hide submenu counter during animation;
- hide the other counter when submenu is opened (mobile too)

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
  • Loading branch information
rdwebdesign committed Apr 13, 2022
1 parent 2ee6afe commit 521ecd7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
4 changes: 1 addition & 3 deletions scripts/pi-hole/js/utils.js
Expand Up @@ -372,12 +372,10 @@ function checkMessages() {
? "There are " + data.message_count + " warnings." + more
: "There is one warning." + more;

$("#top-warning-count").prop("title", title);
$("#top-warning-count").removeClass("hidden");
$(".warning-count").prop("title", title);
$(".warning-count").text(data.message_count);
$(".warning-count").removeClass("hidden");
} else {
$("#top-warning-count").addClass("hidden");
$(".warning-count").addClass("hidden");
}
});
Expand Down
29 changes: 20 additions & 9 deletions style/pi-hole.css
Expand Up @@ -548,8 +548,7 @@ td.details-control {
}

/* hide warning icon only when logged in and menu is not collapsed */
.logged-in:not(.sidebar-collapse) #top-warning-count,
.menu-open > a > span.warning-count {
.logged-in:not(.sidebar-collapse) #top-warning-count {
display: none;
}
}
Expand All @@ -559,20 +558,19 @@ td.details-control {
position: absolute;
display: inline-block;
text-align: center;
background: rgba(127, 127, 127, 0.3);
color: #e08e0b;
background: #e08e0b;
color: #fff;
line-height: 1;
padding: 0.25em 0.5em;
margin: -0.7em 4px;
border-radius: 2em;
right: 3em;
top: 50%;
font-size: 12px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

#top-warning-count {
top: 50%;
top: 55%;
left: 50%;
right: unset;
margin: 0;
Expand All @@ -583,8 +581,21 @@ td.details-control {
font-size: 10px;
}

.menu-open > a > span.warning-count {
display: none;
}

/* hide submenu warning count during animation */
li:not(.menu-open) .treeview-menu .warning-count {
display: none;
}

/* hide warning count when hover a collapsed sidebar */
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu > li:hover > a > span.warning-count {
.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse
.sidebar-menu
> li:hover
> a
> span.warning-count {
display: none !important;
}

Expand Down Expand Up @@ -731,8 +742,8 @@ td.details-control {
background: #f60d1a;
}

.navbar-custom-menu > .navbar-nav > li:nth-child(2) {
padding: 0 5px;
.navbar-custom-menu > .navbar-nav > li:nth-child(1) {
padding: 0 10px 0 0;
}

#apiTokenIframe {
Expand Down
21 changes: 19 additions & 2 deletions style/themes/lcars.css
Expand Up @@ -559,8 +559,25 @@ p.login-box-msg,
font-size: 28px;
}

.icon-bounce {
animation: none;
.warning-count {
position: relative;
margin: 0;
padding: 0.2em 0.52em 0.3em;
right: 0;
top: 0;
background: #fa3;
color: #000;
}

.sidebar-menu li > a > .pull-right-container.warning-count {
transform: scale(1);
position: relative;
bottom: 0.15em;
}

#top-warning-count {
position: absolute;
top: 60%;
}

.dropdown.user.user-menu {
Expand Down

0 comments on commit 521ecd7

Please sign in to comment.