diff options
Diffstat (limited to 'app/views/blogs')
-rw-r--r-- | app/views/blogs/index.atom.builder | 2 | ||||
-rw-r--r-- | app/views/blogs/index.html.haml | 12 | ||||
-rw-r--r-- | app/views/blogs/summary.html.haml | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/app/views/blogs/index.atom.builder b/app/views/blogs/index.atom.builder index 72deba2..a05f29d 100644 --- a/app/views/blogs/index.atom.builder +++ b/app/views/blogs/index.atom.builder | |||
@@ -2,7 +2,7 @@ atom_feed do |feed| | |||
2 | feed.title("Four Island") | 2 | feed.title("Four Island") |
3 | feed.updated(@blogs[0].published_at) if @blogs.length > 0 | 3 | feed.updated(@blogs[0].published_at) if @blogs.length > 0 |
4 | 4 | ||
5 | @blogs.each do |blog| | 5 | @blogs.limit(10).each do |blog| |
6 | feed.entry(blog, published: blog.published_at) do |entry| | 6 | feed.entry(blog, published: blog.published_at) do |entry| |
7 | entry.title(blog.title) | 7 | entry.title(blog.title) |
8 | entry.content(markdown(blog.body), type: 'html') | 8 | entry.content(markdown(blog.body), type: 'html') |
diff --git a/app/views/blogs/index.html.haml b/app/views/blogs/index.html.haml index e9639ca..75bf92f 100644 --- a/app/views/blogs/index.html.haml +++ b/app/views/blogs/index.html.haml | |||
@@ -1,3 +1,9 @@ | |||
1 | - @blogs.each do |blog| | 1 | #blog-archive |
2 | = render blog, short: true | 2 | %h2 Blog Archive |
3 | = will_paginate @blogs | 3 | .bubble.rounded |
4 | - @blogs.chunk {|blog| blog.published_at.strftime("%B %Y") }.each do |chunk| | ||
5 | %h3= chunk[0] | ||
6 | - chunk[1].each do |blog| | ||
7 | %p.archive-link | ||
8 | = link_to blog.title, blog | ||
9 | %small= blog.published_at.strftime("%-d %b %Y") | ||
diff --git a/app/views/blogs/summary.html.haml b/app/views/blogs/summary.html.haml new file mode 100644 index 0000000..e9639ca --- /dev/null +++ b/app/views/blogs/summary.html.haml | |||
@@ -0,0 +1,3 @@ | |||
1 | - @blogs.each do |blog| | ||
2 | = render blog, short: true | ||
3 | = will_paginate @blogs | ||