forked from himanshu-dixit/Utkarsh-Dixit-Birthday
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
28 lines (28 loc) · 1.05 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Rajan, Things i love about you</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Lilita+One' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="intro">Rajan, a thing I love about you is...</div>
<div id="thing"></div>
<div id="refresh">refresh for another thing</div>
<script src="randomcolor.js"></script>
<script>
$.get("things.txt", function(data) {
var things = data.split('\n');
things.pop(); // last element is an empty string
var index = Math.floor(Math.random() * things.length);
var thing = things[index];
document.getElementById("thing").innerHTML = '<p>' + thing + '</p>';
});
jQuery(document).ready(function(){
jQuery('body').css('background-color',randomColor({luminosity: 'light'}));
});
</script>
</body>
</html>