-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
93 lines (88 loc) · 2.92 KB
/
index2.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Hungry Diary</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif:ital@1&display=swap" rel="stylesheet">
<link href="https://www.themealdb.com/api/json/v1/1/lookup.php?i=52772" crossorigin>
</head>
<!-- beginning of div -->
<body onload="slider()">
<div class="container">
<div class="nav-wrapper">
<div class="left-side">
<div class="nav-link-wrapper .active-nav-link">
<a href="index.html">Home</a>
</div>
<div class="nav-link-wrapper">
<a href="indexhtml">Hungry Diary</a>
</div>
</div>
<div class="right-side">
<div class="brand">
<div></div>
</div>
</div>
</div>
<div class="banner">
<div class="slider">
<img src="images/p2.jpg" id="slideImg">
</div>
<div class="overlay">
<div class="content">
<h1>LETS START OUR Hungry Diary JOURNEY!</h1>
<h3>Subscribe to start your recipe journey!</h3>
<div class="mealContainer">
<div class="row text-center">
<h3>Feeling Hungry?</h3>
<h5>Get a random meal by clicking button!</h5>
<div>
<button type="getMealButton" id="get-meal"<a href="/index3.html">Get Meal</a></button>
<button type="button" class="meal">Hungry Diary</button>
</div>
<div id="meal" class="row-meal"></div>
</div>
</div>
</div>
<!-- <div class="navbar">
<div class="logo">
<img src="image/logo.png"
</div>
<div class="menu-icon">
<img src="image/user.png">
<img src="image/diary.png">
<img src="image/menu.png">
</div>
</div> -->
</div>
</div>
<script>
var slideImg = document.getElementById("slideImg");
var images = [
"images/p1.jpg",
"images/p4.jpg",
"images/p5.jpg",
"images/p6.jpg",
"images/p7.jpg",
"images/p8.jpg",
"images/p9.jpg",
"images/p10.jpg",
"images/p12.jpg",
];
var len = images.length;
var i = 0;
function slider(){
if(i > len-1){
i = 0;
}
slideImg.src = images[i];
i++;
setTimeout('slider()',3000);
}
</script>
<script src="script1.js"> </script>
</body>
</html>