1
0

imgbox.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. include(get_stylesheet_directory().'/layouts/all_opt.php');
  3. $text_logo = iro_opt('text_logo');
  4. if (iro_opt('social_display_icon', '') === 'display_icon/remix_iconfont'): ?>
  5. <link rel="stylesheet" href="<?=iro_opt('vision_resource_basepath'); ?>display_icon/remix_iconfont/remix_social.css">
  6. <?php endif;
  7. $print_social_zone = function() use ($all_opt): void {
  8. // 微信
  9. if (iro_opt('wechat')): ?>
  10. <li class="wechat"><a href="#" title="WeChat">
  11. <?php if (iro_opt('social_display_icon') === 'display_icon/remix_iconfont'): ?>
  12. <i class="remix_social icon-wechat"></i>
  13. <?php else: ?>
  14. <img loading="lazy" src="<?= iro_opt('vision_resource_basepath').iro_opt('social_display_icon').'/' . 'wechat.webp' ?>" />
  15. <?php endif; ?>
  16. </a>
  17. <div class="wechatInner">
  18. <img class="wechat-img" style="height: max-content;width: max-content;" loading="lazy" src="<?= iro_opt('wechat', '') ?>" alt="WeChat">
  19. </div>
  20. </li>
  21. <?php
  22. endif;
  23. // 大体(all_opt.php)
  24. foreach ($all_opt as $key => $value):
  25. if (!empty($value['link'])):
  26. $img_url = $value['img'] ?? (iro_opt('vision_resource_basepath').iro_opt('social_display_icon').'/' . ($value['icon'] ?? $key) . '.webp');
  27. $title = $value['title'] ?? $key;
  28. ?>
  29. <li><a href="<?= $value['link']; ?>" target="_blank" class="social-<?= $value['class'] ?? $key ?>" title="<?= $title ?>">
  30. <?php if (iro_opt('social_display_icon') === 'display_icon/remix_iconfont' && $key !== 'socialdiy1' && $key !== 'socialdiy2'): ?>
  31. <i class="remix_social icon-<?= $key ?>"></i>
  32. <?php else: ?>
  33. <img alt="<?= $title ?>" loading="lazy" src="<?= $img_url ?>" />
  34. <?php endif; ?>
  35. </a></li>
  36. <?php
  37. endif;
  38. endforeach;
  39. // 邮箱
  40. if (iro_opt('email_name') && iro_opt('email_domain')): ?>
  41. <li><a onclick="mail_me()" class="social-wangyiyun" title="E-mail">
  42. <?php if (iro_opt('social_display_icon') === 'display_icon/remix_iconfont'): ?>
  43. <i class="remix_social icon-mail"></i>
  44. <?php else: ?>
  45. <img loading="lazy" alt="E-mail" src="<?php echo iro_opt('vision_resource_basepath').iro_opt('social_display_icon').'/' . 'mail.webp'; ?>" />
  46. <?php endif; ?>
  47. </a></li>
  48. <?php
  49. endif;
  50. }
  51. ?>
  52. <div id="banner_wave_1"></div>
  53. <div id="banner_wave_2"></div>
  54. <figure id="centerbg" class="centerbg">
  55. <?php if (iro_opt('infor_bar')) { ?>
  56. <div class="focusinfo">
  57. <?php if (isset($text_logo['text']) && iro_opt('text_logo_options', 'true')) : ?>
  58. <h1 class="center-text glitch is-glitching Ubuntu-font" data-text="<?=$text_logo['text']; ?>">
  59. <?php echo $text_logo['text']; ?></h1>
  60. <?php else : ?>
  61. <div class="header-tou"><a href="<?php bloginfo('url'); ?>"><img alt="avatar" src="<?=iro_opt('personal_avatar', '') ?: iro_opt('vision_resource_basepath','https://s.nmxc.ltd/sakurairo_vision/@2.7/').'series/avatar.webp'?>"></a>
  62. </div>
  63. <?php endif; ?>
  64. <div class="header-info">
  65. <!-- 首页一言打字效果 -->
  66. <?php if (iro_opt('signature_typing', 'true')) : ?>
  67. <?php if (iro_opt('signature_typing_marks', 'true')) : ?><i class="fa-solid fa-quote-left"></i><?php endif; ?>
  68. <span class="element"><?=iro_opt('signature_typing_placeholder','疯狂造句中......')?></span>
  69. <?php if (iro_opt('signature_typing_marks', 'true')) : ?><i class="fa-solid fa-quote-right"></i><?php endif; ?>
  70. <span class="element"></span>
  71. <script type="application/json" id="typed-js-initial">
  72. <?= iro_opt('signature_typing_json', ''); ?>
  73. </script>
  74. <!-- var typed = new Typed('.element', {
  75. strings: ["给时光以生命,给岁月以文明", ], //输入内容, 支持html标签
  76. typeSpeed: 140, //打字速度
  77. backSpeed: 50, //回退速度
  78. loop: false, //是否循环
  79. loopCount: Infinity,
  80. showCursor: true //是否开启光标
  81. }); -->
  82. <?php endif; ?>
  83. <p><?php echo iro_opt('signature_text', 'Hi, Mashiro?'); ?></p>
  84. <?php if (iro_opt('infor_bar_style') === 'v2') : ?>
  85. <div class="top-social_v2">
  86. <?php $print_social_zone(); ?>
  87. </div>
  88. <?php endif; ?>
  89. </div>
  90. <?php if (iro_opt('infor_bar_style') === 'v1') : ?>
  91. <div class="top-social">
  92. <?php $print_social_zone(); ?>
  93. </div>
  94. <?php endif; ?>
  95. <?php if (iro_opt('cover_random_graphs_switch', 'true')): ?>
  96. <div class="bg-switch">
  97. <li id="bg-next" style="display: flex; gap: 6px; align-items: center; letter-spacing: 1px;"><i class="fa-solid fa-dice"></i><?= __('Change', 'sakurairo') ?></li>
  98. </div>
  99. <?php endif; ?>
  100. </div>
  101. <?php } ?>
  102. </figure>
  103. <?php
  104. echo bgvideo(); //BGVideo
  105. ?>
  106. <!-- 首页下拉箭头 -->
  107. <?php if (iro_opt('drop_down_arrow', 'true')) : ?>
  108. <div class="headertop-down" onclick="headertop_down()"><span><svg t="1682342753354" class="homepage-downicon" viewBox="0 0 1843 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21355" width="80px" height="80px"><path d="M1221.06136021 284.43250057a100.69380037 100.69380037 0 0 1 130.90169466 153.0543795l-352.4275638 302.08090944a100.69380037 100.69380037 0 0 1-130.90169467 0L516.20574044 437.48688007A100.69380037 100.69380037 0 0 1 647.10792676 284.43250057L934.08439763 530.52766665l286.97696258-246.09516608z" fill="<?php echo iro_opt('drop_down_arrow_color'); ?>" p-id="21356"></path></svg></span></div>
  109. <?php endif; ?>