Skip to content

Instantly share code, notes, and snippets.

View lamalex's full-sized avatar

Alex Launi lamalex

View GitHub Profile
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
<div class="event-display" style="display:inline-block; float:right;">
{{#if fbloading}}
{{> spinner}}
{{/if}}
</div>
var fbloading = false;
Template.newEventDialog.helpers({
'fbloading': function() {
return fbloading;
}
});
Template.newEventDialog.events({
'blur input[name=facebook-url]': function(e) {
e.preventDefault();
Meteor.Router.add ({
'/': 'relicsList',
'/page/:_id': {
to: 'relicPage',
and: function (id) { Session.set ('currentRelicId', id); }
},
'/forum/list': 'forumList',
'/forum/:name': {
to: 'threadList',
and: function (name) {
Template.relicsPast.helpers({
relics: function() {
return Relics.find({datestamp: {$lt: getYesterday() }}, {limit: pastRelicsHandle.limit()});
},
relicsReady: function() {
console.log(pastRelicsHandle.loading());
return !pastRelicsHandle.loading();
},
allRelicsLoaded: function() {
return !pastRelicsHandle.loading() && Relics.find({datestamp: {$lt: getYesterday()}}).count() < pastRelicsHandle.loaded();
<template name="relicsPast">
<div class="relics past">
<h2>PAST</h2>
{{#each relics}}
{{#if published}}
<div class="post">
<div class="post-content">
{{> relicItem}}
</div>
</div>
<template name="newRelic">
<div class="droparea">
Drag and drop a picture, sound, or video if you want to show it to Portland DIY
</div>
</template>
Meteor.Router.add({
'/': 'relicsList',
'/:_id': {
to: 'relicPage',
and: function(id) { Session.set('currentRelicId', id); }
},
'/new': 'newRelic'
});
<template name="relicItem">
<div class="post">
<div class="post-content">
<a href="{{relicPagePath this}}">
{{#isYoutubeIframe type}}
{{resource}}
{{/isYoutubeIframe}}
{{#isImage type}}
<img src="{{resource}}" />
{{/isImage}}