Skip to content

Commit 98e5b37

Browse files
author
Matt Swanson
committed
minor style changes.
1 parent d246eaf commit 98e5b37

File tree

8 files changed

+31
-18
lines changed

8 files changed

+31
-18
lines changed

app/controllers/stories_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Stringer < Sinatra::Base
99
end
1010

1111
get "/archive" do
12-
@read_stories = StoryRepository.read.page(params[:page]).per_page(15)
12+
@read_stories = StoryRepository.read(params[:page])
1313

1414
erb :archive
1515
end

app/public/css/styles.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,14 @@ li.blank {
507507
}
508508

509509
#zen a {
510-
color: #F67100;
510+
color: #F59745;
511+
font-size: 14px;
512+
border-bottom: 1px dotted #F59745;
513+
text-decoration: none;
514+
}
515+
516+
#zen .view-all {
517+
line-height: 18px;
511518
}
512519

513520
#pagination {
@@ -516,4 +523,7 @@ li.blank {
516523

517524
#pagination a {
518525
color: #F67100;
526+
border-bottom: 1px dotted #F59745;
527+
text-decoration: none;
528+
margin: 0 7px;
519529
}

app/repositories/story_repository.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def self.unread
2727
Story.where(is_read: false).order("published desc")
2828
end
2929

30-
def self.read
31-
Story.where(is_read: true).order("published desc")
30+
def self.read(page = 1)
31+
Story.where(is_read: true).order("published desc").page(page).per_page(15)
3232
end
3333

3434
def self.extract_content(entry)

app/views/archive.erb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@
1010
<% end %>
1111
</ul>
1212
</div>
13+
1314
<div id="pagination">
1415
<% if @read_stories.previous_page %>
15-
<a href="?page=<%= @read_stories.previous_page %>"><i class="icon-double-angle-left"></i> <%= t('archive.previous') %></a>
16+
<a href="?page=<%= @read_stories.previous_page %>"><%= t('archive.previous') %></a>
17+
<% end %>
18+
19+
<% if @read_stories.total_pages > 1 %>
20+
<%= @read_stories.current_page %> <%= t('archive.of') %> <%= @read_stories.total_pages %>
1621
<% end %>
17-
Page <%= @read_stories.current_page %> of <%= @read_stories.total_pages %>
22+
1823
<% if @read_stories.next_page %>
19-
<a href="?page=<%= @read_stories.next_page %>"><%= t('archive.next') %> <i class="icon-double-angle-right"></i></a>
24+
<a href="?page=<%= @read_stories.next_page %>"><%= t('archive.next') %></a>
2025
<% end %>
2126
</div>
2227
<% else %>

app/views/partials/_zen.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<small>
66
<%= t('partials.zen.gtfo') %> <span id="gtfo"><%= t('partials.zen.go_make') %></span>.
77
</small>
8-
<small>
9-
<p><%= t('partials.zen.procrastinate') %> <a href="/archive"><%= t('partials.zen.archive') %></a>.</p>
10-
</small>
8+
</p>
9+
<p class="view-all">
10+
<a href="/archive"><%= t('partials.zen.archive') %></a>
1111
</p>
1212
</div>

config/locales/en.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ en:
4343
r: "Refresh"
4444
zen:
4545
zero: "You&#8217;ve reached RSS Zero&trade;"
46-
gtfo: 'Now stop reading blogs and'
47-
go_make: 'go make something'
48-
procrastinate: "You can keep procrastinating by viewing your"
49-
archive: "archive"
46+
gtfo: "Now stop reading blogs and"
47+
go_make: "go make something"
48+
archive: "view all items"
5049
sessions:
5150
new:
5251
title: 'Stringer speaks'
@@ -87,4 +86,5 @@ en:
8786
archive:
8887
next: "Next"
8988
previous: "Previous"
89+
of: "of"
9090
sorry: "Sorry, you haven't read any stories yet!"

config/locales/es.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ es:
4545
zero: "You&#8217;ve reached RSS Zero&trade;"
4646
gtfo: 'Ahora deja de leer blogs y'
4747
go_make: 've a hacer algo'
48-
procrastinate: "You can keep procrastinating by checking out your"
49-
archive: "archive"
48+
archive: "view all items"
5049
sessions:
5150
new:
5251
title: 'Stringer que habla'

config/locales/pt.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ pt:
4545
zero: "Você alcançou RSS Zero&trade;"
4646
gtfo: 'Agora pare de ler blogs e'
4747
go_make: 'vá fazer algo'
48-
procrastinate: "You can keep procrastinating by checking out your"
49-
archive: "archive"
48+
archive: "view all items"
5049
sessions:
5150
new:
5251
title: 'Stringer fala'

0 commit comments

Comments
 (0)