From f0f10e4bed0d0a015d2f7d14460d7905dc2349eb Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Wed, 19 Oct 2022 20:53:16 +0300 Subject: [PATCH] small fixes, score counter --- src/components/GameField.vue | 11 +++++++---- src/components/ScoreDisplay.vue | 7 +++++++ src/style.scss | 10 +++++++++- vite.config.ts | 9 +++++---- 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 src/components/ScoreDisplay.vue diff --git a/src/components/GameField.vue b/src/components/GameField.vue index 318669a..0b997be 100644 --- a/src/components/GameField.vue +++ b/src/components/GameField.vue @@ -12,6 +12,7 @@ + {{ victory ? 'You won!' : 'Game over.' }} @@ -19,13 +20,14 @@ diff --git a/src/style.scss b/src/style.scss index 900273e..c551a9f 100644 --- a/src/style.scss +++ b/src/style.scss @@ -39,9 +39,17 @@ body { .game { background-color: #ddd; position: relative; - overflow: hidden; margin: auto; + &-field { + overflow: hidden; + } + + &-score { + position: absolute; + bottom: -1.5rem; + } + &-pointer { position: absolute; width: 100px; diff --git a/vite.config.ts b/vite.config.ts index 315212d..11d1e94 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,8 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()] -}) + plugins: [vue()], + base: '', +});