diff --git a/src/script/main.js b/src/script/main.js index 5cf8937..65b4160 100644 --- a/src/script/main.js +++ b/src/script/main.js @@ -120,6 +120,14 @@ $(document).ready(function () { }) } + $('body').click(function (e) { + $('#show-menu').prop('checked', false) + }) + + $('.menu').click(function (e) { + e.stopPropagation() + }) + $('#dialog #close').click(function (e) { window.Dialog.close() }) diff --git a/src/style/main.styl b/src/style/main.styl index d8867f9..be20dca 100644 --- a/src/style/main.styl +++ b/src/style/main.styl @@ -98,8 +98,11 @@ a cursor: pointer color: green - .menu:hover > .list - max-height: 500px + input[type=checkbox] + display: none + + &:checked ~ .list + max-height: 500px section font-family: "Open Sans" diff --git a/views/layout.pug b/views/layout.pug index 74f5e02..d1be3d5 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -69,8 +69,9 @@ html .part1 Icy .part2 Network .menu - .showButton(for="show-menu") + label.showButton(for="show-menu") i.fa.fa-fw.fa-bars + input(type="checkbox" id="show-menu") .list ul li