From 8d0fe5788a6fd26583dc08fdd23a1e532be65416 Mon Sep 17 00:00:00 2001 From: Anatoly Kopyl Date: Sun, 28 Mar 2021 15:51:48 +0300 Subject: [PATCH] =?UTF-8?q?:art:=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B8=D0=BB=20=D0=BF=D0=BE=D0=BB=D0=B5=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B1=D0=BE=D1=80=D0=B0=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82?= =?UTF-8?q?=D0=B0=20=D0=B2=20=D1=81=D0=B2=D0=BE=D0=B9=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.example | 1 + frontend/src/App.vue | 11 +++- frontend/src/components/Game.vue | 102 +++++++++++++++++------------ frontend/src/components/List.vue | 41 ++++++++++++ frontend/src/components/Login.vue | 3 +- frontend/src/components/Result.vue | 32 +++++++++ 6 files changed, 144 insertions(+), 46 deletions(-) create mode 100644 frontend/src/components/List.vue create mode 100644 frontend/src/components/Result.vue diff --git a/frontend/.env.example b/frontend/.env.example index 34b2230..41695f0 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -1 +1,2 @@ +VUE_APP_BACKEND=Адрес бэкенда VUE_APP_QUESTION=Вопрос для страницы авторизации \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index e64a3f1..d1ffd33 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,5 +1,5 @@ @@ -43,11 +43,11 @@ body { } #game { - margin: auto; margin-bottom: 100px; } .correct { + color: black; background-color: rgb(124, 230, 124) !important; } .highlight_correct { @@ -56,4 +56,11 @@ body { .wrong { background-color: rgb(255, 71, 71) !important; } + +@media only screen and (max-width: 520) { + h1 { + display: none; + font-size: 10px; + } +} diff --git a/frontend/src/components/Game.vue b/frontend/src/components/Game.vue index e4a7d26..3a2b92e 100644 --- a/frontend/src/components/Game.vue +++ b/frontend/src/components/Game.vue @@ -1,50 +1,67 @@ + + \ No newline at end of file diff --git a/frontend/src/components/Login.vue b/frontend/src/components/Login.vue index 1d89d9b..3ec8879 100644 --- a/frontend/src/components/Login.vue +++ b/frontend/src/components/Login.vue @@ -23,7 +23,7 @@ export default { methods: { login: function() { axios - .post('http://localhost:3000/auth', { + .post(process.env.VUE_APP_BACKEND + '/auth', { "pass": this.answer, }) .then(response => { @@ -34,7 +34,6 @@ export default { }, mounted() { this.question = process.env.VUE_APP_QUESTION - this.login() } } diff --git a/frontend/src/components/Result.vue b/frontend/src/components/Result.vue new file mode 100644 index 0000000..aaf7ba3 --- /dev/null +++ b/frontend/src/components/Result.vue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file