-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added async version of summary-fn summary page
- Loading branch information
1 parent
5f84795
commit 06a4918
Showing
4 changed files
with
156 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<head> | ||
<h1>{{.PageTitle}}</h1> | ||
<meta charset="utf-8"> | ||
|
||
<link rel="stylesheet" href="http://mistic100.github.io/jQCloud/dist/jqcloud2/dist/jqcloud.min.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | ||
<script src="http://mistic100.github.io/jQCloud/dist/jqcloud2/dist/jqcloud.min.js"></script> | ||
|
||
<style> | ||
#cloud { | ||
width: 700px; | ||
height: 300px; | ||
} | ||
</style> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
$('.content-link').click(function(e) { | ||
e.preventDefault(); | ||
|
||
$('html, body').animate({ | ||
scrollTop: $('#profile-body').offset().top | ||
}, 500); | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="cloud"></div> | ||
<script type="text/javascript"> | ||
var words = []; | ||
</script> | ||
<div> | ||
{{$WatsonFnURL := .WatsonFnURL}} | ||
{{$Timeout := .Timeout}} | ||
{{range $i, $tweet := .Tweets}} | ||
<div> | ||
{{range $j, $imageURL := $tweet.ImageURLs}} | ||
<div id="#{{$i}}_{{$j}}"> | ||
<img src="{{$imageURL}}"> | ||
</div> | ||
<div> | ||
{{$ClassifiedImage := (ClassifyImage $WatsonFnURL $imageURL $Timeout)}} | ||
{{range $ClassifiedImage.Classifiers}} | ||
<div> | ||
{{range .Classes}} | ||
<div>{{.Name}} ({{.Score}}) | ||
<script type="text/javascript"> | ||
words.push({text:"{{.Name}}", | ||
weight:{{.Score}}*1000, | ||
link:"#{{$i}}_{{$j}}"}) | ||
</script> | ||
</div> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
<div>{{.Text}}</div> | ||
<br/> | ||
<hr/> | ||
</div> | ||
{{end}} | ||
</div> | ||
<script type="text/javascript"> | ||
$('#cloud').jQCloud(words); | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters