<%= if Legendary.Content.Post.paginated_post?(@post) do %>
  <nav class="paginator">
    Page:
      <%= Enum.map(
        1..Legendary.Content.Post.content_page_count(@post),
        fn page ->
          if assigns[:current_page] == nil || assigns[:current_page] != page do
            link page, to: Routes.posts_path(@conn, :show, @post, page: page)
          else
            content_tag :span, page, class: "paginator-page"
          end
      end) %>
  </nav>
<% end %>
