Refactor main menu links

This commit is contained in:
Oliver Davies 2015-09-13 17:10:27 +01:00
parent 6f11fb440d
commit 6140f406f4
2 changed files with 19 additions and 7 deletions

View file

@ -36,11 +36,21 @@ apple_touch_icon_sizes: [ 57, 114, 72, 144, 60, 120, 76, 152 ]
favicon_sizes: [ 160, 96, 32, 16 ]
main_menu:
- { title: Experience, href: /experience/, nav: experience }
- { title: Testimonials, href: /testimonials/, nav: testimonials }
- { title: Talks, href: /talks/, nav: talks }
- { title: Blog, href: /blog/, nav: blog }
- { title: Contact, href: /contact/, nav: contact }
experience:
title: Experience
href: /experience/
testimonials:
title: Testimonials
href: /testimonials/
talks:
title: Talks
href: /talks/
blog:
title: Blog
href: /blog/
contact:
title: Contact
href: /contact/
meetups:
swdug:

View file

@ -46,8 +46,10 @@
<div id="navbar" class="collapse navbar-collapse" role="navigation">
<ul class="nav navbar-nav">
{% for link in site.main_menu %}
<li class="nav__{{ link.title|lower }}{% if page.nav == link.nav %} active{% endif %}"><a href="{{ link.href }}">{{ link.title }}</a></li>
{% for name, item in site.main_menu %}
<li{% if page.nav == name %} class="active"{% endif %}>
<a href="{{ item.href }}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</div>{# .nav-collapse #}