1
0

post-nextprev.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * NEXT / PREVIOUS POSTS (精华版)
  4. */
  5. if (iro_opt('article_nextpre') == '1') {
  6. ?>
  7. <section class="post-squares nextprev">
  8. <?php
  9. $classify_display_id = iro_opt('classify_display');
  10. $previous_style = get_next_post(false, $classify_display_id)? 'half' : 'full';
  11. $next_style = get_previous_post(false, $classify_display_id)? 'half' : 'full';
  12. $load_svg_url = iro_opt('vision_resource_basepath','https://s.nmxc.ltd/sakurairo_vision/@2.6/').'load_svg/outload.svg';
  13. $prev_link_html = '<div class="background lazyload" style="background-image:url('. $load_svg_url . ');" data-src="' . get_prev_thumbnail_url() . '"></div>' .
  14. '<span class="label">' .
  15. __("Previous Post",'sakurairo') .
  16. '</span>' .
  17. '<div class="info">' .
  18. '<h3>%title</h3><hr>' .
  19. '</div>';
  20. $next_link_html = '<div class="background lazyload" style="background-image:url('. $load_svg_url . ');" data-src="' . get_next_thumbnail_url() . '"></div>' .
  21. '<span class="label">' .
  22. __("Next Post",'sakurairo') .
  23. '</span>' .
  24. '<div class="info">' .
  25. '<h3>%title</h3><hr>' .
  26. '</div>';
  27. ?>
  28. <div class="post-nepre <?php echo $previous_style; ?> previous">
  29. <?php previous_post_link('%link', $prev_link_html, false, $classify_display_id ) ?>
  30. </div>
  31. <div class="post-nepre <?php echo $next_style; ?> next">
  32. <?php next_post_link('%link', $next_link_html, false, $classify_display_id ) ?>
  33. </div>
  34. </section>
  35. <?php } ?>