Created
June 7, 2017 13:10
-
-
Save chernysh2909/ff7614df8f3cc3f0a8a2e28a426a9c23 to your computer and use it in GitHub Desktop.
bootstrap меню
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav id="menu" class="navbar"> | |
<div class="navbar-header"><span id="category" class="visible-xs"><?php echo $text_category; ?></span> | |
<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> | |
</div> | |
<div class="collapse navbar-collapse navbar-ex1-collapse"> | |
<ul class="nav navbar-nav"> | |
<?php foreach ($categories as $category) { ?> | |
<!-- <?php if ($category['children']) { ?> | |
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a> | |
<div class="dropdown-menu"> | |
<div class="dropdown-inner"> | |
<?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?> | |
<ul class="list-unstyled"> | |
<?php foreach ($children as $child) { ?> | |
<li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li> | |
<?php } ?> | |
</ul> | |
<?php } ?> | |
</div> | |
<a href="<?php echo $category['href']; ?>" class="see-all"><?php echo $text_all; ?> <?php echo $category['name']; ?></a> </div> | |
</li> | |
<?php } else { ?> | |
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li> | |
<?php } ?> --> | |
<?php if ($category['thumb']) { ?> | |
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" /> <?php echo $category['name']; ?></a> | |
<?php } ?> | |
<?php } ?> | |
</ul> | |
</div> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment