This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="products-box container"> | |
| <h2>Our Products</h2> | |
| <router-link :to="{name : 'AddProduct'}"> | |
| <button type="button" class="btn btn-success add-btn btn-lg">Add a new Product</button> | |
| </router-link> | |
| <div v-for="product of products" :key="product.id"> | |
| <ProductBox :product="product"> | |
| </ProductBox> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <Navbar/> | |
| <router-view :baseURL="baseURL" :products="products" :categories="categories"></router-view> | |
| <Footer v-show="this.$route.name != 'Home'" /> | |
| </template> | |
| <script> | |
| import Navbar from "./components/Navbar.vue" | |
| import Footer from "./components/Footer.vue" | |
| export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createRouter, createWebHistory } from 'vue-router' | |
| import Home from '../views/Home.vue' | |
| import Product from '../views/Product/Product.vue' | |
| import AddProduct from '../views/Product/AddProduct.vue' | |
| import EditProduct from '../views/Product/EditProduct.vue' | |
| import Category from '../views/Category/Category.vue' | |
| import AddCategory from '../views/Category/AddCategory.vue' | |
| import EditCategory from '../views/Category/EditCategory.vue' | |
| const routes = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html, body { | |
| font-family: 'Lato', 'Arial', sans-serif; | |
| font-weight: 500; | |
| } | |
| #heading{ | |
| text-align: center; | |
| font-family: 'Courgette', cursive; | |
| font-size: 100; | |
| color: rgb(218, 216, 212); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Webtutsplus Market</title> | |
| <!-- The Vue 3.0.2 CDN --> | |
| <script src="https://unpkg.com/vue@3.0.2"></script> | |
| <!-- Bootstrap 4 CDN --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
| <!-- Google fonts --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const baseURL = "http://remotedevs.org:8080/api/" | |
| const urlGetProduct = baseURL + "product/"; | |
| const urlUpdateProduct = baseURL + "product/update/"; | |
| const urlAddProduct = baseURL + "product/add" | |
| const app = Vue.createApp({ | |
| data() { | |
| //data fields | |
| return { | |
| products : null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Webtutsplus Market</title> | |
| <!-- The Vue 3.0.2 CDN --> | |
| <script src="https://unpkg.com/vue@3.0.2"></script> | |
| <!-- Bootstrap 4 CDN --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
| <!-- Google fonts --> |
NewerOlder