diff --git a/app/config/sculpin_site.yml b/app/config/sculpin_site.yml index 92ac77df..f4e1abf0 100644 --- a/app/config/sculpin_site.yml +++ b/app/config/sculpin_site.yml @@ -18,4 +18,5 @@ imports: - ../../data/companies.yml - ../../data/events.yml - ../../data/links.yml + - ../../data/menus.yml - ../../data/work.yml diff --git a/data/menus.yml b/data/menus.yml new file mode 100644 index 00000000..a813ebd9 --- /dev/null +++ b/data/menus.yml @@ -0,0 +1,36 @@ +menus: + main: + about: + title: 'About' + href: '/' + pattern: '^/.$' + + articles: + title: 'Articles' + href: '/articles' + pattern: '^/articles/?' + + talks: + title: 'Talks' + href: '/talks' + pattern: '^/talks/?' + + podcasts: + title: 'Podcasts' + href: '/podcasts' + pattern: '^/podcasts/?' + + projects: + title: 'Projects' + href: '/projects' + pattern: '^/projects/?$' + + book: + title: 'Book' + href: '/test-driven-drupal' + pattern: '^/test-driven-drupal/?$' + + contact: + title: 'Contact' + href: '/contact' + pattern: '^/contact/?' diff --git a/resources/js/app.js b/resources/js/app.js index 26960f55..104d9967 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,9 +1,19 @@ -import Navbar from './components/Navbar' import Vue from 'vue' window.hljs = require('highlightjs') new Vue({ - el: '#app', - components: { Navbar } + el: '#nav', + + methods: { + toggle () { + this.isOpen = !this.isOpen + } + }, + + data () { + return { + isOpen: false + } + } }) diff --git a/resources/js/components/Navbar.vue b/resources/js/components/Navbar.vue deleted file mode 100644 index 5e80ef3c..00000000 --- a/resources/js/components/Navbar.vue +++ /dev/null @@ -1,127 +0,0 @@ - - - diff --git a/source/_layouts/app.html.twig b/source/_layouts/app.html.twig index fff9be42..cd759c49 100644 --- a/source/_layouts/app.html.twig +++ b/source/_layouts/app.html.twig @@ -21,7 +21,7 @@ {% endfor %} -
+
{% block body %}{% endblock %}
diff --git a/source/_partials/layout/navbar.html.twig b/source/_partials/layout/navbar.html.twig index de7f5831..5ec75d77 100644 --- a/source/_partials/layout/navbar.html.twig +++ b/source/_partials/layout/navbar.html.twig @@ -1,13 +1,49 @@ -
+