-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchRecepie.html
181 lines (149 loc) · 4.63 KB
/
searchRecepie.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./style/navbar.css">
<style>
body{
box-sizing: border-box;
overflow-x: hidden;
/* */
}
.container{
/* border: 1px solid green; */
width: 100%;
/* background-color: #F5F5F5; */
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
}
.quote{
/* border: 1px solid red; */
width: 100%;
height: 45px;
display: flex;
justify-content: flex-start;
align-items: center;
color: rgb(13, 12, 12);
padding-left: 50px;
font-style: italic;
font-weight: 100;
font-size: 20px;
color:#4ec0be;
}
.mainBox
{
background-color: #F5F5F5;
width: 100%;
height: 290px;
display: flex;
box-shadow: rgba(52, 52, 55, 0.2) 0px 7px 29px 0px;
}
.main_left{
width: 30%;
/* border: 1px solid blue; */
display: flex;
justify-content: center;
margin-left: 40px;
}
.image{
width: 250px;
height: 250px;
border: 1px solid lightgray;
border-radius: 5px;
}
.instructionsDiv{
width: 80%;
height: 300px;
border: 1px solid purple;
text-overflow: clip;
margin: 50px;
padding: 50px;
}
.btnimg{
width: 300px;
height: 100px;
cursor: pointer;
}
.instspara{
width: 90%;
/* border: 1px solid red; */
padding: 50px;
/* text-align: center; */
background-color: #F5F5F5;
}
.footerimage{
width:100%;
height: 250px;
}
</style>
</head>
<body>
<div id="navbar">
</div>
<div class="searchRecepie">
<!-- Container -->
</div>
<div class="container">
<div class="quote">
<p>A recipe is a story that ends with a good meal.</p>
</div>
<div class="mainBox">
<div class="main_left"></div>
<div class="main_right"></div>
</div>
<div class="videodiv">
</div>
<div class="para">
</div>
</div>
<div class="footer">
<img src="https://i.ibb.co/PTgKRRF/Screenshot-2022-05-01-142815.png" class="footerimage" alt="">
</div>s
</body>
</html>
<script src="./script/nav.js" type="module"></script>
<script src="./script/search.js"></script>
<script>
const mainBox = document.querySelector(".mainBox")
const main_left = document.querySelector(".main_left")
const main_right = document.querySelector(".main_right")
const para = document.querySelector(".para");
let searchdata = JSON.parse(localStorage.getItem("localData"));
console.log(searchdata);
append(searchdata);
function append(data) {
data.forEach(
({ name,instructions,link,image,category }) => {
// let imgDiv = document.createElement()
let img = document.createElement("img");
img.src = image;
img.setAttribute("class","image")
main_left.append(img);
let name1 = document.createElement("h2");
name1.innerText=`DishName : ${name}`;
let origin = document.createElement("p");
origin.innerText=`Origin : Chinna`;
origin.style.color="gray"
origin.style.fontWeight="200"
let category1 = document.createElement("h3");
category1.innerText=`Category : ${category}`;
category1.style.color="gray"
category1.style.fontWeight="200"
let btnimg = document.createElement("img")
btnimg.src="https://www.nicepng.com/png/detail/22-225492_watch-video-button-animated.png"
btnimg.addEventListener("click",youTube)
btnimg.setAttribute("class","btnimg")
function youTube(){
window.location.href=strYoutube;
console.log("fdpkf");
}
let instruction = document.createElement("p");
instruction.setAttribute("class","instspara")
instruction.innerText=instructions;
para.append(instruction);
main_right.append(name1,origin,category1,btnimg);
});
}
</script>