Move nav links into site config
This commit is contained in:
parent
527ca1ea88
commit
3b226fd242
|
@ -6,6 +6,14 @@ fuzzy_date_format: F Y
|
||||||
apple_touch_icon_sizes: [ 57, 114, 72, 144, 60, 120, 76, 152 ]
|
apple_touch_icon_sizes: [ 57, 114, 72, 144, 60, 120, 76, 152 ]
|
||||||
favicon_sizes: [ 160, 96, 32, 16 ]
|
favicon_sizes: [ 160, 96, 32, 16 ]
|
||||||
|
|
||||||
|
nav_links:
|
||||||
|
- { title: 'About', href: '/', pattern: '/\.' }
|
||||||
|
- { title: 'Experience', href: '/experience' }
|
||||||
|
- { title: 'Testimonials', href: '/testimonials' }
|
||||||
|
- { title: 'Talks', href: '/talks' }
|
||||||
|
- { title: 'Blog', href: '/blog' }
|
||||||
|
- { title: 'Contact', href: '/contact' }
|
||||||
|
|
||||||
ansible_galaxy:
|
ansible_galaxy:
|
||||||
url: https://galaxy.ansible.com/opdavies
|
url: https://galaxy.ansible.com/opdavies
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,8 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% set links = [
|
|
||||||
{ title: 'About', href: '/', pattern: '/\\.' },
|
|
||||||
{ title: 'Experience', href: '/experience' },
|
|
||||||
{ title: 'Testimonials', href: '/testimonials' },
|
|
||||||
{ title: 'Talks', href: '/talks' },
|
|
||||||
{ title: 'Blog', href: '/blog' },
|
|
||||||
{ title: 'Contact', href: '/contact' }
|
|
||||||
] %}
|
|
||||||
|
|
||||||
<nav class="db dtc-ns v-mid w-100 tl tr-ns mt2 mt0-ns">
|
<nav class="db dtc-ns v-mid w-100 tl tr-ns mt2 mt0-ns">
|
||||||
{% for link in links %}
|
{% for link in site.nav_links %}
|
||||||
<a href="{{ link.href }}" class="nav-item {{ page.url matches '#^' ~ (link.pattern ?: link.href) ~ '/?#' ? 'nav-item--active' }}">
|
<a href="{{ link.href }}" class="nav-item {{ page.url matches '#^' ~ (link.pattern ?: link.href) ~ '/?#' ? 'nav-item--active' }}">
|
||||||
{{- link.title -}}
|
{{- link.title -}}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue