1
0

index.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. get_header();
  3. if (iro_opt('bulletin_board') == '1') {
  4. $text = iro_opt('bulletin_text');
  5. ?>
  6. <div class="notice" style="margin-top:60px">
  7. <?php if (iro_opt('bulletin_board_icon', 'true')) : ?>
  8. <div class="notice-icon"><?php esc_html_e('Notice', 'sakurairo'); ?></div>
  9. <?php endif; ?>
  10. <div class="notice-content">
  11. <?php if (strlen($text) > 142) { ?>
  12. <div class="scrolling-text"><?php echo esc_html($text); ?></div>
  13. <?php } else { ?>
  14. <?php echo esc_html($text); ?>
  15. <?php } ?>
  16. </div>
  17. </div>
  18. <?php
  19. }
  20. if (iro_opt('exhibition_area') == '1') {
  21. $layout = iro_opt('exhibition_area_style') == 'left_and_right' ? 'feature_v2' : 'feature';
  22. get_template_part('layouts/' . $layout);
  23. }
  24. ?>
  25. <div id="primary" class="content-area">
  26. <main id="main" class="site-main" role="main">
  27. <h1 class="main-title">
  28. <i class="<?php echo esc_attr(iro_opt('post_area_icon', 'fa-regular fa-bookmark')); ?>" aria-hidden="true"></i>
  29. <br>
  30. <?php echo esc_html(iro_opt('post_area_title', '文章')); ?>
  31. </h1>
  32. <?php
  33. if (have_posts()) :
  34. if (is_home() && !is_front_page()) : ?>
  35. <header>
  36. <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
  37. </header>
  38. <?php endif;
  39. get_template_part('tpl/content', 'thumb');
  40. else :
  41. get_template_part('tpl/content', 'none');
  42. endif;
  43. ?>
  44. </main>
  45. <?php if (iro_opt('pagenav_style') == 'ajax') { ?>
  46. <div id="pagination"><?php next_posts_link(__(' Previous', 'sakurairo')); ?></div>
  47. <div id="add_post"><span id="add_post_time" style="visibility: hidden;" title="<?php echo esc_attr(iro_opt('page_auto_load', '')); ?>"></span></div>
  48. <?php } else { ?>
  49. <nav class="navigator">
  50. <?php previous_posts_link('<i class="fa-solid fa-angle-left"></i>'); ?><?php next_posts_link('<i class="fa-solid fa-angle-right"></i>'); ?>
  51. </nav>
  52. <?php } ?>
  53. </div>
  54. <?php
  55. get_footer();
  56. ?>