aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--static/style.css4
-rw-r--r--static/ui.html14
-rw-r--r--static/ui.js10
3 files changed, 23 insertions, 5 deletions
diff --git a/static/style.css b/static/style.css
index 488a602..1006a85 100644
--- a/static/style.css
+++ b/static/style.css
@@ -158,6 +158,10 @@ pre {
color: black;
}
+.full {
+ cursor: pointer;
+}
+
.star {
color: black;
cursor: pointer;
diff --git a/static/ui.html b/static/ui.html
index b977dad..4f7e297 100644
--- a/static/ui.html
+++ b/static/ui.html
@@ -37,14 +37,18 @@
<span class={{if item.starred}}"unstar"{{else}}"star"{{/if}}>★</span></h2>
<p class="dateline" style="clear: both;">
${ item.publish_date } from <a href="${item.feed_url}">${item.feed_title}</a>
- </p>
- <div class="description">{{html item.description}}</div>
+ </p>
- <h3>full content</h3>
+ {{if item.header_image}}
<div class="img"><img src="${item.header_image}" /></div>
+ {{/if}}
+ <div class="description">{{html item.description}}
+ <p class="full">⫸</p>
+ </div>
+ {{if item.full}}
<div class="description">{{html item.full_content}}</div>
-
- </script>
+ {{/if}}
+ </script>
<script id="tag_template" type="text/jqtmp">
${tag.name} ${tag.unread}
diff --git a/static/ui.js b/static/ui.js
index 6f44db0..4f9305c 100644
--- a/static/ui.js
+++ b/static/ui.js
@@ -203,6 +203,10 @@ var Item = Backbone.Model.extend({
unstar: function() {
this.set({'starred': false});
+ },
+
+ full: function() {
+ this.set({'full': true});
}
});
@@ -291,6 +295,7 @@ var ItemView = Backbone.View.extend({
events: {
"click .star": "star",
"click .unstar": "unstar",
+ "click .full": "full",
},
initialize: function() {
@@ -308,6 +313,11 @@ var ItemView = Backbone.View.extend({
this.render();
},
+ full: function() {
+ this.model.full();
+ this.render();
+ },
+
render: function() {
var h = $.tmpl(templates.item_template, { 'item': this.model.toJSON() });
$(this.el).html(h);