From fc98c9746d3bc14246cae42c812812f4969df89f Mon Sep 17 00:00:00 2001 From: Christian Kauer Date: Wed, 3 Jan 2024 16:44:17 +0100 Subject: [PATCH] end of section 4 --- assets/cars.json | 32 +++++++++++++++ components/Car/Card.vue | 37 +++++++++++------- components/Car/Cards.vue | 6 ++- components/Car/Detail/Attributes.vue | 16 ++++++-- components/Car/Detail/Description.vue | 10 ++++- components/Car/Detail/Hero.vue | 35 ++++++++++------- components/Car/Hero.vue | 6 ++- components/Car/SideBar.vue | 56 +++++++++++++++++++++------ composables/useCars.ts | 7 ++++ composables/useTest.ts | 3 -- error.vue | 22 +++++++++++ pages/car/[name]-[id].vue | 26 ++++++++++--- pages/city/[city]/car.vue | 14 ++++++- 13 files changed, 215 insertions(+), 55 deletions(-) create mode 100644 assets/cars.json create mode 100644 composables/useCars.ts delete mode 100644 composables/useTest.ts create mode 100644 error.vue diff --git a/assets/cars.json b/assets/cars.json new file mode 100644 index 0000000..b120374 --- /dev/null +++ b/assets/cars.json @@ -0,0 +1,32 @@ +[ + { + "id": 1, + "name": "Range Rover Sport", + "price": "84,777", + "url": "https://www.carhelpcanada.com/wp-content/uploads/2019/12/2020-Range-Rover-Evoque-2.jpg", + "seats": 5, + "miles": "14,666", + "features": ["No Accidents", "Low KM", "Vehicle Detailed", "Leather Interior"], + "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Debitis odio et laboriosam!" + }, + { + "id": 2, + "name": "Rolls Royce Ghost", + "price": "455,000", + "url": "https://robbreport.com/wp-content/uploads/2021/03/1-5.jpg?w=1000", + "seats": 5, + "miles": "53,666", + "features": ["No Accidents", "Low KM", "Vehicle Detailed", "Leather Interior"], + "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Debitis odio et laboriosam! Numquam ut rem, blanditiis est rerum tenetur maxime delectus" + }, + { + "id": 4, + "name": "Porsche Taycan", + "price": "180,434", + "url": "https://www.topgear.com/sites/default/files/cars-car/carousel/2021/02/pcgb20_1441_fine.jpg", + "seats": 5, + "miles": "0", + "features": ["No Accidents", "Low KM", "Vehicle Detailed", "Leather Interior"], + "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Debitis odio et" + } + ] \ No newline at end of file diff --git a/components/Car/Card.vue b/components/Car/Card.vue index b6db33f..c71faf0 100644 --- a/components/Car/Card.vue +++ b/components/Car/Card.vue @@ -1,16 +1,27 @@ + + \ No newline at end of file diff --git a/components/Car/Cards.vue b/components/Car/Cards.vue index a472e49..82926ab 100644 --- a/components/Car/Cards.vue +++ b/components/Car/Cards.vue @@ -1,5 +1,9 @@ + + \ No newline at end of file diff --git a/components/Car/Detail/Attributes.vue b/components/Car/Detail/Attributes.vue index 038e538..11bd8b8 100644 --- a/components/Car/Detail/Attributes.vue +++ b/components/Car/Detail/Attributes.vue @@ -1,8 +1,16 @@ + + + \ No newline at end of file diff --git a/components/Car/Detail/Description.vue b/components/Car/Detail/Description.vue index 2e6d62b..66581ae 100644 --- a/components/Car/Detail/Description.vue +++ b/components/Car/Detail/Description.vue @@ -1,5 +1,13 @@ + + + \ No newline at end of file diff --git a/components/Car/Detail/Hero.vue b/components/Car/Detail/Hero.vue index d5f3952..3ca4c0f 100644 --- a/components/Car/Detail/Hero.vue +++ b/components/Car/Detail/Hero.vue @@ -1,19 +1,26 @@ + + \ No newline at end of file diff --git a/components/Car/Hero.vue b/components/Car/Hero.vue index f47b668..5428f8a 100644 --- a/components/Car/Hero.vue +++ b/components/Car/Hero.vue @@ -1,3 +1,7 @@ + + \ No newline at end of file diff --git a/components/Car/SideBar.vue b/components/Car/SideBar.vue index b508cd1..cf5c4a2 100644 --- a/components/Car/SideBar.vue +++ b/components/Car/SideBar.vue @@ -1,29 +1,63 @@ + +