Move nav links into settings
This commit is contained in:
parent
dd137e9018
commit
0d87c3b806
|
@ -241,3 +241,6 @@ events:
|
|||
name: 'unified.diff'
|
||||
location: Cardiff, UK
|
||||
website: http://unifieddiff.co.uk
|
||||
|
||||
imports:
|
||||
- '../../data/navigation.yml'
|
||||
|
|
24
data/navigation.yml
Normal file
24
data/navigation.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
navigation:
|
||||
- title: About
|
||||
href: '/'
|
||||
pattern: '^/.$'
|
||||
|
||||
- title: Experience
|
||||
href: '/experience'
|
||||
pattern: '^/experience/?$'
|
||||
|
||||
- title: Talks
|
||||
href: '/talks'
|
||||
pattern: '^/talks/?'
|
||||
|
||||
- title: 'Open Source'
|
||||
href: '/opensource'
|
||||
pattern: '^/opensource/?$'
|
||||
|
||||
- title: Blog
|
||||
href: '/blog'
|
||||
pattern: '^/blog/?'
|
||||
|
||||
- title: Contact
|
||||
href: '/contact'
|
||||
pattern: '^/contact/?'
|
|
@ -15,17 +15,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% set links = [
|
||||
{ title: 'About', href: '/', pattern: '^/.$' },
|
||||
{ title: 'Experience', href: '/experience', pattern: '^/experience/?$' },
|
||||
{ title: 'Talks', href: '/talks', pattern: '^/talks/?' },
|
||||
{ title: 'Open Source', href: '/opensource', pattern: '^/opensource/?$' },
|
||||
{ title: 'Blog', href: '/blog', pattern: '^/blog/?' },
|
||||
{ title: 'Contact', href: '/contact', pattern: '^/contact/?' }
|
||||
] %}
|
||||
|
||||
<nav class="hidden w-full md:w-2/3 lg:w-3/4 sm:flex sm:flex-wrap sm:justify-end" role="navigation">
|
||||
{% for link in links %}
|
||||
{% for link in site.navigation %}
|
||||
<a href="{{ link.href }}" class="flex items-center -mx-4 p-4 sm:border-b-3 sm:border-transparent sm:ml-4 sm:mr-0 sm:p-0 {{ loop.first ? 'border-t border-grey-lighter sm:border-t-0 sm:border-transparent' }} {{ page.url matches '#' ~ link.pattern ~ '#' ? 'sm:bg-transparent sm:border-blue' }}">
|
||||
{{ link.title }}
|
||||
</a>
|
||||
|
|
Reference in a new issue