Skip to content

Commit 2b97191

Browse files
committed
Added archive buttons and style
1 parent b35c5f1 commit 2b97191

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

‎Gemfile.lock‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GIT
77

88
GIT
99
remote: git://github.com/sinatra/sinatra-contrib.git
10-
revision: 6da79a0309ccc652c18e6edfd29d59f66b251a39
10+
revision: 1aed2897edebbea5e18a5772af9e060a689013fe
1111
specs:
1212
sinatra-contrib (1.4.0)
1313
backports (>= 2.0)
@@ -73,7 +73,7 @@ GEM
7373
nokogiri (>= 1.4.4)
7474
method_source (0.8.1)
7575
mime-types (1.23)
76-
multi_json (1.7.2)
76+
multi_json (1.7.3)
7777
nokogiri (1.5.9)
7878
pg (0.15.1)
7979
pry (0.9.12.1)
@@ -123,12 +123,13 @@ GEM
123123
slop (3.4.4)
124124
sqlite3 (1.3.7)
125125
thor (0.18.1)
126-
tilt (1.3.7)
126+
tilt (1.4.0)
127127
tzinfo (0.3.37)
128128
unicorn (4.6.2)
129129
kgio (~> 2.6)
130130
rack
131131
raindrops (~> 0.7)
132+
will_paginate (3.0.4)
132133

133134
PLATFORMS
134135
ruby
@@ -157,3 +158,4 @@ DEPENDENCIES
157158
sinatra-flash
158159
sqlite3
159160
unicorn
161+
will_paginate

‎app/views/archive.erb‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<% content_for :title do %>
2+
<% unless @all_stories.empty? %>
3+
<%= "(#{@all_stories.count})" %>
4+
<% end %>
5+
<% end %>
6+
7+
<div id="action-bar">
8+
<%= render_partial :feed_action_bar %>
9+
</div>
10+
11+
<% unless @all_stories.empty? %>
12+
<div id="stories">
13+
<ul id="story-list">
14+
<% @all_stories.each do |story| %>
15+
<%= render_partial :story, { story: story } %>
16+
<% end %>
17+
</ul>
18+
</div>
19+
<% else %>
20+
<div id="add-some-feeds">
21+
<p>Sorry, you don't have any feeds in your archive yet!</p>
22+
</div>
23+
<% end %>

0 commit comments

Comments
 (0)