1
Fork 0

Add the navbar to the default layout.

master
vonavi 2014-01-24 20:08:25 +02:00
parent 5543f78677
commit c0e9e189a0
3 changed files with 27 additions and 0 deletions

5
_data/nav-links.yml Normal file
View File

@ -0,0 +1,5 @@
- url: /tournaments/
title: Турниры
- url: /reviews/
title: Обзоры

21
_includes/navbar.html Normal file
View File

@ -0,0 +1,21 @@
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ site.title }}</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
{% for link in site.data.nav-links %}
<li><a href="{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
</ul>
</div><!-- /.navbar-collapse -->
</nav>

View File

@ -26,6 +26,7 @@
</head>
<body>
{% include navbar.html %}
{{ content }}