Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small text and css change

  • Loading branch information...
commit d10172be5ade7aac45a3288c2d1e5ebe3b565e56 1 parent 8c6884d
@hasinhayder authored
Showing with 9 additions and 7 deletions.
  1. +2 −2 flixplorer/flixplorer.html
  2. +7 −5 flixplorer/js/flixplorer.js
View
4 flixplorer/flixplorer.html
@@ -49,7 +49,7 @@
data-src="http://farm{{data.farm}}.staticflickr.com/{{data.server}}/{{data.id}}_{{data.secret}}_z.jpg"
data-ownername="{{data.ownername}}"
data-title="{{data.title}}"
- data-owner="{{data.owner}}">
+ data-owner="{{data.owner}}"/>
</a>
</li>
{{/each}}
@@ -59,7 +59,7 @@
<div>
<p class='middle'>
Flixplorer displays first 110 photos from today's flickr Explore list. Developed using <a href='http://meteor.com' target="_blank">Project Meteor</a><br/>
- Flixplore is developed by some sleepless guys at <a href='http://leevio.com' target="_blank">Leevio</a>, Fork it in <a href='https://github.com/hasinhayder/Flixplore' target="_blank">Github</a>
+ Flixplorer is developed by some sleepless guys at <a href='http://leevio.com' target="_blank">Leevio</a>, Fork it in <a href='https://github.com/hasinhayder/Flixplore' target="_blank">Github</a>
</p>
</div>
View
12 flixplorer/js/flixplorer.js
@@ -1,7 +1,9 @@
-Sphotos = new Meteor.Collection("photos");
+var curDate = new Date();
+var key = "photo"+curDate.getHours();
+Sphotos = new Meteor.Collection(key);
if (Meteor.is_client) {
Template.gallery.photos = function () {
- return Sphotos.find({name:"photo"});
+ return Sphotos.find({name:key});
}
Template.gallery.events = {
@@ -17,7 +19,7 @@ if (Meteor.is_client) {
default:
break;
}
- event.stopPropagation();
+ event.preventDefault();
return false;
}
};
@@ -27,7 +29,7 @@ if (Meteor.is_server) {
Meteor.startup(function () {
// code to run on server at startup
//Sphotos.remove({"name":"photo"});
- if (Sphotos.find({"name":"photo"}).count() == 0) {
+ if (Sphotos.find({name:key}).count() == 0) {
Meteor.http.call("GET",
"http://api.flickr.com/services/rest/?method=flickr.interestingness.getList&extras=owner_name&api_key=8cc0f91339ab3da808b215c72a3d564d&per_page=120&format=json&nojsoncallback=1",
{},
@@ -37,7 +39,7 @@ if (Meteor.is_server) {
var result = JSON.parse(result.content);
for (i = 0; i < 110; i++) {
photo = result.photos.photo[i];
- Sphotos.insert({name:"photo", data:photo});
+ Sphotos.insert({name:key, data:photo});
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.