Skip to content

Commit 0666ecd

Browse files
authored
Merge pull request #135 from pauldotyu/main
feat: adding ai generated product images
2 parents d07ec3f + b2fb83c commit 0666ecd

34 files changed

+148
-115
lines changed

src/product-service/src/data.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,70 +8,70 @@ pub fn fetch_products(_settings: &Settings) -> Vec<Product> {
88
name: "Contoso Catnip's Friend".to_string(),
99
price: 9.99,
1010
description: "Watch your feline friend embark on a fishing adventure with Contoso Catnip's Friend toy. Packed with irresistible catnip and dangling fish lure.".to_string(),
11-
image: "/placeholder.png".to_string()
11+
image: "/catnip.jpg".to_string()
1212
},
1313
Product {
1414
id: 2,
1515
name: "Salty Sailor's Squeaky Squid".to_string(),
1616
price: 6.99,
1717
description: "Let your dog set sail with the Salty Sailor's Squeaky Squid. This interactive toy provides hours of fun, featuring multiple squeakers and crinkle tentacles.".to_string(),
18-
image: "/placeholder.png".to_string()
18+
image: "/squid.jpg".to_string()
1919
},
2020
Product {
2121
id: 3,
2222
name: "Mermaid's Mice Trio".to_string(),
2323
price: 12.99,
2424
description: "Entertain your kitty with the Mermaid's Mice Trio. These adorable plush mice are dressed as mermaids and filled with catnip to captivate their curiosity.".to_string(),
25-
image: "/placeholder.png".to_string()
25+
image: "/mermaid.jpg".to_string()
2626
},
2727
Product {
2828
id: 4,
2929
name: "Ocean Explorer's Puzzle Ball".to_string(),
3030
price: 11.99,
3131
description: "Challenge your pet's problem-solving skills with the Ocean Explorer's Puzzle Ball. This interactive toy features hidden compartments and treats, providing mental stimulation and entertainment.".to_string(),
32-
image: "/placeholder.png".to_string()
32+
image: "/ocean.jpg".to_string()
3333
},
3434
Product {
3535
id: 5,
3636
name: "Pirate Parrot Teaser Wand".to_string(),
3737
price: 8.99,
3838
description: "Engage your cat in a playful pursuit with the Pirate Parrot Teaser Wand. The colorful feathers and jingling bells mimic the mischievous charm of a pirate's parrot.".to_string(),
39-
image: "/placeholder.png".to_string()
39+
image: "/pirate.jpg".to_string()
4040
},
4141
Product {
4242
id: 6,
4343
name: "Seafarer's Tug Rope".to_string(),
4444
price: 14.99,
4545
description: "Tug-of-war meets nautical adventure with the Seafarer's Tug Rope. Made from marine-grade rope, it's perfect for interactive play and promoting dental health in dogs.".to_string(),
46-
image: "/placeholder.png".to_string()
46+
image: "/tug.jpg".to_string()
4747
},
4848
Product {
4949
id: 7,
5050
name: "Seashell Snuggle Bed".to_string(),
5151
price: 19.99,
5252
description: "Give your furry friend a cozy spot to curl up with the Seashell Snuggle Bed. Shaped like a seashell, this plush bed provides comfort and relaxation for cats and small dogs.".to_string(),
53-
image: "/placeholder.png".to_string()
53+
image: "/bed.jpg".to_string()
5454
},
5555
Product {
5656
id: 8,
5757
name: "Nautical Knot Ball".to_string(),
5858
price: 7.99,
5959
description: "Unleash your dog's inner sailor with the Nautical Knot Ball. Made from sturdy ropes, it's perfect for fetching, tugging, and satisfying their chewing needs.".to_string(),
60-
image: "/placeholder.png".to_string()
60+
image: "/knot.jpg".to_string()
6161
},
6262
Product {
6363
id: 9,
6464
name: "Contoso Claw's Crabby Cat Toy".to_string(),
6565
price: 3.99,
6666
description: "Watch your cat go crazy for Contoso Claw's Crabby Cat Toy. This crinkly and catnip-filled toy will awaken their hunting instincts and provide endless entertainment.".to_string(),
67-
image: "/placeholder.png".to_string()
67+
image: "/crabby.jpg".to_string()
6868
},
6969
Product {
7070
id: 10,
7171
name: "Ahoy Doggy Life Jacket".to_string(),
7272
price: 5.99,
7373
description: "Ensure your furry friend stays safe during water adventures with the Ahoy Doggy Life Jacket. Designed for dogs, this flotation device offers buoyancy and visibility in style.".to_string(),
74-
image: "/placeholder.png".to_string()
74+
image: "/lifejacket.jpg".to_string()
7575
}
7676
]
7777
}

src/store-admin/public/bed.jpg

143 KB
Loading

src/store-admin/public/catnip.jpg

127 KB
Loading
Loading
Loading

src/store-admin/public/crabby.jpg

154 KB
Loading

src/store-admin/public/knot.jpg

144 KB
Loading

src/store-admin/public/lifejacket.jpg

175 KB
Loading

src/store-admin/public/mermaid.jpg

181 KB
Loading

src/store-admin/public/ocean.jpg

121 KB
Loading

src/store-admin/public/pirate.jpg

160 KB
Loading

src/store-admin/public/squid.jpg

123 KB
Loading

src/store-admin/public/tug.jpg

156 KB
Loading

src/store-admin/src/App.vue

+12-20
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,8 @@ export default {
122122
-moz-osx-font-smoothing: grayscale;
123123
text-align: center;
124124
color: #2c3e50;
125-
margin-top: 60px;
126-
}
127-
</style>
128-
129-
130-
<style>
131-
#app {
132-
font-family: Avenir, Helvetica, Arial, sans-serif;
133-
-webkit-font-smoothing: antialiased;
134-
-moz-osx-font-smoothing: grayscale;
135-
text-align: center;
136-
color: #2c3e50;
137-
margin-top: 60px;
125+
margin-top: 120px;
126+
padding: 1rem;
138127
}
139128
140129
footer {
@@ -187,18 +176,17 @@ td {
187176
text-align: left;
188177
}
189178
190-
.button {
191-
padding: 10px 10px;
192-
border-radius: 5px;
193-
border: none;
194-
background-color: #007acc;
179+
button {
180+
padding: 10px;
181+
background-color: #005f8b;
195182
color: #fff;
196183
border: none;
197184
border-radius: 5px;
198185
cursor: pointer;
186+
height: 42px;
199187
}
200188
201-
.button:hover {
189+
button:hover {
202190
background-color: #005f8b;
203191
}
204192
@@ -207,8 +195,12 @@ td {
207195
}
208196
209197
.product-detail {
210-
margin: 2rem auto;
211198
text-align: left;
199+
display: flex;
200+
align-items: flex-start;
201+
justify-content: center;
202+
gap: 1rem;
203+
margin: 2rem auto;
212204
}
213205
214206
.product-form {

src/store-admin/src/components/OrderDetail.vue

-5
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ a {
116116
text-decoration: underline;
117117
}
118118
119-
.order-header {
120-
margin: 0.5rem;
121-
}
122-
123119
.order-detail {
124-
margin: 2rem auto;
125120
text-align: left;
126121
}
127122
</style>

src/store-admin/src/components/OrderList.vue

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ a {
5757
}
5858
5959
.order-list {
60-
margin: 2rem auto;
6160
text-align: left;
6261
}
6362
</style>

src/store-admin/src/components/ProductDetail.vue

+6-8
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ a {
4141
text-decoration: underline;
4242
}
4343
44-
.product-detail {
45-
display: flex;
46-
align-items: flex-start;
47-
justify-content: center;
48-
gap: 1rem;
49-
margin: 1rem;
50-
}
51-
5244
.product-image {
5345
flex: 1;
5446
margin-right: 20px;
@@ -73,4 +65,10 @@ a {
7365
font-size: 16px;
7466
margin-bottom: 20px;
7567
}
68+
69+
@media (max-width: 768px) {
70+
.product-detail {
71+
flex-direction: column;
72+
}
73+
}
7674
</style>

src/store-admin/src/components/ProductList.vue

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ a {
4141
}
4242
4343
.product-list {
44-
margin: 2rem auto;
4544
text-align: left;
4645
}
4746
</style>

src/store-admin/src/components/TopNav.vue

+31-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
<template>
22
<nav>
33
<div class="logo">
4-
<a href="/">Contoso Pet Supplies - Admin Portal</a>
4+
<a href="/">
5+
<img src="/contoso-pet-store-logo.png" alt="Contoso Pet Store Logo">
6+
</a>
7+
Admin Portal
58
</div>
6-
<button class="hamburger" @click="toggleNav">
7-
<span class="hamburger-icon"></span>
8-
</button>
99
<ul class="nav-links" :class="{ 'nav-links--open': isNavOpen }">
1010
<li><router-link to="/orders" @click="closeNav">Orders</router-link></li>
1111
<li><router-link to="/products" @click="closeNav">Products</router-link></li>
1212
</ul>
13+
<button class="hamburger" @click="toggleNav">
14+
<span class="hamburger-icon"></span>
15+
</button>
1316
</nav>
1417
</template>
1518

@@ -39,11 +42,33 @@ nav {
3942
align-items: center;
4043
background-color: #333;
4144
color: #fff;
42-
padding: 1rem;
45+
padding-top: 0.5rem;
46+
padding-left: 1rem;
47+
padding-right: 1rem;
48+
padding-bottom: 0.25rem;
4349
position: fixed;
4450
top: 0;
4551
left: 0;
4652
right: 0;
53+
font-size: 1.5rem;
54+
font-weight: bold;
55+
}
56+
57+
nav img {
58+
padding-right: 15px;
59+
width: 100px;
60+
height: auto;
61+
align-self: center;
62+
}
63+
64+
.nav-links {
65+
display: flex;
66+
list-style: none;
67+
}
68+
69+
.logo {
70+
display: flex;
71+
align-items: center;
4772
}
4873
4974
.hamburger {
@@ -53,6 +78,7 @@ nav {
5378
cursor: pointer;
5479
padding: 0;
5580
margin: 0;
81+
margin-top: -40px;
5682
}
5783
5884
.hamburger-icon {

src/store-front/public/bed.jpg

143 KB
Loading

src/store-front/public/catnip.jpg

127 KB
Loading
Loading
Loading

src/store-front/public/crabby.jpg

154 KB
Loading

src/store-front/public/knot.jpg

144 KB
Loading

src/store-front/public/lifejacket.jpg

175 KB
Loading

src/store-front/public/mermaid.jpg

181 KB
Loading

src/store-front/public/ocean.jpg

121 KB
Loading

src/store-front/public/pirate.jpg

160 KB
Loading

src/store-front/public/squid.jpg

123 KB
Loading

src/store-front/public/tug.jpg

156 KB
Loading

src/store-front/src/App.vue

+22-62
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default {
114114
-moz-osx-font-smoothing: grayscale;
115115
text-align: center;
116116
color: #2c3e50;
117-
margin-top: 60px;
117+
margin-top: 120px;
118118
}
119119
120120
footer {
@@ -150,10 +150,19 @@ a {
150150
text-decoration: none;
151151
}
152152
153+
button {
154+
padding: 10px;
155+
background-color: #005f8b;
156+
color: #fff;
157+
border: none;
158+
border-radius: 5px;
159+
cursor: pointer;
160+
height: 42px;
161+
}
162+
153163
.product-list {
154164
display: grid;
155165
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
156-
157166
}
158167
159168
.product-card {
@@ -186,53 +195,6 @@ a {
186195
margin-bottom: 1rem;
187196
}
188197
189-
.product-price {
190-
font-weight: bold;
191-
font-size: 1.2rem;
192-
}
193-
194-
.quantity-input {
195-
width: 50px;
196-
height: 30px;
197-
border: 1px solid #ccc;
198-
border-radius: 5px;
199-
padding: 5px;
200-
margin-right: 10px;
201-
}
202-
203-
.product-detail {
204-
display: flex;
205-
align-items: flex-start;
206-
justify-content: center;
207-
gap: 1rem;
208-
margin: 1rem;
209-
}
210-
211-
.product-image {
212-
flex: 1;
213-
margin-right: 20px;
214-
}
215-
216-
.product-image img {
217-
width: 100%;
218-
height: auto;
219-
}
220-
221-
.product-info {
222-
flex: 1;
223-
text-align: left;
224-
}
225-
226-
.product-info h2 {
227-
font-size: 24px;
228-
margin-bottom: 10px;
229-
}
230-
231-
.product-info p {
232-
font-size: 16px;
233-
margin-bottom: 20px;
234-
}
235-
236198
.product-controls {
237199
display: flex;
238200
align-items: center;
@@ -243,29 +205,28 @@ a {
243205
margin-right: 20px;
244206
}
245207
246-
.product-controls button {
247-
padding: 10px;
208+
.product-controls button:hover {
248209
background-color: #005f8b;
249-
color: #fff;
250-
border: none;
251-
border-radius: 5px;
252-
cursor: pointer;
253210
}
254211
255-
.product-controls button:hover {
256-
background-color: #005f8b;
212+
.product-price {
213+
font-weight: bold;
214+
font-size: 1.2rem;
257215
}
258216
259-
/* make image the width of the container */
260-
.product-detail img {
261-
width: 100%;
217+
.quantity-input {
218+
width: 50px;
219+
height: 30px;
220+
border: 1px solid #ccc;
221+
border-radius: 5px;
222+
padding: 5px;
223+
margin-right: 10px;
262224
}
263225
264226
.shopping-cart {
265227
display: flex;
266228
flex-direction: column;
267229
align-items: center;
268-
margin-top: 50px;
269230
}
270231
271232
.shopping-cart h2 {
@@ -276,7 +237,6 @@ a {
276237
.shopping-cart-table {
277238
width: 100%;
278239
border-collapse: collapse;
279-
margin-top: 20px;
280240
}
281241
282242
.shopping-cart-table th,

0 commit comments

Comments
 (0)