Less code
This commit is contained in:
parent
4f20b44a93
commit
88878b6433
|
@ -12,11 +12,10 @@
|
||||||
<div id="navbar" class="collapse navbar-collapse">
|
<div id="navbar" class="collapse navbar-collapse">
|
||||||
<ul class="nav navbar-nav navbar-right" role="navigation">
|
<ul class="nav navbar-nav navbar-right" role="navigation">
|
||||||
<li{% if page.nav == 'about' %} class="active"{% endif %}><a href="{{ site.url }}">About</a></li>
|
<li{% if page.nav == 'about' %} class="active"{% endif %}><a href="{{ site.url }}">About</a></li>
|
||||||
<li{% if page.nav == 'work' %} class="active"{% endif %}><a href="{{ site.url }}/work">Work</a></li>
|
{% set items = { 0: 'work', 1: 'services', 2: 'talks', 3: 'blog', 4: 'contact' } %}
|
||||||
<li{% if page.nav == 'services' %} class="active"{% endif %}><a href="{{ site.url }}/services">Services</a></li>
|
{% for item in items %}
|
||||||
<li{% if page.nav == 'talks' %} class="active"{% endif %}><a href="{{ site.url }}/talks">Talks</a></li>
|
<li{% if page.nav == item %} class="active"{% endif %}><a href="{{ site.url }}/{{ item }}">{{ item|title }}</a></li>
|
||||||
<li{% if page.nav == 'blog' %} class="active"{% endif %}><a href="{{ site.url }}/blog">Blog</a></li>
|
{% endfor %}
|
||||||
<li{% if page.nav == 'contact' %} class="active"{% endif %}><a href="{{ site.url }}/contact">Contact</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>{# .nav-collapse #}
|
</div>{# .nav-collapse #}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue