From d30fd3054c66d707a8210872b7db6cf4a1a98793 Mon Sep 17 00:00:00 2001 From: Mateja Date: Sat, 24 Jul 2021 18:58:17 +0200 Subject: Added boilerplate pages and `ProductCard` component. --- client/package-lock.json | 5 ++ client/package.json | 1 + client/src/App.vue | 14 +++- client/src/components/ExampleComponent.vue | 14 ---- client/src/components/ProductCard.vue | 20 ++++++ client/src/router/index.js | 34 ++++++--- client/src/views/Checkout.vue | 9 +++ client/src/views/ExamplePage.vue | 5 -- client/src/views/Home.vue | 11 +-- client/src/views/Login.vue | 77 ++++++++++++++++++++ client/src/views/Product.vue | 30 ++++++++ client/src/views/Register.vue | 111 +++++++++++++++++++++++++++++ 12 files changed, 299 insertions(+), 32 deletions(-) delete mode 100644 client/src/components/ExampleComponent.vue create mode 100644 client/src/components/ProductCard.vue create mode 100644 client/src/views/Checkout.vue delete mode 100644 client/src/views/ExamplePage.vue create mode 100644 client/src/views/Login.vue create mode 100644 client/src/views/Product.vue create mode 100644 client/src/views/Register.vue (limited to 'client') diff --git a/client/package-lock.json b/client/package-lock.json index b7fc6a8..24dc872 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -11229,6 +11229,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "validator": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.6.0.tgz", + "integrity": "sha512-gVgKbdbHgtxpRyR8K0O6oFZPhhB5tT1jeEHZR0Znr9Svg03U0+r9DXWMrnRAB+HtCStDQKlaIZm42tVsVjqtjg==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/client/package.json b/client/package.json index 0ed3938..17dc6f0 100644 --- a/client/package.json +++ b/client/package.json @@ -11,6 +11,7 @@ "@popperjs/core": "^2.9.2", "bootstrap": "^5.0.2", "core-js": "^3.6.5", + "validator": "^13.6.0", "vue": "^3.0.0", "vue-router": "^4.0.0-0", "vuex": "^4.0.0-0" diff --git a/client/src/App.vue b/client/src/App.vue index c8219c0..3a66a9e 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -10,7 +10,13 @@ Home + + @@ -21,4 +27,10 @@ + + diff --git a/client/src/components/ExampleComponent.vue b/client/src/components/ExampleComponent.vue deleted file mode 100644 index 5e207f9..0000000 --- a/client/src/components/ExampleComponent.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/client/src/components/ProductCard.vue b/client/src/components/ProductCard.vue new file mode 100644 index 0000000..57698e5 --- /dev/null +++ b/client/src/components/ProductCard.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/src/router/index.js b/client/src/router/index.js index 22d739e..eee610c 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -1,6 +1,9 @@ import {createRouter, createWebHistory} from 'vue-router'; -import Home from '../views/Home.vue'; -import ExamplePage from '../views/ExamplePage.vue'; +import Home from '@/views/Home.vue'; +import Product from '@/views/Product.vue'; +import Checkout from '@/views/Checkout.vue'; +import Login from '@/views/Login.vue'; +import Register from '@/views/Register.vue'; const routes = [ { @@ -9,15 +12,30 @@ const routes = [ component: Home }, { - path: '/example', - name: 'Example', - component: ExamplePage + path: '/product/:id', + name: 'Product', + component: Product + }, + { + path: '/checkout', + name: 'Checkout', + component: Checkout + }, + { + path: '/login', + name: 'Login', + component: Login + }, + { + path: '/register', + name: 'Register', + component: Register } -] +]; const router = createRouter({ history: createWebHistory(process.env.BASE_URL), routes -}) +}); -export default router +export default router; diff --git a/client/src/views/Checkout.vue b/client/src/views/Checkout.vue new file mode 100644 index 0000000..42523ca --- /dev/null +++ b/client/src/views/Checkout.vue @@ -0,0 +1,9 @@ + + + diff --git a/client/src/views/ExamplePage.vue b/client/src/views/ExamplePage.vue deleted file mode 100644 index 1cb803e..0000000 --- a/client/src/views/ExamplePage.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue index 77ed4e4..3e89885 100644 --- a/client/src/views/Home.vue +++ b/client/src/views/Home.vue @@ -1,15 +1,18 @@ diff --git a/client/src/views/Login.vue b/client/src/views/Login.vue new file mode 100644 index 0000000..8789a5e --- /dev/null +++ b/client/src/views/Login.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/client/src/views/Product.vue b/client/src/views/Product.vue new file mode 100644 index 0000000..e03c900 --- /dev/null +++ b/client/src/views/Product.vue @@ -0,0 +1,30 @@ + + + diff --git a/client/src/views/Register.vue b/client/src/views/Register.vue new file mode 100644 index 0000000..e1679de --- /dev/null +++ b/client/src/views/Register.vue @@ -0,0 +1,111 @@ + + + + + -- cgit v1.2.3