Skip to content

Commit

Permalink
Upgrade: Align the icons again properly on Moodle 4.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Aug 22, 2024
1 parent 11eebfd commit c8805fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2024-08-22 - Upgrade: Align the icons again properly on Moodle 4.4.
* 2024-08-20 - Prepare compatibility for Moodle 4.4.

### v4.3-r2
Expand Down
4 changes: 3 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ function local_navbarplus_render_navbar_output() {
$linkattributes['target'] = '_blank';
$linkattributes['rel'] = 'noopener noreferrer';
}
// Set classes.
$linkattributes = ['class' => 'nav-link position-relative icon-no-margin'];
// Define classes for all icons.
$itemclasses = 'localnavbarplus nav-link';
$itemclasses = 'localnavbarplus';
// Add optional individual classes.
if (!empty($itemadditionalclasses)) {
$itemclasses .= ' ' . $itemadditionalclasses;
Expand Down
21 changes: 1 addition & 20 deletions styles.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
/* Float the icons left to be placed next to the existing icons "messages" and "notifications". */
.navbar .localnavbarplus.nav-link {
float: left;
}

/* Remove the right margin from each but the last icon to achieve the same margins for moodle and navbarplus icons. */
.navbar .localnavbarplus.nav-link .icon {
margin-right: 0;
}
.navbar .localnavbarplus.nav-link:last-child .icon {
margin-right: .5rem;
}

/* Do not display the icon if a user has disabled Javascript in his browser. */
/* Do not display the reset user tour icon if a user has disabled Javascript in his browser. */
body:not(.jsenabled) #localnavbarplus-resetusertour {
display: none;
}

/* Inherit the colors. */
.navbar .localnavbarplus a,
.navbar .localnavbarplus .icon {
color: inherit;
}

0 comments on commit c8805fd

Please sign in to comment.