diff --git a/src/assets/default-product.png b/src/assets/default-product.png new file mode 100644 index 0000000000000000000000000000000000000000..249ee6900c829ba4c718841bc0aa48f62d34f5b8 Binary files /dev/null and b/src/assets/default-product.png differ diff --git a/src/components/ItemCard.vue b/src/components/ItemCard.vue index 083f3e2e23e4d23f1bfedf877810545f910bd1ca..59aaf0f74874d33c0e92e7c7bfc25d22accee15f 100644 --- a/src/components/ItemCard.vue +++ b/src/components/ItemCard.vue @@ -1,13 +1,32 @@ <template> + <v-card max-width="40%" class="text-left ma-5 pa-2"> + <v-img + class="rounded-5" + :src="item.img || require('../assets/default-product.png')" + ></v-img> + <v-card-subtitle>{{ item.adresse }}</v-card-subtitle> + + <v-card-text class="font-weight-bold mb-n3 mt-n3"> + {{ item.title }} + </v-card-text> + + <v-card-subtitle>{{ item.price }}</v-card-subtitle> + </v-card> </template> <script> export default { - name: "ItemCard.vue" -} + name: "ItemCard.vue", + data() { + return { + item: { + img: "", + adresse: "adresse", + title: "Tittel", + price: "pris kr", + }, + }; + }, +}; </script> - -<style scoped> - -</style> diff --git a/src/router/index.js b/src/router/index.js index f2ed75ce0d0662a728e0f8b69d4f830e51626ef9..55cb6dc39c3260bc2e8422593dd23e472226da54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,6 @@ import { createRouter, createWebHistory } from "vue-router"; import HomeView from "../views/HomeView.vue"; import LoginView from "../views/LoginView.vue"; - const routes = [ { path: "/endre", //Endre før push @@ -19,15 +18,14 @@ const routes = [ import(/* webpackChunkName: "about" */ "../views/AboutView.vue"), }, { - path: "/login", + path: "/", name: "login", component: LoginView, }, { path: "/item-card", name: "itemView", - component: () => - import("../views/ItemCardView.vue"), + component: () => import("../views/ItemCardView.vue"), }, ]; diff --git a/src/views/ItemCardView.vue b/src/views/ItemCardView.vue index f55c8408c6824bab3d63edd84b4e6fb835eb83fd..2c37af8fb93eab5724f720c29b70ce4ceec677d9 100644 --- a/src/views/ItemCardView.vue +++ b/src/views/ItemCardView.vue @@ -1,5 +1,5 @@ <template> - + <ItemCard></ItemCard> </template> <script> @@ -9,9 +9,7 @@ export default { components: { ItemCard, }, -} +}; </script> -<style scoped> - -</style> +<style scoped></style>