File tree Expand file tree Collapse file tree 9 files changed +2908
-1003
lines changed Expand file tree Collapse file tree 9 files changed +2908
-1003
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" card text-center" >
3
- <img :src =" recipe.image" alt =" recipe thumb" class =" thumb" />
4
- <p class =" font-bold text-gray-500 truncate" >{{ recipe.name }}</p >
2
+ <div class =" card text-center flex-wrap" >
3
+ <img :src =" recipe.image" alt =" recipe thumb" class =" thumb pb-2" />
4
+ <p class =" font-bold text-gray-700 truncate text-start" >
5
+ {{ recipe.name }}
6
+ </p >
7
+ <div class =" h-[80px] flex flex-col items-start" >
8
+ <span
9
+ >⭐
10
+ <span class =" text-sm"
11
+ >{{ recipe.rating }}/5 ({{ recipe.reviewCount }})
12
+ </span ></span
13
+ >
14
+ <span
15
+ >🕒 <span class =" text-sm" >{{ recipe.cookTimeMinutes }} min </span ></span
16
+ >
17
+ <span
18
+ >🔥
19
+ <span class =" text-sm" >{{ recipe.caloriesPerServing }} cals </span ></span
20
+ >
21
+ </div >
5
22
<NuxtLink :to =" `/menu/${recipe.id}`" >
6
23
<p class =" btn" >View Details</p >
7
24
</NuxtLink >
@@ -14,8 +31,9 @@ const { recipe } = defineProps(["recipe"]);
14
31
15
32
<style scoped>
16
33
.thumb {
17
- max-height : 120px ;
18
- max-width : 70% ;
34
+ /* width: 100%; */
35
+ max-height : 300px ;
36
+ max-width : 100% ;
19
37
margin : 0 auto ;
20
38
}
21
39
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" card" >
3
- <div class =" grid grid-cols-2 gap-10" >
4
- <div class =" p-7 mx-auto my-7" >
3
+ <div class =" grid md:lg: grid-cols-1 lg:grid-cols-2 md:gap-2 lg: gap-10" >
4
+ <div class =" lg: p-7 mx-auto md:my-2 lg: my-7" >
5
5
<img :src =" recipe.image" alt =" recipe image" />
6
6
</div >
7
- <div class =" p-7" >
7
+ <div class =" md:p-2 lg: p-7" >
8
8
<h2 class =" text-4xl my-7" >{{ recipe.name }}</h2 >
9
9
<div class =" flex gap-2" >
10
10
<p class =" pr-[12px] border-r border-gray-200" >
37
37
</div >
38
38
<div >
39
39
<h3 class =" text-2xl my-5 underline" >Ingredients</h3 >
40
- <ul >
40
+ <ul
41
+ :class ="
42
+ recipe.ingredients.length > 5
43
+ ? 'grid grid-cols-2 gap-4'
44
+ : 'flex flex-col gap-2'
45
+ "
46
+ >
41
47
<li
42
- class =" flex items-center gap-2"
43
48
v-for =" (ingredient, index) in recipe.ingredients"
44
49
:key =" index"
50
+ class =" flex items-center gap-2"
45
51
>
46
52
<span
47
53
class =" h-3 w-3 p-3 text-gray-950 rounded-full flex items-center justify-center border-green-500 border-2"
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<header class =" shadow-sm bg-white" >
4
- <nav class =" container-mx-auto p-4 flex justify-between" >
4
+ <nav class =" container-mx-auto p-4 flex justify-between items-center " >
5
5
<NuxtLink to =" /" class =" font-bold text-2xl"
6
6
>Nuxt<span class =" text-black" >Home</span ></NuxtLink
7
7
>
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<header class =" shadow-sm bg-white" >
4
- <nav class =" container mx-auto p-4 text-[#12b488]" >
5
- <NuxtLink to =" /menu" class =" font-bold text-2xl"
4
+ <nav
5
+ class =" container mx-auto p-4 text-[#12b488] flex justify-between items-center"
6
+ >
7
+ <NuxtLink to =" /menu" class =" font-bold text-2xl grow"
6
8
>Nuxt<span class =" text-black" >Menu</span ></NuxtLink
7
9
>
10
+ <ul class =" flex gap-4" >
11
+ <li ><NuxtLink to =" /" >Home</NuxtLink ></li >
12
+ <li ><NuxtLink to =" /todo" >Todo List</NuxtLink ></li >
13
+
14
+ <li ><NuxtLink class =" btn" to =" /menu" >Food menu</NuxtLink ></li >
15
+ </ul >
8
16
</nav >
9
17
</header >
10
18
<main class =" container mx-auto p4" >
25
33
.router-link-exact-active {
26
34
color : #12b488 ;
27
35
}
36
+ .btn {
37
+ color : white ;
38
+ }
28
39
</style >
You can’t perform that action at this time.
0 commit comments