-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsiteify.html
40 lines (40 loc) · 1.44 KB
/
siteify.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
<html class="ui-mobile landscape min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<meta charset="utf-8">
<meta content="width=device-width, minimum-scale=1, maximum-scale=1" name="viewport">
<title>ekomobi site thumbnails</title>
</head>
<body>
<script id="siteTemplate" type="text/x-jquery-tmpl">
<li>
<h2>{{= name }}</h2>
{{if pages.length>0 }}
{{each pages}}
<img style="vertical-align:text-top; width:80;" src="{{= $value}}" />
{{/each}}
{{else}}
<div>BROKEN</div>
{{/if}}
</li>
</script>
<div ><ul id="sites">
</ul></div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
console.log("jQuery READY");
$.getJSON('siteify.json',function(sites){
console.log(sites);
$( "#siteTemplate" ).tmpl( sites )
.appendTo( "#sites" );
});
$('img').live('click',function(){
var imgurl=$(this).attr('src');
window.location=imgurl;
});
});
</script>
</body>
</html>