diff --git a/package.json b/package.json index 3ca0493..959a046 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,9 @@ "register-service-worker": "^1.6.2", "vue": "^2.6.10", "vue-class-component": "^7.0.2", - "vue-property-decorator": "^8.1.0" + "vue-property-decorator": "^8.1.0", + "vuex": "^3.0.1", + "vuex-class": "^0.3.2" }, "devDependencies": { "@vue/cli-plugin-babel": "^3.9.0", diff --git a/src/App.vue b/src/App.vue index 3835e3d..1001237 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,29 +1,65 @@ + + - - + diff --git a/src/assets/fonts/Bungee-400-latin-ext2.woff2 b/src/assets/fonts/Bungee-400-latin-ext2.woff2 new file mode 100644 index 0000000..52bd87c Binary files /dev/null and b/src/assets/fonts/Bungee-400-latin-ext2.woff2 differ diff --git a/src/assets/fonts/Bungee-400-latin3.woff2 b/src/assets/fonts/Bungee-400-latin3.woff2 new file mode 100644 index 0000000..33ffa2a Binary files /dev/null and b/src/assets/fonts/Bungee-400-latin3.woff2 differ diff --git a/src/assets/fonts/Bungee-400-vietnamese1.woff2 b/src/assets/fonts/Bungee-400-vietnamese1.woff2 new file mode 100644 index 0000000..205f9e3 Binary files /dev/null and b/src/assets/fonts/Bungee-400-vietnamese1.woff2 differ diff --git a/src/assets/fonts/Londrina_Solid-100-latin1.woff2 b/src/assets/fonts/Londrina_Solid-100-latin1.woff2 new file mode 100644 index 0000000..f3e7f67 Binary files /dev/null and b/src/assets/fonts/Londrina_Solid-100-latin1.woff2 differ diff --git a/src/assets/fonts/Londrina_Solid-300-latin2.woff2 b/src/assets/fonts/Londrina_Solid-300-latin2.woff2 new file mode 100644 index 0000000..c239f61 Binary files /dev/null and b/src/assets/fonts/Londrina_Solid-300-latin2.woff2 differ diff --git a/src/assets/fonts/Londrina_Solid-400-latin3.woff2 b/src/assets/fonts/Londrina_Solid-400-latin3.woff2 new file mode 100644 index 0000000..f480ebb Binary files /dev/null and b/src/assets/fonts/Londrina_Solid-400-latin3.woff2 differ diff --git a/src/assets/fonts/fonts.css b/src/assets/fonts/fonts.css new file mode 100644 index 0000000..c12ad2b --- /dev/null +++ b/src/assets/fonts/fonts.css @@ -0,0 +1,53 @@ +/* latin */ +@font-face { + font-family: 'Londrina Solid'; + font-style: normal; + font-weight: 100; + src: local('Londrina Solid Thin'), local('LondrinaSolid-Thin'), url('./Londrina_Solid-100-latin1.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Londrina Solid'; + font-style: normal; + font-weight: 300; + src: local('Londrina Solid Light'), local('LondrinaSolid-Light'), url('./Londrina_Solid-300-latin2.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Londrina Solid'; + font-style: normal; + font-weight: 400; + src: local('Londrina Solid Regular'), local('LondrinaSolid-Regular'), url('./Londrina_Solid-400-latin3.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* vietnamese */ +@font-face { + font-family: 'Bungee'; + font-style: normal; + font-weight: 400; + src: local('Bungee'), local('Bungee-Regular'), url('./Bungee-400-vietnamese1.woff2') format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-family: 'Bungee'; + font-style: normal; + font-weight: 400; + src: local('Bungee'), local('Bungee-Regular'), url('./Bungee-400-latin-ext2.woff2') format('woff2'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-family: 'Bungee'; + font-style: normal; + font-weight: 400; + src: local('Bungee'), local('Bungee-Regular'), url('./Bungee-400-latin3.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} \ No newline at end of file diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index f3d2503..0000000 Binary files a/src/assets/logo.png and /dev/null differ diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index 89f1727..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - diff --git a/src/components/PlayerArea.vue b/src/components/PlayerArea.vue new file mode 100644 index 0000000..d33246c --- /dev/null +++ b/src/components/PlayerArea.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/components/TouchArea.vue b/src/components/TouchArea.vue new file mode 100644 index 0000000..f8e3f0b --- /dev/null +++ b/src/components/TouchArea.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/src/main.ts b/src/main.ts index 2fbd299..e1f81c6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,11 @@ import Vue from "vue"; import App from "./App.vue"; import "./registerServiceWorker"; +import store from "./store"; Vue.config.productionTip = false; new Vue({ + store, render: h => h(App) }).$mount("#app"); diff --git a/src/store.ts b/src/store.ts new file mode 100644 index 0000000..e0bc074 --- /dev/null +++ b/src/store.ts @@ -0,0 +1,27 @@ +import Vue from "vue"; +import Vuex, { MutationTree, ActionTree, GetterTree } from "vuex"; +import { AppState } from "./types"; + +Vue.use(Vuex); + +const state: AppState = { + players: [ + { name: "Player 1", points: 0, at: 0 }, + { name: "Player 2", points: 0, at: 0 } + ] +}; + +const mutations: MutationTree = {}; + +const actions: ActionTree = {}; + +const getters: GetterTree = { + players: state => state.players +}; + +export default new Vuex.Store({ + state, + mutations, + actions, + getters +}); diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..5ed8e07 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,9 @@ +export interface AppState { + players: Player[]; +} + +export interface Player { + name: string; + points: number; + at: number; +} diff --git a/yarn.lock b/yarn.lock index b209583..ab0784a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8645,6 +8645,16 @@ vue@^2.6.10: resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637" integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ== +vuex-class@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/vuex-class/-/vuex-class-0.3.2.tgz#c7e96a076c1682137d4d23a8dcfdc63f220e17a8" + integrity sha512-m0w7/FMsNcwJgunJeM+wcNaHzK2KX1K1rw2WUQf7Q16ndXHo7pflRyOV/E8795JO/7fstyjH3EgqBI4h4n4qXQ== + +vuex@^3.0.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.1.1.tgz#0c264bfe30cdbccf96ab9db3177d211828a5910e" + integrity sha512-ER5moSbLZuNSMBFnEBVGhQ1uCBNJslH9W/Dw2W7GZN23UQA69uapP5GTT9Vm8Trc0PzBSVt6LzF3hGjmv41xcg== + watchpack@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"