1
0

imgbox.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 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 loading="lazy" src="<?=iro_opt('personal_avatar', '') ?: iro_opt('vision_resource_basepath','https://s.nmxc.ltd/sakurairo_vision/@2.5/').'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 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 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. </div>
  96. <?php } ?>
  97. </figure>
  98. <?php
  99. echo bgvideo(); //BGVideo
  100. ?>
  101. <!-- 首页下拉箭头 -->
  102. <?php if (iro_opt('drop_down_arrow', 'true')) : ?>
  103. <div class="headertop-down faa-float animated" onclick="headertop_down()"><span><i class="fa fa-chevron-down"
  104. aria-hidden="true" style="color:<?php echo iro_opt('drop_down_arrow_color'); ?>"></i></span></div>
  105. <?php endif; ?>