imgbox.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. include(get_stylesheet_directory().'/layouts/all_opt.php');
  3. $text_logo = iro_opt('text_logo');
  4. $print_social_zone = function() use ($all_opt,$social_display_icon):void{
  5. // 左箭头
  6. if (iro_opt('cover_random_graphs_switch', 'true')):?>
  7. <li id="bg-pre"><img src="<?=$social_display_icon?>pre.png" loading="lazy" alt="<?=__('Previous','sakurairo')?>"/></li>
  8. <?php
  9. endif;
  10. // 微信
  11. if (iro_opt('wechat')):?>
  12. <li class="wechat"><a href="#" title="WeChat"><img loading="lazy" src="<?=$social_display_icon?>wechat.png" /></a>
  13. <div class="wechatInner">
  14. <img class="wechat-img" style="height: max-content;width: max-content;" loading="lazy" src="<?=iro_opt('wechat', '')?>" alt="WeChat">
  15. </div>
  16. </li>
  17. <?php
  18. endif;
  19. // 大体(all_opt.php)
  20. foreach ($all_opt as $key => $value):
  21. if (!empty($value['link'])):
  22. // 显然 这里的逻辑可以看看all_opt的结构(
  23. $img_url = $value['img'] ?? ($social_display_icon . ($value['icon'] ?? $key) . '.png');
  24. $title = $value['title'] ?? $key;
  25. ?>
  26. <li><a href="<?=$value['link'];?>" target="_blank" class="social-<?=$value['class'] ?? $key?>" title="<?=$title?>"><img alt="<?=$title?>" loading="lazy" src="<?=$img_url?>" /></a></li>
  27. <?php
  28. endif;
  29. endforeach;
  30. // 邮箱
  31. if (iro_opt('email_name') && iro_opt('email_domain')):?>
  32. <li><a onclick="mail_me()" class="social-wangyiyun" title="E-mail"><img loading="lazy"
  33. alt="E-mail"
  34. src="<?=iro_opt('vision_resource_basepath')?><?=iro_opt('social_display_icon')?>/mail.png" /></a></li>
  35. <?php
  36. endif;
  37. // 右箭头
  38. if (iro_opt('cover_random_graphs_switch', 'true')):?>
  39. <li id="bg-next"><img loading="lazy" src="<?=$social_display_icon?>next.png" alt="<?=__('Next','sakurairo')?>"/></li>
  40. <?php endif;
  41. }
  42. ?>
  43. <?php
  44. /*未定义的伪类 */
  45. /* <style>
  46. .header-info::before {
  47. display: none !important;
  48. opacity: 0 !important;
  49. }
  50. </style> */
  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" loading="lazy" src="<?=iro_opt('personal_avatar', '') ?: iro_opt('vision_resource_basepath','https://s.nmxc.ltd/sakurairo_vision/@2.6/').'series/avatar.webp'?>"></a>
  62. </div>
  63. <?php endif; ?>
  64. <div class="header-container">
  65. <div class="header-info">
  66. <!-- 首页一言打字效果 -->
  67. <?php if (iro_opt('signature_typing', 'true')) : ?>
  68. <?php if (iro_opt('signature_typing_marks', 'true')) : ?><i class="fa-solid fa-quote-left"></i><?php endif; ?>
  69. <span class="element"><?=iro_opt('signature_typing_placeholder','疯狂造句中......')?></span>
  70. <?php if (iro_opt('signature_typing_marks', 'true')) : ?><i class="fa-solid fa-quote-right"></i><?php endif; ?>
  71. <span class="element"></span>
  72. <script type="application/json" id="typed-js-initial">
  73. <?= iro_opt('signature_typing_json', ''); ?>
  74. </script>
  75. <!-- var typed = new Typed('.element', {
  76. strings: ["给时光以生命,给岁月以文明", ], //输入内容, 支持html标签
  77. typeSpeed: 140, //打字速度
  78. backSpeed: 50, //回退速度
  79. loop: false, //是否循环
  80. loopCount: Infinity,
  81. showCursor: true //是否开启光标
  82. }); -->
  83. <?php endif; ?>
  84. <p><?php echo iro_opt('signature_text', 'Hi, Mashiro?'); ?></p>
  85. <?php if (iro_opt('infor_bar_style') === 'v2') : ?>
  86. <div class="top-social_v2">
  87. <?php $print_social_zone(); ?>
  88. </div>
  89. <?php endif; ?>
  90. </div>
  91. </div>
  92. <?php if (iro_opt('infor_bar_style') === 'v1') : ?>
  93. <div class="top-social">
  94. <?php $print_social_zone(); ?>
  95. </div>
  96. <?php endif; ?>
  97. </div>
  98. <?php } ?>
  99. </figure>
  100. <?php
  101. echo bgvideo(); //BGVideo
  102. ?>
  103. <!-- 首页下拉箭头 -->
  104. <?php if (iro_opt('drop_down_arrow', 'true')) : ?>
  105. <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>
  106. <?php endif; ?>