From 2d5e1f00e7d51f2c019c4811736c8c75b7721f39 Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 21 Feb 2014 11:48:49 +0100 Subject: [PATCH] fixes after revert --- css/screen.css | 7 ++++++- index.html | 2 +- js/App.js | 20 ++++++++++++++++---- js/Pond.js | 4 +--- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/css/screen.css b/css/screen.css index 46bcd45..cd9a860 100644 --- a/css/screen.css +++ b/css/screen.css @@ -165,6 +165,7 @@ canvas { list-style-type: none; margin: 0; padding: 0; + word-wrap: break-word; } #list p { @@ -284,10 +285,14 @@ canvas { float: left; } -#full article header p:nth-child(3) { +#full article header p:nth-child(2) { float: right; } +#full article header p:nth-child(3) { + clear: both; +} + #full .article { clear: both; padding-top: 1em; diff --git a/index.html b/index.html index feaa4f4..ff6889e 100644 --- a/index.html +++ b/index.html @@ -94,8 +94,8 @@

-

+

diff --git a/js/App.js b/js/App.js index be5ebe6..593ba29 100644 --- a/js/App.js +++ b/js/App.js @@ -7,6 +7,16 @@ function App() { if(!color) color = "red"; this.setColor(color); this.fontChange(); + + var _this = this; + + window.onkeydown = function(e) { + if(e.keyCode == 39) { + _this.showNext(); + } else if(e.keyCode == 37) { + _this.showPrevious(); + } + } }; App.prototype.authenticate = function() { @@ -276,9 +286,9 @@ App.prototype.showFull = function(article, slide_back) { $(page_id + " .date").innerHTML = (new Date(parseInt(article.updated, 10) * 1000)).toLocaleString(); - var title = $(page_id + " .title"); - title.innerHTML = article.title; - title.href = article.link; + var link = $(page_id + " .link"); + link.innerHTML = article.link; + link.href = article.link; $(page_id + " .feed_title").innerHTML = article.feed_title; @@ -286,7 +296,9 @@ App.prototype.showFull = function(article, slide_back) { if(article.author && article.author.length > 0) $(page_id + " .author").innerHTML = "– " + article.author; - $(page_id + " .article").innerHTML = article.content; + var content = article.content; + if(content.replace(/^\s+|\s+$/g,'').length == 0) content = article.title; + $(page_id + " .article").innerHTML = content; $$(page_id + " .article a").forEach(function(o, i) { o.target = "_blank"; }); diff --git a/js/Pond.js b/js/Pond.js index 8765ce2..1c424a6 100644 --- a/js/Pond.js +++ b/js/Pond.js @@ -76,7 +76,7 @@ Pond.prototype.reload = function(callback) { Pond.prototype.getUnreadFeeds = function(callback, skip) { var options = { - status: "all", + status: "unread", limit: 100 }; @@ -134,8 +134,6 @@ Pond.prototype.normalizeArticle = function(article) { var timestamp = new Date(article.published_at).getTime() / 1000; - console.log(article.read) - return { id: article.id, guid_hash: article.url + article.id,