diff --git a/core/core.php b/core/core.php index 7a2a402f..04462acb 100644 --- a/core/core.php +++ b/core/core.php @@ -2338,7 +2338,7 @@ class layout extends common { */ public function showMenu() { // Met en forme les items du menu - $items = ''; + $itemsLeft = ''; $currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2); foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) { // Passer les entrées masquées @@ -2346,36 +2346,36 @@ class layout extends common { $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : ''; $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; // Mise en page de l'item - $items .= '
  • '; + $itemsLeft .= '
  • '; if ( $this->getData(['page',$parentPageId,'disable']) === true AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) - {$items .= ''; + {$itemsLeft .= ''; } else { - $items .= ''; + $itemsLeft .= ''; } switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { case '' : - $items .= $this->getData(['page', $parentPageId, 'title']); + $itemsLeft .= $this->getData(['page', $parentPageId, 'title']); break; case 'text' : - $items .= $this->getData(['page', $parentPageId, 'title']); + $itemsLeft .= $this->getData(['page', $parentPageId, 'title']); break; case 'icon' : if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") { - $items .= ''.$this->getData(['page', $parentPageId, 'title']).''; + $itemsLeft .= ''.$this->getData(['page', $parentPageId, 'title']).''; } else { - $items .= $this->getData(['page', $parentPageId, 'title']); + $itemsLeft .= $this->getData(['page', $parentPageId, 'title']); } break; case 'icontitle' : if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") { - $items .= ''.$this->getData(['page', $parentPageId, 'title']).''; + $itemsLeft .= ''.$this->getData(['page', $parentPageId, 'title']).''; } else { - $items .= $this->getData(['page', $parentPageId, 'title']); + $itemsLeft .= $this->getData(['page', $parentPageId, 'title']); } break; } @@ -2388,64 +2388,65 @@ class layout extends common { } if($childrenPageIds && $disableChild !== $totalChild && $this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) { - $items .= template::ico('down', 'left'); + $itemsLeft .= template::ico('down', 'left'); } // ------------------------------------------------ - $items .= ''; + $itemsLeft .= ''; if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true || empty($childrenPageIds)) { continue; } - $items .= ''; } // Lien de connexion + $itemsRight = ''; if( ( $this->getData(['theme', 'menu', 'loginLink']) @@ -2453,7 +2454,7 @@ class layout extends common { ) OR $this->getUrl(0) === 'theme' ) { - $items .= '
  • '; - $items .= '
  • ' . template::ico('logout') . '
  • '; + $itemsRight .= '
  • ' . template::ico('user', 'right') . '
  • '; + $itemsRight .= '
  • ' . template::ico('logout') . '
  • '; } // Retourne les items du menu - echo ''; + echo ''; } /** diff --git a/core/layout/common.css b/core/layout/common.css index 7bb2747d..b9a1e83b 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -521,6 +521,27 @@ nav a { nav a:hover { text-decoration: none; } + +nav #menuLeft { + display: flex; + float: left; +} +nav #menuRight { + display: flex; + float: right; +} +/* fin barre de menu */ +nav::after { + content: " "; + clear: both; + display: flex; +} +nav::before { + content: " "; + clear: left; + display: flex; +} + @media (min-width: 768px) { nav #menu { display: block;