<% if (post.prev || post.next) { %>
  <nav id="article-nav" data-aos="<%= theme.animation.options.article.nav %>">
    <% if (post.prev) { %>
      <% const postByLang = get_post_by_lang(post.prev.permalink, post.lang); %>
      <div class="article-nav-link-wrap article-nav-link-left">
        <% if (post.prev.cover && !post.prev.cover.startsWith('rgb')) { %>
          <img data-src="<%- url_for(post.prev.cover, {relative: false}) %>" data-sizes="auto" alt="<%= postByLang.title %>" class="lazyload">
        <% } else { %>
          <% let cover = randomCover(); %>
          <% if (cover) { %>
            <img data-src="<%= cover %>" data-sizes="auto" alt="<%= postByLang.title %>" class="lazyload">
          <% } else { %>
            <img data-src="<%- url_for(theme.banner, {relative: false}) %>" data-sizes="auto" alt="<%= postByLang.title %>" class="lazyload">
          <% } %>
        <% } %>
        <a href="<%- url_for_lang(post.prev.path, {relative: false}) %>"></a>
        <div class="article-nav-caption"><%= __('newer') %></div>
        <h3 class="article-nav-title">
          <% if (postByLang.title) { %>
            <%= postByLang.title %>
          <% } else { %>
            (no title)
          <% } %>
        </h3>
      </div>
    <% } %>
    <% if (post.next) { %>
    <% const postByLang = get_post_by_lang(post.next.permalink, post.lang); %>
    <div class="article-nav-link-wrap article-nav-link-right">
      <% if (post.next.cover && !post.next.cover.startsWith('rgb')) { %>
        <img data-src="<%- url_for(post.next.cover, {relative: false}) %>" data-sizes="auto" alt="<%= postByLang.title %>" class="lazyload">
      <% } else { %>
        <% let cover = randomCover(); %>
        <% if (cover) { %>
          <img data-src="<%= cover %>" data-sizes="auto" alt="<%= postByLang.title %>" class="lazyload">
        <% } else { %>
          <img data-src="<%- url_for(theme.banner, {relative: false}) %>" data-sizes="auto" alt="<%= postByLang.title %>" class="lazyload">
        <% } %>
      <% } %>
      <a href="<%- url_for_lang(post.next.path, {relative: false}) %>"></a>
      <div class="article-nav-caption"><%= __('older') %></div>
      <h3 class="article-nav-title">
        <% if (postByLang.title) { %>
          <%= postByLang.title %>
        <% } else { %>
          (no title)
        <% } %>
      </h3>
    </div>
    <% } %>
  </nav>
<% } %>
