bludit/bl-themes/blogx/php/navbar.php

33 lines
1.3 KiB
PHP
Raw Normal View History

2018-02-01 00:34:16 +01:00
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark text-uppercase">
<div class="container">
<a class="navbar-brand" href="<?php echo Theme::siteUrl() ?>">
2018-02-01 00:34:16 +01:00
<span class="text-white"><?php echo $site->title() ?></span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<!-- Static pages -->
<?php foreach ($staticContent as $staticPage): ?>
<li class="nav-item">
<a class="nav-link" href="<?php echo $staticPage->permalink() ?>"><?php echo $staticPage->title() ?></a>
</li>
<?php endforeach ?>
<!-- Social Networks -->
2018-11-09 00:59:06 +01:00
<?php foreach (Theme::socialNetworks() as $key=>$label): ?>
2018-02-01 00:34:16 +01:00
<li class="nav-item">
2018-11-09 00:59:06 +01:00
<a class="nav-link" href="<?php echo $site->{$key}(); ?>" target="_blank">
<img class="d-none d-sm-block nav-svg-icon" src="<?php echo DOMAIN_THEME.'img/'.$key.'.svg' ?>" alt="<?php echo $label ?>" />
<span class="d-inline d-sm-none"><?php echo $label; ?></span>
2018-02-01 00:34:16 +01:00
</a>
</li>
2018-11-09 00:59:06 +01:00
<?php endforeach; ?>
2018-02-01 00:34:16 +01:00
</ul>
</div>
</div>
2018-08-15 12:26:20 +02:00
</nav>