Skip to content

Commit

Permalink
more levels in mobile navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
seibtph authored and Philipp Seibt committed Jul 2, 2018
1 parent 5b6bfee commit 1c971ed
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,76 @@
<?php if(is_array($this->items)): ?>
<?php foreach ($this->items as $item): ?>
<li<?php if ($item['class']) echo ' class="' . $item['class'] . '"'; ?>>
<a href="<?= $item['href'] ?: './' ?>"
<?php /* if(!empty($item['subitems'])): ?>
<?php foreach ($this->items as $item): ?>
<li<?php if ($item['class']) echo ' class="' . $item['class'] . '"'; ?>>
<a href="<?= $item['href'] ?: './' ?>"
<?php /* if(!empty($item['subitems'])): ?>
class="dropdown-button<?php if($item['isActive']): ?> active<?php endif; ?>"
data-collapsible="dropdown<?= $item['id'] ?>"<?php endif; */ ?>
title="<?= $item['pageTitle'] ?: $item['title'] ?>"
<?php if ($item['class']) echo ' class="' . $item['class'] . '"'; ?>
<?php if ($item['accesskey']) echo ' accesskey="' . $item['accesskey'] . '"'; ?>
<?php if ($item['tabindex']) echo ' tabindex="' . $item['tabindex'] . '"'; ?>
<?php if ($item['nofollow']) echo ' rel="nofollow"'; ?><?= $item['target'] ?>
<?php if (!empty($item['subitems'])) echo ' aria-haspopup="true"'; ?>>
<?= $item['link'] ?>
<?php /* <pre><?php print_r($item['subitems']); ?></pre> */ ?>
title="<?= $item['pageTitle'] ?: $item['title'] ?>"
<?php if ($item['class']) echo ' class="' . $item['class'] . '"'; ?>
<?php if ($item['accesskey']) echo ' accesskey="' . $item['accesskey'] . '"'; ?>
<?php if ($item['tabindex']) echo ' tabindex="' . $item['tabindex'] . '"'; ?>
<?php if ($item['nofollow']) echo ' rel="nofollow"'; ?><?= $item['target'] ?>
<?php if (!empty($item['subitems'])) echo ' aria-haspopup="true"'; ?>>
<?= $item['link'] ?>
<?php /* <pre><?php print_r($item['subitems']); ?></pre> */ ?>

</a>
<?php if(!empty($item['subitems'])): ?>
<i class="material-icons right" style="z-index: 999;position: relative;right: 5px;top: -55px;">arrow_drop_down</i>
<?php endif; ?>
</li>
<?php if (!empty($item['subitems'])): ?>
<li class="subitems" style="display:none;background:rgba(0, 0, 0, .05);">
<ul>
<?php foreach ($item['subitems'] as $sItem): ?>
<li>
<a href="<?= $sItem['href'] ?: './' ?>" class="<?php if($sItem['isActive']): ?> active<?php endif; ?>"
title="<?= $sItem['pageTitle'] ?: $sItem['title'] ?>">
<?= $sItem['link'] ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php if(!empty($item['subitems'])): ?>
<i class="material-icons right" style="z-index: 999;position: relative;right: 5px;top: -55px;">arrow_drop_down</i>
<?php endif; ?>
</li>
<?php if (!empty($item['subitems'])): ?>
<li class="subitems" style="display:none;background:rgba(0, 0, 0, .05);">
<ul>
<?php foreach ($item['subitems'] as $sItem): ?>
<li>
<a href="<?= $sItem['href'] ?: './' ?>" class="<?php if($sItem['isActive']): ?> active<?php endif; ?>"
title="<?= $sItem['pageTitle'] ?: $sItem['title'] ?>">
<?= $sItem['link'] ?>
</a>
<?php if(!empty($sItem['subitems'])): ?>
<i id="toggleMenu" class="material-icons right" style="z-index: 999;position: relative;right: 5px;top: -55px;">arrow_drop_down</i>
<?php endif; ?>
</li>

<?php if (!empty($sItem['subitems'])): ?>
<li style="display:none;background:rgba(0, 0, 0, .05);">
<ul>
<?php foreach ($sItem['subitems'] as $itemLvl3): ?>
<li>
<a href="<?= $itemLvl3['href'] ?: './' ?>" class="<?php if($itemLvl3['isActive']): ?> active<?php endif; ?>"
title="<?= $itemLvl3['pageTitle'] ?: $itemLvl3['title'] ?>">
<?= $itemLvl3['link'] ?>
</a>
<?php if(!empty($itemLvl3['subitems'])): ?>
<i id="toggleMenu" class="material-icons right" style="z-index: 999;position: relative;right: 5px;top: -55px;">arrow_drop_down</i>
<?php endif; ?>
</li>
<?php if (!empty($itemLvl3['subitems'])): ?>
<li style="display:none;background:rgba(0, 0, 0, .05);">
<ul>
<li>
<?php foreach ($itemLvl3['subitems'] as $itemLvl4): ?>
<a href="<?= $itemLvl4['href'] ?: './' ?>" class="<?php if($itemLvl4['isActive']): ?> active<?php endif; ?>"
title="<?= $itemLvl4['pageTitle'] ?: $itemLvl4['title'] ?>">
<?= $itemLvl4['link'] ?>
</a>
<?php endforeach; ?>
</li>
</ul>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</li>
<?php endif; ?>

<?php endforeach; ?>
</ul>
</li>
<?php endif; ?>

<?php endforeach; ?>
<?php endif; ?>

<?php $GLOBALS['TL_BODY'][] = '<script>
Expand Down
16 changes: 16 additions & 0 deletions src/Resources/public/sass/mate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2832,6 +2832,18 @@ textarea {
width: 100%;
padding: 0 20px;
}

ul {
padding-left: 15px;

a {
height: 40px;
}

ul {
padding-left: 30px;
}
}
}
}
}
Expand Down Expand Up @@ -2897,6 +2909,10 @@ textarea {
i, [class^="mdi-"], [class*="mdi-"], i.material-icons {
font-size: 50px;
}

.subitems i.material-icons {
font-size: 40px;
}
}
}

Expand Down

0 comments on commit 1c971ed

Please sign in to comment.