lepisi-pengumuman/assets/js/index.js

16 lines
630 B
JavaScript

let m = require('mithril')
let secondaryNav = require('./components/secondaryNav')
let showPost = require('./components/showPost')
var root = document.getElementById('mit')
m.mount(document.getElementById('navigasi'), secondaryNav)
m.route(root, '', {
'': { view: function() { return m(showPost, { 'status': 3 }) } },
'/': { view: function() { return m(showPost, { 'status': 3 }) } },
'/active': { view: function() { return m(showPost, { 'status': 1 }) } },
'/soon': { view: function() { return m(showPost, { 'status': 2 }) } },
'/inactive': { view: function() { return m(showPost, { 'status': 0 }) } },
})