Skip to content

Commit

Permalink
mobile friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyperdana committed Sep 20, 2020
1 parent 8d2adb3 commit 0e2057d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 20 deletions.
16 changes: 14 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
node_modules/
*.log
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# misc
.DS_Store
.env
npm-debug.log*
yarn-debug.log*
yarn-error.log*
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"author": "rikyperdana",
"license": "MIT",
"dependencies": {
"express": "^4.17.1",
"socket.io": "^2.3.0",
"mongodb": "^3.5.9",
"body-parser": "^1.19.0",
"moment": "^2.27.0",
"lodash": "^4.17.20",
"cron": "^1.8.2",
"crypto-js": "^3.3.0",
"node-fetch": "^2.6.0",
"dotenv": "^8.2.0"
"dotenv": "^8.2.0",
"express": "^4.17.1",
"lodash": "^4.17.20",
"moment": "^2.27.0",
"mongodb": "^3.5.9",
"node-fetch": "^2.6.1",
"socket.io": "^2.3.0"
},
"devDependencies": {},
"keywords": [
Expand Down
24 changes: 19 additions & 5 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,24 @@ comp = {
m('.navbar-brand',
m('a.navbar-item', 'BPJS Bridge'),
m('a.navbar-burger.burger',
{role: 'button', 'aria-label': 'menu', 'aria-expanded': 'false', 'data-target': 'navbarBasicExample'},
{
class: state.burgerMenu && 'is-active',
role: 'button', 'aria-label': 'menu', 'aria-expanded': 'false',
onclick: () => [state.burgerMenu = !state.burgerMenu, m.redraw()]
},
_.range(3).map(function(i){return m('span', {'aria-hidden': true})})
)
),
m('.navbar-menu', {id: 'navbarBasicExample'},
m('.navbar-menu',
{class: state.burgerMenu && 'is-active'},
m('.navbar-start', menus.map(function(i){
return m('a.navbar-item', {onclick: function(){state.route = i}}, _.startCase(i))
return m('a.navbar-item',
{onclick: function(){[
_.assign(state, {route: i, burgerMenu: null}),
m.redraw()
]}},
_.startCase(i)
)
})),
m('.navbar-end')
),
Expand All @@ -159,5 +170,8 @@ comp = {
};

m.mount(document.body, {view: function(){return m('div',
comp.navbar(), m('.container', m('br'), comp[state.route || 'referensi_kelas']())
)}})
comp.navbar(),
m('section.section', m('.container', m('br'),
comp[state.route || 'referensi_kelas']()
))
)}})

0 comments on commit 0e2057d

Please sign in to comment.