tailwindcss/docs/source/_assets/js/app.js

23 lines
537 B
JavaScript
Raw Normal View History

2017-10-26 09:03:44 -04:00
const anchorJS = require('anchor-js')
const Prism = require('./prism')
2017-10-26 09:03:44 -04:00
window.anchors = new anchorJS()
window.Vue = require('vue')
Vue.component('responsive-code-sample', require('./components/ResponsiveCodeSample.vue'))
const app = new Vue({
2017-11-09 13:55:51 -05:00
el: '#app'
})
Prism.highlightAll()
2017-11-09 13:55:51 -05:00
anchors.options = { placement: 'left', class: 'text-slate-light' }
anchors.add()
2017-11-08 09:29:55 -05:00
// Add shortcut to search input when pressing the "/" key
2017-11-08 09:29:55 -05:00
document.onkeyup = function (e) {
2017-11-09 13:55:51 -05:00
if (e.which == 191) {
document.getElementById('docsearch').focus()
}
}