Various fixes
[vchess.git] / client / src / App.vue
index 84f4b51..f337394 100644 (file)
@@ -13,7 +13,7 @@
         nav
           label.drawer-toggle(for="drawerControl")
           input#drawerControl.drawer(type="checkbox")
-          #menuBar
+          #menuBar(@click="hideDrawer")
             label.drawer-close(for="drawerControl")
             #leftMenu
               router-link(to="/")
@@ -22,7 +22,7 @@
                 | {{ st.tr["Variants"] }}
               router-link(to="/mygames")
                 | {{ st.tr["My games"] }}
-              a(href="https://groups.google.com/forum/#!forum/vchess-club")
+              a(href="https://forum.vchess.club")
                 | {{ st.tr["Forum"] }}
             #rightMenu
               .clickable(onClick="doClick('modalUser')")
@@ -66,6 +66,14 @@ export default {
       return `/images/flags/${this.st.lang}.svg`;
     },
   },
+  methods: {
+    hideDrawer: function(e) {
+      if (e.target.innerText == "Forum")
+        return; //external link
+      e.preventDefault(); //TODO: why is this needed?
+      document.getElementsByClassName("drawer")[0].checked = false;
+    },
+  },
 };
 </script>
 
@@ -131,12 +139,13 @@ nav
           width: 36px
           height: 27px
 
-// TODO: drawer, until 600px wide OK (seemingly)
-// After, zone where left and right just go on top of another
-// Then, on narrow screen put everything on one line
 [type="checkbox"].drawer+*
   right: -767px
 
+#menuBar
+  label.drawer-close
+    top: 50px
+
 footer
   //background-color: #000033
   font-size: 1rem