-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathron.html
More file actions
89 lines (84 loc) · 2.74 KB
/
ron.html
File metadata and controls
89 lines (84 loc) · 2.74 KB
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
<!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">
<meta name="description" content="">
<meta name="author" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<script src="js/jquery.js"></script>
<style>
.fadeIn {
opacity:0;
-webkit-animation:fadeIn ease-in 1;
-moz-animation:fadeIn ease-in 1;
-o-animation:fadeIn ease-in 1;
animation:fadeIn ease-in 1;
-webkit-animation-fill-mode:forwards;
-moz-animation-fill-mode:forwards;
-o-animation-fill-mode:forwards;
animation-fill-mode:forwards;
-webkit-animation-duration:.5s;
-moz-animation-duration:.5s;
-o-animation-duration:.5s;
animation-duration:.5s;
}
.fadeIn-Delay {
-webkit-animation-delay:.5s;
-moz-animation-delay:.5s;
-o-animation-delay:.5s;
animation-delay:.5s;
}
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-o-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
#bg {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
#bg img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
h2#quote { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; }
</style>
<script>
$(document).ready(function(){
$.ajax({url: "http://ron-swanson-quotes.herokuapp.com/quotes", success: function(result){
$("#quote").html(result.quote);
}});
});
</script>
<script>
function jsonFlickrApi(rsp) {
window.rsp = rsp;
var s = "";
// http://farm{id}.static.flickr.com/{server-id}/{id}_{secret}_[mstb].jpg
// http://www.flickr.com/photos/{user-id}/{photo-id}
/*for (var i=0; i < rsp.photos.photo.length; i++) {*/
var i = Math.floor(Math.random()*(50-1+1)+1);
photo = rsp.photos.photo[i];
t_url = "http://farm" + photo.farm + ".static.flickr.com/" +
photo.server + "/" + photo.id + "_" + photo.secret + "_" + "b.jpg";
p_url = "http://www.flickr.com/photos/" + photo.owner + "/" + photo.id;
s += '<div id="bg"> <img class="fadeIn fadeIn-Delay" src=' + t_url + '"/> </div>';
/*}*/
document.writeln(s);
}
</script>
<script src="https://api.flickr.com/services/rest/?method=flickr.people.getPhotos&format=json&api_key=e353b6709c84922ab1a1d6e06b62c18d&user_id=anandrajagopal"></script>
</head>
<h2 id="quote"></h2>
</html>