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