-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
74 lines (72 loc) · 3.46 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Foodish.js</title>
<!-- Logo -->
<link rel="icon" type="image/x-icon" href="assets/logo.ico">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Lobster&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<!-- CSS -->
<link rel="stylesheet" href="css/styles.css">
<!-- Scripts -->
<script src="js/images.js"></script>
<script src="js/imageMetaData.js"></script>
<script src="js/script.js"></script>
</head>
<body onload="checkURLParams();">
<div class="container">
<h1><img src="assets/logo.png" alt="logo" title="Samosa" height="60"/> Foodish.js</h1>
<p class="lead">🍲 Random pictures of food dishes. 🍛</p>
<div class="row align-items-center">
<div class="col">
<img id="foodish" alt="foodish"/>
</div>
<div class="col">
<ul>
<li><a href="javascript:navigateFoodish('biryani')">biryani</a> : <span id="biryaniCount"></span></li>
<li><a href="javascript:navigateFoodish('burger')">burger</a> : <span id="burgerCount"></span></li>
<li><a href="javascript:navigateFoodish('butter-chicken')">butter-chicken</a> : <span id="butterChickenCount"></span></li>
<li><a href="javascript:navigateFoodish('dessert')">dessert</a> : <span id="dessertCount"></span></li>
<li><a href="javascript:navigateFoodish('dosa')">dosa</a> : <span id="dosaCount"></span></li>
<li><a href="javascript:navigateFoodish('idly')">idly</a> : <span id="idlyCount"></span></li>
<li><a href="javascript:navigateFoodish('pasta')">pasta</a> : <span id="pastaCount"></span></li>
<li><a href="javascript:navigateFoodish('pizza')">pizza</a> : <span id="pizzaCount"></span></li>
<li><a href="javascript:navigateFoodish('rice')">rice</a> : <span id="riceCount"></span></li>
<li><a href="javascript:navigateFoodish('samosa')">samosa</a> : <span id="samosaCount"></span></li>
<li>Total Foodish</a> : <span id="totalFoodishCount"></span></li>
</ul>
<span>Share this foodish : </span>
<input id="shareLink" type="text" class="form-control" value=""/>
<br>
<span>API example available at : <a href="https://foodish-js.netlify.app/api/">https://foodish-js.netlify.app/api/</a></span>
<br>
<span>Read the Documentation at : <a href="https://github.com/surhud004/Foodish_JS#readme">Foodish_JS</a></span>
<br>
</div>
</div>
</div>
<footer class="container-fluid text-center">
<p class="lead">Designed and Coded by : <a href="https://github.com/surhud004">surhud004</a> © 2022 - <span id="currentYear"></span></p>
<!-- Build date : 12th February 2022 -->
</div>
</div>
<script type="text/javascript">
function checkURLParams() {
let url = new URL(window.location.href);
let foodCategory = url.searchParams.get("foodish");
if (foodCategory) {
getFoodish(foodCategory);
} else {
getFoodish('index');
}
}
function navigateFoodish(foodCategory) {
window.location.href = `/?foodish=${foodCategory}`;
}
imageCount();
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>
</body>
</html>