X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2FApp.vue;h=f337394ef791785eca539c7ee680550a0f820178;hb=4f8871051c030acd51172b73cd20aedce687c2a8;hp=e06a2fef5bbede787fc1b09a70b738095e8cb530;hpb=afd3240d89a2f6191fe9426960dc0c1667b40c77;p=vchess.git diff --git a/client/src/App.vue b/client/src/App.vue index e06a2fef..f337394e 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -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,6 @@ | {{ st.tr["Variants"] }} router-link(to="/mygames") | {{ st.tr["My games"] }} - // TODO: parametric URL, "forumURL" a(href="https://forum.vchess.club") | {{ st.tr["Forum"] }} #rightMenu @@ -67,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; + }, + }, }; @@ -132,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