Merge pull request 'move the logo inside #nextcloud element (fix #278 #239) [NC26]' (#335) from bugfix/issue278-239 into develop

Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/335
This commit is contained in:
Simon Vieille
2024-02-20 21:17:39 +01:00
2 changed files with 7 additions and 4 deletions
+2 -4
View File
@@ -42,13 +42,11 @@
top: 49px; top: 49px;
} }
#side-menu.hide-opener .side-menu-header .side-menu-opener.side-menu-closer #side-menu.hide-opener .side-menu-header .side-menu-opener.side-menu-closer {
{
visibility: hidden; visibility: hidden;
} }
#side-menu.hide-opener.side-menu-with-categories .side-menu-search #side-menu.hide-opener.side-menu-with-categories .side-menu-search {
{
float: none; float: none;
} }
+5
View File
@@ -24,6 +24,7 @@ if ($_['always-displayed']) {
const body = document.querySelector('body') const body = document.querySelector('body')
const html = document.querySelector('html') const html = document.querySelector('html')
const nextcloud = document.querySelector('#nextcloud') const nextcloud = document.querySelector('#nextcloud')
const logo = document.querySelector('.header-left .logo')
const isTouchDevice = window.matchMedia("(pointer: coarse)").matches const isTouchDevice = window.matchMedia("(pointer: coarse)").matches
@@ -170,6 +171,10 @@ if ($_['always-displayed']) {
<?php endif; ?> <?php endif; ?>
if (nextcloud) { if (nextcloud) {
if (logo && logo.parentNode !== nextcloud) {
nextcloud.appendChild(logo)
}
<?php if ($_['opener-position'] === 'before'): ?> <?php if ($_['opener-position'] === 'before'): ?>
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud) nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud)
<?php else: ?> <?php else: ?>