explore/posts/popular: refactor post previews.
This commit is contained in:
17
app/views/explore/posts/_nav_links.html.erb
Normal file
17
app/views/explore/posts/_nav_links.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<%# date, selected_scale, scale %>
|
||||
|
||||
<span class="period">
|
||||
<% if selected_scale == scale %>
|
||||
<%= link_to "« prev", popular_explore_posts_path(date: prev_date_for_scale(date, scale), scale: scale), id: "paginator-prev", rel: "prev", "data-shortcut": "a left" %>
|
||||
<% else %>
|
||||
<%= link_to "« prev", popular_explore_posts_path(date: prev_date_for_scale(date, scale), scale: scale) %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to scale.capitalize, popular_explore_posts_path(date: date, scale: scale), class: "desc" %>
|
||||
|
||||
<% if selected_scale == scale %>
|
||||
<%= link_to "next »", popular_explore_posts_path(date: next_date_for_scale(date, scale), scale: scale), id: "paginator-next", rel: "next", "data-shortcut": "d right" %>
|
||||
<% else %>
|
||||
<%= link_to "next »", popular_explore_posts_path(date: next_date_for_scale(date, scale), scale: scale) %>
|
||||
<% end %>
|
||||
</span>
|
||||
Reference in New Issue
Block a user