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