-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from benstr/this-rabbit-is-so-rubbery
This rabbit is so rubbery!
- Loading branch information
Showing
10 changed files
with
89 additions
and
64 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 |
---|---|---|
|
@@ -23,3 +23,4 @@ markdown | |
percolate:synced-cron | ||
xolvio:cucumber | ||
ongoworks:speakingurl | ||
reactive-var |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<template name="footer"> | ||
<div class="container-fluid"> | ||
<div class="center-block"> | ||
<p>© Crater Podcast 2015. Brought to you by <a href="http://meteorjs.club" target="_blank">Meteor Club</a>.</p> | ||
</div> | ||
</div> | ||
<div class="container-fluid"> | ||
<div class="center-block"> | ||
<p>© Crater Podcast 2015. Brought to you by the awesome users of <a href="https://crater.io" target="_blank">Crater.io</a>.</p> | ||
</div> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
var episodesLoaded = 5; | ||
|
||
Template.home.onCreated( function () { | ||
var self = this; | ||
self.limit = new ReactiveVar(episodesLoaded); | ||
self.autorun(function () { | ||
var limit = self.limit.get(); | ||
self.subscribe('episodes', limit); | ||
}); | ||
}); | ||
|
||
Template.home.helpers({ | ||
featured: function () { | ||
return Episodes.findOne(Session.get('spotlightID')); | ||
}, | ||
episodes: function () { | ||
return Episodes.find(); | ||
}, | ||
|
||
}); | ||
|
||
Template.home.onRendered(function() { | ||
Session.set("spotlightID", Episodes.findOne({}, { | ||
sort: { | ||
date: -1 | ||
} | ||
})._id); | ||
Session.set("dragging", false); | ||
$(".podcast-play").affix({ | ||
offset: { | ||
top: function() { | ||
return $('.holder').offset().top; | ||
} | ||
} | ||
}); | ||
return Tracker.autorun(function() { | ||
Session.get('spotlightID'); | ||
return Tracker.afterFlush(function() { | ||
var audio, currentSpeedIdx, speed, speeds; | ||
speeds = [1, 1.5, 2, 2.5, 3]; | ||
speed = $('.pcast-speed')[0]; | ||
currentSpeedIdx = 0; | ||
audio = $('#audio-player')[0]; | ||
return speed.addEventListener('click', (function() { | ||
currentSpeedIdx = currentSpeedIdx + 1 < speeds.length ? currentSpeedIdx + 1 : 0; | ||
audio.playbackRate = speeds[currentSpeedIdx]; | ||
this.textContent = speeds[currentSpeedIdx] + 'x'; | ||
return true; | ||
}), false); | ||
}); | ||
}); | ||
}); | ||
|
||
Template.home.events({ | ||
"touchmove body": function(e) { | ||
return Session.set("dragging", true); | ||
}, | ||
"touchstart body": function(e) { | ||
return Session.set("dragging", false); | ||
}, | ||
"click [data-action=load-more]": function(e, t) { | ||
e.preventDefault(); | ||
var limit = t.limit.get(); | ||
limit += episodesLoaded; | ||
t.limit.set(limit); | ||
} | ||
}); |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Redirect old MeteorPodcast urls | ||
_.each(Episodes.find().fetch(), function (episode) { | ||
var slug = "/e/" + episode.slug; | ||
WebApp.connectHandlers.use(slug, function (req, res, next) { | ||
res.writeHead(301, {'Location': process.env.ROOT_URL + "/podcast/" + episode.slug}); | ||
res.end(); | ||
}); | ||
}); |