From d8d88de74c74e6428a77db0c16be5d756e6864b8 Mon Sep 17 00:00:00 2001 From: Jonathan Cremin Date: Sat, 6 Dec 2014 12:24:03 +0000 Subject: [PATCH] Rework recently shared a bit --- app.js | 2 +- public/stylesheets/style.css | 2 +- views/index.ejs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 027a3e1..18e84ed 100644 --- a/app.js +++ b/app.js @@ -65,7 +65,7 @@ app.get('/', function(req, res) { ]; // shitty sort until I add more metadata on cached items - req.db.matches.find().sort({$natural:-1}).limit(4).toArray().then(function(docs){ + req.db.matches.find().sort({$natural:-1}).limit(6).toArray().then(function(docs){ res.render('index', { page: "home", samples: samples, recent: docs, error: req.flash('search-error') }); }); }); diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 92fc6af..73cd81c 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -108,7 +108,7 @@ h3 { margin-bottom: 50px; } -.recent { +.recent img { margin-bottom: 30px; } diff --git a/views/index.ejs b/views/index.ejs index 0e281dc..c181e2a 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -32,9 +32,9 @@ <% if (recent.length) { %>

Recently Shared

<% } %>
<% for (var i=0;i < recent.length;i++) { var item = recent[i].items[0]; %> -
+ <% if((i+1)%2 == 0) { %>
<% } %> +
<% } %>