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/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 +++++++++++++++++++++++++++++ 10 files changed, 293 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/src') 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