diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-10 09:11:17 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-01-10 09:11:32 +0100 |
commit | 927626cbaaa0da8be0800b6a635783aa3a8ac4ac (patch) | |
tree | 6dfa6feb67dbf06e7aaf709c4897ab1ca8111819 /core | |
parent | e18c0b2ac34a1ef37940a1e1f27c3a961232334d (diff) | |
download | nextcloud-server-927626cbaaa0da8be0800b6a635783aa3a8ac4ac.tar.gz nextcloud-server-927626cbaaa0da8be0800b6a635783aa3a8ac4ac.zip |
Fix appmenu svg double invert
This fixes a regression caused by 9b668d0, where the css filters to
preview color inversion of the app menu was applied by default. This
commit makes the css filters sensitive on what the current state of the
app menu is.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/layout.user.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 127e794e120..32762e2c240 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -41,19 +41,17 @@ </div> </a> - <ul id="appmenu"> + <ul id="appmenu" <?php if ($_['themingInvertMenu']) { ?>class="inverted"<?php } ?>> <?php foreach ($_['navigation'] as $entry): ?> <li data-id="<?php p($entry['id']); ?>" class="hidden"> <a href="<?php print_unescaped($entry['href']); ?>" <?php if ($entry['active']): ?> class="active"<?php endif; ?>> - <?php if ($_['themingInvertMenu']) { ?> <svg width="20" height="20" viewBox="0 0 20 20"> - <defs><filter id="invertMenuMain-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /></filter></defs> - <image x="0" y="0" width="20" height="20" preserveAspectRatio="xMinYMin meet" filter="url(#invertMenuMain-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon" /></svg> - <?php } else { ?> - <img src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" - class="app-icon" alt="<?php p($entry['name']); ?>" /> - <?php } ?> + <?php if ($_['themingInvertMenu']) { ?> + <defs><filter id="invertMenuMain-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /></filter></defs> + <?php } ?> + <image x="0" y="0" width="20" height="20" preserveAspectRatio="xMinYMin meet"<?php if ($_['themingInvertMenu']) { ?> filter="url(#invertMenuMain-<?php p($entry['id']); ?>)"<?php } ?> xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon" /> + </svg> <div class="icon-loading-small-dark" style="display:none;"></div> </a> |