Ensure that the navbar works without JS

This commit is contained in:
Oliver Davies 2019-09-04 00:35:53 +01:00
parent f356028ee4
commit e2c9f291b5
5 changed files with 13 additions and 4 deletions

View file

@ -5,3 +5,4 @@
@import './components.css';
@import 'tailwindcss/utilities';
@import './utilities.css';

View file

@ -0,0 +1,3 @@
.no-js .js-hidden {
display: none;
}

View file

@ -3,7 +3,7 @@ import Vue from 'vue'
window.hljs = require('highlightjs')
new Vue({
el: '#nav',
el: '#app',
methods: {
toggle () {
@ -11,6 +11,11 @@ new Vue({
}
},
mounted: function () {
this.$el.classList.remove('no-js')
this.$el.classList.add('js')
},
data () {
return {
isOpen: false