-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
55 lines (53 loc) · 1.94 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
<!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" />
<link rel="stylesheet" href="style.css" />
<link rel="icon" type="image/x-icon" href="favi (2).png">
<link rel="stylesheet" href="Content/bootstrap/css/bootstrap.min.css" />
<title>DevOps & Cloud Facts</title>
<script src="Content/Javascript/jquery-3.6.0.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="row mt-5">
<div class="col"></div>
<div class="col-md-6"><img id="DevOps" src="" alt="cat" srcset="assets/theme.png" width="100%" /></div>
<div class="col"></div>
</div>
<div class="row text-center mt-5">
<p>
<button id="fetch" class="btn btn-primary btn-lg">Show Facts</button>
</p>
<p id="description" class="description">
Click on <strong>Show facts</strong> to fetch some DevOps and Cloud Facts
</p>
</div>
</div>
<script src="Content/bootstrap/js/bootstrap.min.js"></script>
<script src="Content/Javascript/sweetalert.js"></script>
<script>
var factCount = 0;
$("#fetch").on("click", function () {
var author = "";
var fact = "Here's another Fact";
var url = "Content/static/DevopsCloudFacts.json";
$.get(url, function (data) {
if (factCount >= data["DevOps&Cloud Facts"].length) {
fact = "No facts left. Come back later";
author = "- Yaya";
swal(fact, author, "info");
}
fact = data["DevOps&Cloud Facts"][factCount].quote;
author = data["DevOps&Cloud Facts"][factCount].author;
if (author == undefined) author = "";
else author = "- " + author;
swal(fact, author, "info");
});
factCount++;
});
</script>
</body>
</html>