A few fixes, drop planned problems support (replaced by forum + mode analyze)
[vchess.git] / client / src / App.vue
CommitLineData
625022fd 1<template lang="pug">
98db2082 2#app
98db2082 3 Language
c66a829b 4 Settings
98db2082 5 ContactForm
c66a829b 6 UpsertUser
98db2082 7 .container
98db2082 8 .row
85e5b5c1
BA
9 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
10 // Menu (top of page):
afd3240d 11 // Left: hall, variants, mygames, forum (ext. link)
85e5b5c1
BA
12 // Right: usermenu, settings, flag
13 nav
14 label.drawer-toggle(for="drawerControl")
15 input#drawerControl.drawer(type="checkbox")
16 #menuBar
17 label.drawer-close(for="drawerControl")
18 #leftMenu
19 router-link(to="/")
cf2343ce 20 | {{ st.tr["Hall"] }}
85e5b5c1
BA
21 router-link(to="/variants")
22 | {{ st.tr["Variants"] }}
23 router-link(to="/mygames")
24 | {{ st.tr["My games"] }}
afd3240d
BA
25 // TODO: parametric URL, "forumURL"
26 a(href="https://forum.vchess.club")
27 | {{ st.tr["Forum"] }}
85e5b5c1
BA
28 #rightMenu
29 .clickable(onClick="doClick('modalUser')")
1aeed627 30 | {{ st.user.id > 0 ? "Update" : "Login" }}
85e5b5c1
BA
31 .clickable(onClick="doClick('modalSettings')")
32 | {{ st.tr["Settings"] }}
fb54f098 33 .clickable#flagContainer(onClick="doClick('modalLang')")
03608482 34 img(v-if="!!st.lang" :src="flagImage")
fb54f098 35 router-view
ccd4a2b7 36 .row
85e5b5c1
BA
37 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
38 footer
92a523d1 39 router-link.menuitem(to="/about") {{ st.tr["About"] }}
ccd4a2b7 40 p.clickable(onClick="doClick('modalContact')")
92a523d1
BA
41 | {{ st.tr["Contact"] }}
42 // TODO: add only the necessary icons to mini-css custom build
8d61fc4a 43 //script(src="//unpkg.com/feather-icons")
625022fd
BA
44</template>
45
98db2082
BA
46<script>
47// See https://stackoverflow.com/a/35417159
48import ContactForm from "@/components/ContactForm.vue";
49import Language from "@/components/Language.vue";
50import Settings from "@/components/Settings.vue";
c66a829b
BA
51import UpsertUser from "@/components/UpsertUser.vue";
52import { store } from "./store.js";
98db2082 53export default {
98db2082
BA
54 components: {
55 ContactForm,
56 Language,
57 Settings,
c66a829b
BA
58 UpsertUser,
59 },
60 data: function() {
61 return {
62 st: store.state,
63 };
98db2082 64 },
03608482
BA
65 computed: {
66 flagImage: function() {
67 return `/images/flags/${this.st.lang}.svg`;
68 },
69 },
98db2082
BA
70};
71</script>
72
625022fd
BA
73<style lang="sass">
74#app
75 font-family: "Avenir", Helvetica, Arial, sans-serif
76 -webkit-font-smoothing: antialiased
77 -moz-osx-font-smoothing: grayscale
625022fd 78
85e5b5c1
BA
79.container
80 @media screen and (max-width: 767px)
81 padding: 0
82
fb54f098
BA
83.row > div
84 padding: 0
85
86.nopadding
87 padding: 0
88
85e5b5c1
BA
89header
90 width: 100%
91 display: flex
92 align-items: center
93 justify-content: center
94 margin: 0 auto
95 & > img
96 width: 30px
97 height: 30px
98
99.clickable
100 cursor: pointer
101
102nav
103 width: 100%
fb54f098 104 margin: 0
85e5b5c1
BA
105 padding: 0
106 & > #menuBar
107 width: 100%
108 padding: 0
109 & > #leftMenu
110 padding: 0
111 width: 50%
112 display: inline-flex
113 align-items: center
114 justify-content: flex-start
115 & > a
116 display: inline-block
117 color: #2c3e50
118 &.router-link-exact-active
119 color: #42b983
120 & > #rightMenu
121 padding: 0
122 width: 50%
123 display: inline-flex
124 align-items: center
125 justify-content: flex-end
126 & > div
127 display: inline-block
fb54f098
BA
128 &#flagContainer
129 display: inline-flex
85e5b5c1
BA
130 & > img
131 padding: 0
fb54f098
BA
132 width: 36px
133 height: 27px
85e5b5c1
BA
134
135// TODO: drawer, until 600px wide OK (seemingly)
136// After, zone where left and right just go on top of another
137// Then, on narrow screen put everything on one line
138[type="checkbox"].drawer+*
139 right: -767px
140
141footer
142 //background-color: #000033
143 font-size: 1rem
144 width: 100%
a6b9b86c
BA
145 padding-left: 0
146 padding-right: 0
85e5b5c1
BA
147 display: inline-flex
148 align-items: center
149 justify-content: center
92a523d1 150 & > .menuitem
85e5b5c1
BA
151 display: inline-block
152 margin: 0 10px 0 0
153 &:link
154 color: #2c3e50
155 &:hover
156 text-decoration: none
157 & > p
158 display: inline-block
159 margin: 0 0 0 10px
625022fd 160</style>