1
0

footer.php 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?php
  2. /**
  3. * The template for displaying the footer.
  4. *
  5. * Contains the closing of the #content div and all content after.
  6. *
  7. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  8. *
  9. * @package Sakura
  10. */
  11. $reception_background = iro_opt('reception_background');
  12. ?>
  13. </div><!-- #content -->
  14. <?php comments_template('', true); ?>
  15. </div><!-- #page Pjax container-->
  16. <footer id="colophon" class="site-footer" role="contentinfo">
  17. <div class="site-info" theme-info="Sakurairo v<?php echo esc_html(IRO_VERSION); ?>">
  18. <div class="footertext">
  19. <div class="img-preload">
  20. <img alt="loading_svg" src="<?php echo esc_url(iro_opt('load_nextpage_svg')); ?>"><!-- 加载下一部分圈圈 -->
  21. </div>
  22. <?php if (iro_opt('footer_sakura', 'true')): ?>
  23. <div class="sakura-icon">
  24. <svg width="30px" height="30px" t="1682340134496" class="sakura-svg" viewBox="0 0 1049 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5240">
  25. <path d="M525.58396628 573.34694353s268.83106938-2.62915481 309.36387092 193.24287089l-76.46458293 21.90962291 12.92667757 84.13295086a214.05701289 214.05701289 0 0 1-96.84053193-4.82011663A224.79272784 224.79272784 0 0 1 525.58396628 578.38615666z" fill="#EE9ca7" p-id="5241"></path>
  26. <path d="M552.75189802 512.4381922s131.45773592-233.7756732 321.63325979-170.89505575L854.2283053 418.66500728l79.31283344 30.89256828a215.59068679 215.59068679 0 0 1-52.58309388 81.50379604 224.57363215 224.57363215 0 0 1-325.35789552-14.67944718z" fill="#EE9ca7" p-id="5242"></path>
  27. <path d="M508.49446078 494.0341093S317.00435871 306.48774025 426.77156822 139.31731943l69.4535037 38.78003191L547.4935884 109.30113636a214.05701289 214.05701289 0 0 1 65.72886796 71.86356201 225.01182435 225.01182435 0 0 1-98.37420505 310.67844912z" fill="#EE9ca7" p-id="5243"></path>
  28. <path d="M473.21996809 525.58396628S242.2925454 661.64272234 109.30113636 512.4381922l55.43134521-57.18411482-53.45947909-65.72886795a213.61882069 213.61882069 0 0 1 86.32391269-43.81924506 224.79272784 224.79272784 0 0 1 274.527572 175.27698099z" fill="#EE9ca7" p-id="5244"></path>
  29. <path d="M481.76472043 566.55496s72.0826585 258.31445093-106.4807652 348.14390364l-40.31370582-68.13892627-78.21735252 34.17901099a212.30424328 212.30424328 0 0 1-20.15685331-94.64956933 224.57363215 224.57363215 0 0 1 241.00584894-219.09622602z" fill="#EE9ca7" p-id="5245"></path>
  30. </svg>
  31. </div>
  32. <?php endif; ?>
  33. <p style="color: #666666;"><?php echo iro_opt('footer_info', ''); ?></p>
  34. </div>
  35. <div class="footer-device function_area">
  36. <?php if (iro_opt('footer_yiyan')): ?>
  37. <p id="footer_yiyan"></p>
  38. <?php endif; ?>
  39. <span style="color: #b9b9b9;">
  40. <?php if (iro_opt('footer_load_occupancy', 'true')): ?>
  41. <?php printf(
  42. esc_html__('Load Time %.3f seconds | %d Query | RAM Usage %.2f MB ', 'sakurairo'),
  43. timer_stop(0, 3), get_num_queries(), memory_get_peak_usage() / 1024 / 1024
  44. ); ?>
  45. <?php endif; ?>
  46. <?php if (iro_opt('footer_upyun', 'true')): ?>
  47. 本网站由 <a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank"> <img alt="upyun-logo" src="https://s.nmxc.ltd/sakurairo_vision/@2.7/options/upyun_logo.webp" style="display:inline-block;vertical-align:middle;width:60px;height:30px;"/> 提供 CDN 加速 / 云存储 服务
  48. <?php endif; ?>
  49. <br>
  50. <a href="https://github.com/mirai-mamori/Sakurairo" rel="noopener" target="_blank" id="site-info">Theme Sakurairo</a><a href="https://docs.fuukei.org/" rel="noopener" target="_blank" id="site-info"> by Fuukei</a>
  51. </span>
  52. </div>
  53. </div><!-- .site-info -->
  54. </footer><!-- #colophon -->
  55. </section><!-- #section -->
  56. <!-- m-nav-center -->
  57. <div id="mo-nav">
  58. <?php if (iro_opt('mobile_menu_user_avatar', 'true')): ?>
  59. <div class="m-avatar">
  60. <?php
  61. global $current_user;
  62. wp_get_current_user();
  63. if (is_user_logged_in()) { ?>
  64. <img alt="m-avatar" src="<?php echo get_avatar_url($current_user->ID, [64]); ?>">
  65. <?php } else { ?>
  66. <img alt="m-avatar" src="<?php echo iro_opt('unlisted_avatar');?>">
  67. <?php } ?>
  68. </div>
  69. <?php endif; ?>
  70. <?php if (wp_is_mobile() && iro_opt('mobile_menu_user_avatar', 'true')) m_user_menu(); ?>
  71. <div class="m-search">
  72. <form class="m-search-form" method="get" action="<?php echo esc_url(home_url()); ?>" role="search">
  73. <input class="m-search-input" type="search" name="s" placeholder="<?php esc_attr_e('Search...', 'sakurairo'); ?>" required>
  74. </form>
  75. </div>
  76. <?php wp_nav_menu(['depth' => 2, 'theme_location' => 'primary', 'container' => false]); ?>
  77. </div><!-- m-nav-center end -->
  78. <button id="moblieGoTop" title="<?php esc_attr_e('Go to top', 'sakurairo'); ?>"><i class="fa-solid fa-caret-up fa-lg"></i></button>
  79. <button id="changskin" title="<?php esc_attr_e('Control Panel', 'sakurairo'); ?>"><i class="fa-solid fa-compass-drafting fa-lg fa-flip"></i></button>
  80. <!-- search start -->
  81. <form class="js-search search-form search-form--modal" method="get" action="<?php echo esc_url(home_url()); ?>" role="search">
  82. <div class="search-form__inner">
  83. <?php if (iro_opt('live_search')): ?>
  84. <div class="micro">
  85. <input id="search-input" class="text-input" type="search" name="s" placeholder="<?php esc_attr_e('Want to find something?', 'sakurairo'); ?>" required>
  86. </div>
  87. <div class="ins-section-wrapper">
  88. <a id="Ty" href="#"></a>
  89. <div class="ins-section-container" id="PostlistBox"></div>
  90. </div>
  91. <?php else: ?>
  92. <div class="micro">
  93. <p class="micro mb-"><?php esc_html_e('Want to find something?', 'sakurairo'); ?></p>
  94. <input class="text-input" type="search" name="s" placeholder="<?php esc_attr_e('Search', 'sakurairo'); ?>" required>
  95. </div>
  96. <?php endif; ?>
  97. </div>
  98. <div class="search_close"></div>
  99. </form>
  100. <!-- search end -->
  101. <?php wp_footer(); ?>
  102. <div class="skin-menu no-select">
  103. <?php if (iro_opt('sakura_widget')): ?>
  104. <aside id="iro-widget" class="widget-area" role="complementary">
  105. <div class="sakura_widget">
  106. <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sakura_widget')): endif; ?>
  107. </div>
  108. </aside>
  109. <?php endif; ?>
  110. <div class="theme-controls row-container">
  111. <?php if (iro_opt('widget_daynight', 'true')): ?>
  112. <ul class="menu-list">
  113. <li id="white-bg" title="<?php esc_attr_e('Light Mode', 'sakurairo'); ?>">
  114. <i class="fa-regular fa-sun"></i>
  115. </li><!--Default-->
  116. <li id="dark-bg" title="<?php esc_attr_e('Dark Mode', 'sakurairo'); ?>">
  117. <i class="fa-regular fa-moon"></i>
  118. </li><!--Night-->
  119. </ul>
  120. <?php endif; ?>
  121. <?php if (array_search(1, $reception_background) !== false): ?>
  122. <ul class="menu-list" title="<?php esc_attr_e('Toggle Page Background Image', 'sakurairo'); ?>">
  123. <?php
  124. $bgIcons = [
  125. ['heart_shaped', 'fa-regular fa-heart', 'diy1-bg'],
  126. ['star_shaped', 'fa-regular fa-star', 'diy2-bg'],
  127. ['square_shaped', 'fa-brands fa-delicious', 'diy3-bg'],
  128. ['lemon_shaped', 'fa-regular fa-lemon', 'diy4-bg']
  129. ];
  130. foreach ($bgIcons as $bgIcon) {
  131. if ($reception_background[$bgIcon[0]] == '1') {
  132. echo '<li id="' . esc_attr($bgIcon[2]) . '">';
  133. echo '<i class="' . esc_attr($bgIcon[1]) . '"></i>';
  134. echo '</li>';
  135. }
  136. }
  137. ?>
  138. </ul>
  139. <?php endif; ?>
  140. <?php if (iro_opt('widget_font', 'true')): ?>
  141. <div class="font-family-controls row-container">
  142. <button type="button" class="control-btn-serif selected" title="<?php esc_attr_e('Switch To Font A', 'sakurairo'); ?>" data-name="serif">
  143. <i class="fa-solid fa-font fa-lg"></i>
  144. </button>
  145. <button type="button" class="control-btn-sans-serif" title="<?php esc_attr_e('Switch To Font B', 'sakurairo'); ?>" data-name="sans-serif">
  146. <i class="fa-solid fa-bold fa-lg"></i>
  147. </button>
  148. </div>
  149. <?php endif; ?>
  150. </div>
  151. </div>
  152. <?php if (iro_opt('aplayer_server') != 'off'): ?>
  153. <div id="aplayer-float" style="z-index: 100;" class="aplayer"
  154. data-id="<?php echo esc_attr(iro_opt('aplayer_playlistid', '')); ?>"
  155. data-server="<?php echo esc_attr(iro_opt('aplayer_server')); ?>"
  156. data-preload="<?php echo esc_attr(iro_opt('aplayer_preload')); ?>"
  157. data-type="playlist"
  158. data-fixed="true"
  159. data-order="<?php echo esc_attr(iro_opt('aplayer_order')); ?>"
  160. data-volume="<?php echo esc_attr(iro_opt('aplayer_volume', '')); ?>"
  161. data-theme="<?php echo esc_attr(iro_opt('theme_skin')); ?>">
  162. </div>
  163. <?php endif; ?>
  164. <!-- 首页波浪特效 -->
  165. <?php if (iro_opt('wave_effects', 'true')): ?>
  166. <?php if (!isset($shared_lib_basepath)) {
  167. $shared_lib_basepath = iro_opt('shared_library_basepath') ? get_template_directory_uri() : (iro_opt('lib_cdn_path', 'https://fastly.jsdelivr.net/gh/mirai-mamori/Sakurairo@') . IRO_VERSION);
  168. } ?>
  169. <link rel="stylesheet" href="<?php echo $shared_lib_basepath . '/css/wave.css'; ?>">
  170. <?php endif; ?>
  171. <?php echo iro_opt('footer_addition', ''); ?>
  172. </body>
  173. <!-- Particles动效 -->
  174. <?php if (iro_opt('particles_effects', 'true')): ?>
  175. <style>
  176. #particles-js {
  177. width: 100%;
  178. height: 100%;
  179. position: fixed;
  180. left: 0;
  181. right: 0;
  182. top: 0;
  183. bottom: 0;
  184. z-index: -1;
  185. }
  186. </style>
  187. <div id="particles-js"></div>
  188. <script type="application/json" id="particles-js-cfg"><?php echo iro_opt('particles_json', ''); ?></script>
  189. <?php endif; ?>
  190. </html>