Commit | Line | Data |
---|---|---|
625022fd | 1 | <template lang="pug"> |
98db2082 | 2 | #app |
c66a829b | 3 | Settings |
98db2082 | 4 | ContactForm |
c66a829b | 5 | UpsertUser |
98db2082 | 6 | .container |
98db2082 | 7 | .row |
85e5b5c1 BA |
8 | .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 |
9 | // Menu (top of page): | |
89021f18 | 10 | // Left: hall, variants, problems, mygames |
5b3dc10e | 11 | // Right: usermenu, settings |
85e5b5c1 BA |
12 | nav |
13 | label.drawer-toggle(for="drawerControl") | |
14 | input#drawerControl.drawer(type="checkbox") | |
9a3049f3 | 15 | #menuBar(@click="hideDrawer($event)") |
85e5b5c1 BA |
16 | label.drawer-close(for="drawerControl") |
17 | #leftMenu | |
18 | router-link(to="/") | |
cf2343ce | 19 | | {{ st.tr["Hall"] }} |
ae2c49bb BA |
20 | router-link(to="/mygames") |
21 | | {{ st.tr["My games"] }} | |
85e5b5c1 BA |
22 | router-link(to="/variants") |
23 | | {{ st.tr["Variants"] }} | |
89021f18 BA |
24 | router-link(to="/problems") |
25 | | {{ st.tr["Problems"] }} | |
85e5b5c1 | 26 | #rightMenu |
2c5d7b20 | 27 | .clickable(onClick="window.doClick('modalUser')") {{ userName }} |
5b3dc10e BA |
28 | #divSettings.clickable(onClick="window.doClick('modalSettings')") |
29 | span {{ st.tr["Settings"] }} | |
b9a5fe01 | 30 | img(src="/images/icons/settings.svg") |
fb54f098 | 31 | router-view |
604b951e BA |
32 | .row |
33 | .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 | |
34 | footer | |
6062e559 BA |
35 | .left-part |
36 | router-link.menuitem(to="/about") {{ st.tr["About"] }} | |
37 | router-link.menuitem(to="/faq") F.A.Q. | |
38 | p.menuitem.clickable(onClick="window.doClick('modalContact')") | |
39 | | {{ st.tr["Contact"] }} | |
40 | .right-part | |
41 | a.menuitem(href="https://discord.gg/a9ZFKBe") | |
15762165 | 42 | span Discord |
6062e559 BA |
43 | img.first(src="/images/icons/discord.svg") |
44 | a.menuitem(href="https://github.com/yagu0/vchess") | |
15762165 | 45 | span {{ st.tr["Code"] }} |
6062e559 | 46 | img(src="/images/icons/github.svg") |
15762165 | 47 | //a.menuitem(href="https://www.facebook.com/Variants-Chess-Club-112565840437886") |
6062e559 | 48 | img(src="/images/icons/facebook.svg") |
15762165 | 49 | //a.menuitem(href="https://twitter.com/VchessC") |
6062e559 | 50 | img(src="/images/icons/twitter.svg") |
625022fd BA |
51 | </template> |
52 | ||
98db2082 | 53 | <script> |
98db2082 | 54 | import ContactForm from "@/components/ContactForm.vue"; |
98db2082 | 55 | import Settings from "@/components/Settings.vue"; |
c66a829b | 56 | import UpsertUser from "@/components/UpsertUser.vue"; |
42a92848 | 57 | import { store } from "@/store.js"; |
d9a7a1e4 | 58 | import { ajax } from "@/utils/ajax.js"; |
98db2082 | 59 | export default { |
98db2082 BA |
60 | components: { |
61 | ContactForm, | |
98db2082 | 62 | Settings, |
6808d7a1 | 63 | UpsertUser |
c66a829b BA |
64 | }, |
65 | data: function() { | |
d9a7a1e4 BA |
66 | return { st: store.state }; |
67 | }, | |
2c5d7b20 BA |
68 | computed: { |
69 | userName: function() { | |
70 | return ( | |
71 | this.st.user.id > 0 | |
72 | ? (this.st.user.name || "@nonymous") | |
73 | : "Login" | |
74 | ); | |
75 | } | |
76 | }, | |
4f887105 BA |
77 | methods: { |
78 | hideDrawer: function(e) { | |
4f887105 BA |
79 | e.preventDefault(); //TODO: why is this needed? |
80 | document.getElementsByClassName("drawer")[0].checked = false; | |
6808d7a1 BA |
81 | } |
82 | } | |
98db2082 BA |
83 | }; |
84 | </script> | |
85 | ||
625022fd | 86 | <style lang="sass"> |
bc093771 BA |
87 | html, * |
88 | font-family: "Open Sans", Arial, sans-serif | |
b0a0468a BA |
89 | --a-link-color: darkred |
90 | --a-visited-color: darkred | |
5fbc0680 BA |
91 | --card-back-color: #f4f6f6 |
92 | --button-back-color: #d1d5d5 | |
956407c4 | 93 | --table-body-back-color: #f8f8f8 |
dcd68c41 BA |
94 | |
95 | body | |
96 | padding: 0 | |
97 | min-width: 320px | |
83c6c2c9 BA |
98 | --fore-color: #1c1e10 //#2c3e50 |
99 | //--back-color: #f2f2f2 | |
100 | background-image: radial-gradient(white, #e6e6ff) //lavender) | |
dcd68c41 | 101 | |
625022fd | 102 | #app |
625022fd BA |
103 | -webkit-font-smoothing: antialiased |
104 | -moz-osx-font-smoothing: grayscale | |
625022fd | 105 | |
85e5b5c1 | 106 | .container |
604b951e BA |
107 | // 45px is footer height |
108 | min-height: calc(100vh - 45px) | |
dcd68c41 | 109 | overflow: hidden |
bd76b456 BA |
110 | padding: 0 |
111 | margin: 0 | |
85e5b5c1 | 112 | |
fb54f098 BA |
113 | .row > div |
114 | padding: 0 | |
115 | ||
07052665 BA |
116 | a |
117 | text-decoration: underline | |
118 | ||
85e5b5c1 BA |
119 | header |
120 | width: 100% | |
121 | display: flex | |
122 | align-items: center | |
123 | justify-content: center | |
124 | margin: 0 auto | |
85e5b5c1 BA |
125 | |
126 | .clickable | |
127 | cursor: pointer | |
128 | ||
dcd68c41 BA |
129 | .text-center |
130 | text-align: center | |
131 | ||
a17ae317 BA |
132 | .bold |
133 | font-weight: bold | |
134 | ||
dcd68c41 BA |
135 | .clearer |
136 | clear: both | |
137 | ||
bd76b456 BA |
138 | .button-group |
139 | margin: 0 | |
140 | ||
141 | input[type="checkbox"]:focus | |
142 | outline: 0 | |
143 | ||
144 | input[type=checkbox]:checked:before | |
145 | top: -5px; | |
146 | height: 18px | |
147 | ||
148 | table | |
149 | display: block | |
150 | padding: 0 | |
151 | tr > td | |
152 | cursor: pointer | |
153 | th, td | |
154 | padding: 5px | |
155 | ||
5b3dc10e BA |
156 | #divSettings |
157 | padding: 0 10px 0 0 | |
158 | height: 100% | |
159 | & > span | |
8423b682 | 160 | padding-right: 5px |
5b3dc10e BA |
161 | vertical-align: middle |
162 | & > img | |
163 | padding: 0 | |
d81c26d1 | 164 | height: 1.2em |
5b3dc10e BA |
165 | vertical-align: middle |
166 | ||
bd76b456 BA |
167 | @media screen and (max-width: 767px) |
168 | table | |
169 | tr > th, td | |
170 | font-size: 14px | |
171 | ||
85e5b5c1 BA |
172 | nav |
173 | width: 100% | |
fb54f098 | 174 | margin: 0 |
85e5b5c1 BA |
175 | padding: 0 |
176 | & > #menuBar | |
177 | width: 100% | |
178 | padding: 0 | |
8c5f5390 BA |
179 | @media screen and (min-width: 768px) |
180 | & > #leftMenu | |
181 | padding: 0 | |
182 | width: 50% | |
183 | display: inline-flex | |
184 | align-items: center | |
185 | justify-content: flex-start | |
186 | & > a | |
187 | display: inline-block | |
07052665 | 188 | text-decoration: none |
8c5f5390 BA |
189 | color: #2c3e50 |
190 | &.router-link-exact-active | |
5fbc0680 | 191 | color: #388e3c |
8c5f5390 BA |
192 | & > #rightMenu |
193 | padding: 0 | |
194 | width: 50% | |
195 | display: inline-flex | |
196 | align-items: center | |
197 | justify-content: flex-end | |
198 | & > div | |
199 | display: inline-block | |
8c5f5390 BA |
200 | @media screen and (max-width: 767px) |
201 | & > #leftMenu | |
bd76b456 | 202 | margin-top: 42px |
8c5f5390 | 203 | padding-bottom: 5px |
26d8a01a BA |
204 | & > a |
205 | text-decoration: none | |
206 | color: #2c3e50 | |
207 | &.router-link-exact-active | |
5fbc0680 | 208 | color: #388e3c |
8c5f5390 BA |
209 | & > #rightMenu |
210 | padding-top: 5px | |
211 | border-top: 1px solid darkgrey | |
85e5b5c1 | 212 | |
430a2038 BA |
213 | @media screen and (max-width: 767px) |
214 | nav | |
bd76b456 | 215 | height: 42px |
430a2038 | 216 | border: none |
57c8c2a6 | 217 | & > label.drawer-toggle |
bd76b456 | 218 | cursor: pointer |
89021f18 | 219 | position: absolute |
57eb158f BA |
220 | top: 0 |
221 | left: 5px | |
222 | line-height: 42px | |
223 | height: 42px | |
b5aa30b5 | 224 | padding: 0 |
57eb158f BA |
225 | & > label.drawer-toggle:before |
226 | font-size: 42px | |
c6913dbc BA |
227 | & > #menuBar |
228 | z-index: 5000 //to hide currently selected piece if any | |
430a2038 | 229 | |
85e5b5c1 BA |
230 | [type="checkbox"].drawer+* |
231 | right: -767px | |
232 | ||
bd76b456 | 233 | [type=checkbox].drawer+* .drawer-close |
b5aa30b5 | 234 | top: 0 |
57eb158f | 235 | left: 5px |
b5aa30b5 | 236 | padding: 0 |
57eb158f BA |
237 | height: 50px |
238 | width: 50px | |
239 | line-height: 50px | |
bd76b456 BA |
240 | |
241 | [type=checkbox].drawer+* .drawer-close:before | |
242 | font-size: 50px | |
243 | ||
dcd68c41 BA |
244 | @media screen and (max-width: 767px) |
245 | .button-group | |
246 | flex-direction: row | |
247 | button:not(:first-child) | |
248 | border-left: 1px solid var(--button-group-border-color) | |
249 | border-top: 0 | |
250 | ||
85e5b5c1 | 251 | footer |
6062e559 BA |
252 | .left-part |
253 | display: inline-flex | |
254 | justify-content: flex-end | |
255 | width: 50% | |
256 | & > p | |
257 | display: inline-block | |
258 | margin: 0 12px | |
e20b2a44 | 259 | @media screen and (max-width: 500px) |
6062e559 BA |
260 | display: block |
261 | width: 100% | |
e20b2a44 | 262 | margin-bottom: 7px |
6062e559 BA |
263 | text-align: center |
264 | .right-part | |
265 | display: inline-flex | |
266 | justify-content: flex-start | |
267 | width: 50% | |
e20b2a44 | 268 | @media screen and (max-width: 500px) |
6062e559 BA |
269 | display: block |
270 | width: 100% | |
271 | text-align: center | |
604b951e | 272 | height: 45px |
5701c228 | 273 | border: 1px solid #ddd |
604b951e | 274 | box-sizing: border-box |
85e5b5c1 BA |
275 | //background-color: #000033 |
276 | font-size: 1rem | |
277 | width: 100% | |
604b951e | 278 | padding: 0 |
85e5b5c1 BA |
279 | display: inline-flex |
280 | align-items: center | |
6062e559 | 281 | & > .left-part > .router-link-exact-active |
5fbc0680 | 282 | color: #388e3c !important |
050ae3b5 | 283 | text-decoration: none |
6062e559 BA |
284 | footer .menuitem |
285 | margin: 0 12px | |
286 | display: inline-flex | |
287 | align-self: center | |
288 | &:link | |
289 | color: #2c3e50 | |
290 | text-decoration: none | |
291 | &:visited, &:hover | |
292 | color: #2c3e50 | |
293 | text-decoration: none | |
294 | footer > .right-part > a.menuitem > img | |
295 | height: 1.5em | |
296 | display: inline-block | |
297 | margin: 0 | |
298 | &.first | |
e20b2a44 | 299 | @media screen and (min-width: 501px) |
6062e559 | 300 | margin-left: 5px |
430a2038 BA |
301 | |
302 | @media screen and (max-width: 767px) | |
303 | footer | |
304 | border: none | |
89021f18 | 305 | |
e20b2a44 | 306 | @media screen and (max-width: 500px) |
4ec83d37 | 307 | .container |
e20b2a44 | 308 | min-height: calc(100vh - 67px) |
d9a7a1e4 | 309 | footer |
e20b2a44 | 310 | height: 67px |
d9a7a1e4 | 311 | display: block |
f14572c4 | 312 | padding: 5px 0 |
625022fd | 313 | </style> |