-
Notifications
You must be signed in to change notification settings - Fork 49
Add blog achive page #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blog achive page #391
Conversation
Signed-off-by: Shizuo Fujita <[email protected]>
How about adding navigation under "Recent Posts" sidebar, too? |
Signed-off-by: Shizuo Fujita <[email protected]>
Thanks. Added 👍🏻 |
Signed-off-by: Shizuo Fujita <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Shizuo Fujita <[email protected]>
Signed-off-by: Shizuo Fujita <[email protected]>
Signed-off-by: Shizuo Fujita <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d like to hear your opinions, @Watson1978 and @kenhys.
If we were to implement it using only Bootstrap 3 features, it would probably look something like this..
However, from a design perspective, the current code seems better.
What concerns me is that none of the other views use page-specific styles.
Should we avoid using page-specific styles, or go ahead and use them?

views/blog_archive.erb
Outdated
<style> | ||
.pager{margin-top:20px;display:flex;gap:12px;align-items:center} | ||
.pager .page{opacity:.7} | ||
</style> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<style> | |
.pager{margin-top:20px;display:flex;gap:12px;align-items:center} | |
.pager .page{opacity:.7} | |
</style> |
views/blog_archive.erb
Outdated
<nav class="pager"> | ||
<% if page > 1 %> | ||
<a class="prev" href="?page=<%= page - 1 %>">« Newer</a> | ||
<% end %> | ||
<span class="page">Page <%= page %> / <%= total_pages %></span> | ||
<% if page < total_pages %> | ||
<a class="next" href="?page=<%= page + 1 %>">Older »</a> | ||
<% end %> | ||
</nav> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<nav class="pager"> | |
<% if page > 1 %> | |
<a class="prev" href="?page=<%= page - 1 %>">« Newer</a> | |
<% end %> | |
<span class="page">Page <%= page %> / <%= total_pages %></span> | |
<% if page < total_pages %> | |
<a class="next" href="?page=<%= page + 1 %>">Older »</a> | |
<% end %> | |
</nav> | |
<nav class="pull-left"> | |
<ul class="pager"> | |
<% if page > 1 %> | |
<li><a href="?page=<%= page - 1 %>">« Newer</a></li> | |
<% end %> | |
<li>Page <%= page %> / <%= total_pages %></li> | |
<% if page < total_pages %> | |
<li><a href="?page=<%= page + 1 %>">Older »</a></li> | |
<% end %> | |
</ul> | |
</nav> |
We discussed and decided to separate the pagination feature. |
Signed-off-by: Shizuo Fujita <[email protected]>
fa1b803
to
c0151db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this improvement!
This PR create blog achive page.

The archive page will be linked from bottom of blog page.