forked from gelado-facts/gelado-facts.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (62 loc) · 1.9 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
75
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dev0ps</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="cover.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body class="text-center">
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
<header class="masthead mb-auto">
<div class="inner">
<h3 class="masthead-brand"> </h3>
</div>
</header>
<main role="main" class="inner cover">
<h1 class="cover-heading">
<div id="maintext"></div>
</h1>
</main>
<footer class="mastfoot mt-auto">
<div class="inner">
<p>P0wer3d by Dev0ps</p>
</div>
</footer>
</div>
<script>
function random_item(items) {
return items[Math.floor(Math.random()*items.length)];
}
$( document ).ready(function() {
var items = ["text", "text", "text", "text", "image"];
$.getJSON("origin.json", function(result){
var current = random_item(items);
if (current == "text") {
$('#maintext').text(random_item(result.texts));
} else {
$('#maintext').append("<img src='img/" + random_item(result.images) + "'/>");
}
});
});
</script>
</body>
</html>