@@ -50,7 +52,7 @@
This website is open source and you can improve it. Learn more about contributing here. In founding partnership with Stamen.
-
+
diff --git a/css/site.css b/css/site.css
index 9e6cca2..9755277 100644
--- a/css/site.css
+++ b/css/site.css
@@ -335,7 +335,6 @@ a.fill-darken0:hover { background-color:rgba(0,0,0,0.15); }
}
.followers {
- max-height:480px;
position:relative;
}
.followers:after {
@@ -430,3 +429,39 @@ a.hover-link:hover:after {
.form-alert.show {
display:block;
}
+
+.event {
+ background: white;
+ padding: 10px 5px;
+ border-bottom: 1px solid #eee;
+}
+.events-header {
+ font-size: 1em;
+}
+
+a.events-header {
+ text-decoration: underline;
+}
+
+.events-header:hover {
+ cursor: pointer;
+}
+
+.events-list {
+ display: none;
+}
+
+.event-title {
+ text-align: center;
+}
+
+@media (min-width: 704px) {
+ .events-list {
+ display: block;
+ max-height: 480px;
+ overflow-y: scroll;
+ }
+ .events-header:hover {
+ cursor: normal;
+ }
+}
diff --git a/site.js b/site.js
index 4e76453..826a353 100644
--- a/site.js
+++ b/site.js
@@ -1,5 +1,8 @@
---
---
+//Tabletop.js
+{% include js/tabletop.js %}
+{% include js/moment.js %}
function githubWatchers() {
var watchers = $('.followers');
@@ -24,6 +27,89 @@ function githubWatchers() {
watchers.append(data);
}
});
-};
+}
-$(githubWatchers);
+function filterDates(events) {
+ // Ditch past events
+ var upcoming = _.filter(events, function(event){
+ return moment(event.datetime) > moment();
+ });
+
+ // Sort by date
+ upcoming.sort(function(a,b) {
+ var a = moment(a.datetime),
+ b = moment(b.datetime);
+ if (a < b)
+ return -1;
+ if (a > b)
+ return 1;
+ return 0;
+ });
+
+ return upcoming;
+}
+
+function processEvents(data, tabletop) {
+
+ // Filter and Sort dates
+ var filtered = filterDates(data);
+
+ var $eventList = $('.events-list'),
+ template = "