| 1 | <?php
|
| 2 |
|
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 |
|
| 9 |
|
| 10 | ?>
|
| 11 | <!DOCTYPE html>
|
| 12 | <html lang="zh-CN">
|
| 13 |
|
| 14 | <head>
|
| 15 | <?php $this->need('public/include.php'); ?>
|
| 16 | <link href="<?php _getAssets('assets/lib/swiper@5.4.5/swiper.min.css'); ?>" rel="stylesheet" />
|
| 17 | <script src="<?php _getAssets('assets/lib/swiper@5.4.5/swiper.min.js'); ?>"></script>
|
| 18 | <script src="<?php _getAssets('assets/lib/wowjs@1.1.3/wow.min.js'); ?>"></script>
|
| 19 | <link href="<?php _getAssets('assets/css/joe.index.min.css'); ?>" rel="stylesheet">
|
| 20 | <script src="<?php _getAssets('assets/js/joe.index.min.js'); ?>"></script>
|
| 21 | </head>
|
| 22 |
|
| 23 | <body>
|
| 24 | <div id="Joe">
|
| 25 | <?php $this->need('public/header.php'); ?>
|
| 26 | <div class="joe_container">
|
| 27 | <div class="joe_main">
|
| 28 | <div class="joe_index">
|
| 29 | <?php
|
| 30 | $carousel = [];
|
| 31 | $carousel_text = $this->options->JIndex_Carousel;
|
| 32 | if ($carousel_text) {
|
| 33 | $carousel_arr = explode("\r\n", $carousel_text);
|
| 34 | if (count($carousel_arr) > 0) {
|
| 35 | for ($i = 0; $i < count($carousel_arr); $i++) {
|
| 36 | $img = explode("||", $carousel_arr[$i])[0];
|
| 37 | $url = explode("||", $carousel_arr[$i])[1];
|
| 38 | $title = explode("||", $carousel_arr[$i])[2];
|
| 39 | $carousel[] = array("img" => trim($img), "url" => trim($url), "title" => trim($title));
|
| 40 | };
|
| 41 | }
|
| 42 | }
|
| 43 | $recommend = [];
|
| 44 | $recommend_text = $this->options->JIndex_Recommend;
|
| 45 | if ($recommend_text) {
|
| 46 | $recommend_arr = explode("||", $recommend_text);
|
| 47 | if (count($recommend_arr) === 2) $recommend = $recommend_arr;
|
| 48 | }
|
| 49 | ?>
|
| 50 | <?php if (sizeof($carousel) > 0 || sizeof($recommend) === 2) : ?>
|
| 51 | <div class="joe_index__banner">
|
| 52 | <?php if (sizeof($carousel) > 0) : ?>
|
| 53 | <div class="swiper-container">
|
| 54 | <div class="swiper-wrapper">
|
| 55 | <?php foreach ($carousel as $item) : ?>
|
| 56 | <div class="swiper-slide">
|
| 57 | <a class="item" href="<?php echo $item['url'] ?>" target="_blank" rel="noopener noreferrer nofollow">
|
| 58 | <img width="100%" height="100%" class="thumbnail lazyload" src="<?php _getLazyload() ?>" data-src="<?php echo $item['img'] ?>" alt="<?php echo $item['title'] ?>" />
|
| 59 | <div class="title"><?php echo $item['title'] ?></div>
|
| 60 | <svg class="icon" viewBox="0 0 1026 1024" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
|
| 61 | <path d="M784.3 1007.961a33.2 33.2 0 0 1-27.106-9.062L540.669 854.55 431.766 962.813c-9.062 9.062-36.168 18.044-45.23 9.062a49.72 49.72 0 0 1-27.106-45.23V727.763a33.2 33.2 0 0 1 9.463-27.106l343.071-370.578a44.748 44.748 0 0 1 63.274 63.274l-334.17 361.515v72.175l63.273-54.211a42.583 42.583 0 0 1 54.212-9.062l198.64 126.386L910.847 140.34 151.647 510.837 323.343 619.34c18.044 9.062 27.106 45.23 9.062 63.273-9.062 18.044-45.23 27.106-63.273 18.044L34.082 547.005c-8.981-8.982-18.043-17.723-18.043-36.168s9.062-27.105 27.105-36.167l903.79-451.815c18.043-9.062 36.167-9.062 45.229 0 18.284 9.223 18.284 27.106 18.284 45.15L829.69 971.794c0 18.043-9.062 27.105-27.105 36.167z" />
|
| 62 | </svg>
|
| 63 | </a>
|
| 64 | </div>
|
| 65 | <?php endforeach; ?>
|
| 66 | </div>
|
| 67 | <div class="swiper-pagination"></div>
|
| 68 | <div class="swiper-button-next"></div>
|
| 69 | <div class="swiper-button-prev"></div>
|
| 70 | </div>
|
| 71 | <?php endif; ?>
|
| 72 | <?php if (sizeof($recommend) === 2) : ?>
|
| 73 | <div class="joe_index__banner-recommend <?php echo sizeof($carousel) === 0 ? 'noswiper' : '' ?>">
|
| 74 | <?php foreach ($recommend as $cid) : ?>
|
| 75 | <?php $this->widget('Widget_Contents_Post@' . $cid, 'cid=' . $cid)->to($item); ?>
|
| 76 | <figure class="item">
|
| 77 | <a class="thumbnail" href="<?php $item->permalink() ?>" title="<?php $item->title() ?>">
|
| 78 | <img width="100%" height="100%" class="lazyload" src="<?php _getLazyload(); ?>" data-src="<?php echo _getThumbnails($item)[0]; ?>" alt="<?php $item->title() ?>" />
|
| 79 | </a>
|
| 80 | <figcaption class="information">
|
| 81 | <span class="type">推荐</span>
|
| 82 | <div class="text"><?php $item->title() ?></div>
|
| 83 | </figcaption>
|
| 84 | </figure>
|
| 85 | <?php endforeach; ?>
|
| 86 | </div>
|
| 87 | <?php endif; ?>
|
| 88 | </div>
|
| 89 | <?php endif; ?>
|
| 90 | <?php if ($this->options->JIndex_Hot === "on") : ?>
|
| 91 | <?php $this->widget('Widget_Contents_Hot@Index', 'pageSize=4')->to($item); ?>
|
| 92 | <div class="joe_index__hot">
|
| 93 | <ul class="joe_index__hot-list">
|
| 94 | <?php while ($item->next()) : ?>
|
| 95 | <li class="item">
|
| 96 | <a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>">
|
| 97 | <figure class="inner">
|
| 98 | <span class="views"><?php echo number_format($item->views); ?> ℃</span>
|
| 99 | <img width="100%" height="120" class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php echo _getThumbnails($item)[0]; ?>" alt="<?php $item->title(); ?>" />
|
| 100 | <figcaption class="title"><?php $item->title(); ?></figcaption>
|
| 101 | </figure>
|
| 102 | </a>
|
| 103 | </li>
|
| 104 | <?php endwhile; ?>
|
| 105 | </ul>
|
| 106 | </div>
|
| 107 | <?php endif; ?>
|
| 108 | <?php
|
| 109 | $index_ad_text = $this->options->JIndex_Ad;
|
| 110 | $index_ad = null;
|
| 111 | if ($index_ad_text) {
|
| 112 | $index_ad_arr = explode("||", $index_ad_text);
|
| 113 | if (count($index_ad_arr) === 2) $index_ad = array("image" => trim($index_ad_arr[0]), "url" => trim($index_ad_arr[1]));
|
| 114 | }
|
| 115 | ?>
|
| 116 | <?php if ($index_ad) : ?>
|
| 117 | <div class="joe_index__ad">
|
| 118 | <a class="joe_index__ad-link" href="<?php echo $index_ad['url'] ?>" target="_blank" rel="noopener noreferrer nofollow">
|
| 119 | <img width="100%" height="200" class="image lazyload" src="<?php _getLazyload() ?>" data-src="<?php echo $index_ad['image'] ?>" alt="<?php echo $index_ad['url'] ?>" />
|
| 120 | <span class="icon">广告</span>
|
| 121 | </a>
|
| 122 | </div>
|
| 123 | <?php endif; ?>
|
| 124 |
|
| 125 | <div class="joe_index__title">
|
| 126 | <ul class="joe_index__title-title">
|
| 127 | <li class="item" data-type="created">最新文章</li>
|
| 128 | <li class="item" data-type="views">热门文章</li>
|
| 129 | <li class="item" data-type="commentsNum">评论最多</li>
|
| 130 | <li class="item" data-type="agree">点赞最多</li>
|
| 131 | <li class="line"></li>
|
| 132 | </ul>
|
| 133 | <?php
|
| 134 | $index_notice_text = $this->options->JIndex_Notice;
|
| 135 | $index_notice = null;
|
| 136 | if ($index_notice_text) {
|
| 137 | $index_notice_arr = explode("||", $index_notice_text);
|
| 138 | if (count($index_notice_arr) === 2) $index_notice = array("text" => trim($index_notice_arr[0]), "url" => trim($index_notice_arr[1]));
|
| 139 | }
|
| 140 | ?>
|
| 141 | <?php if ($index_notice) : ?>
|
| 142 | <div class="joe_index__title-notice">
|
| 143 | <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
|
| 144 | <path d="M656.261 347.208a188.652 188.652 0 1 0 0 324.05v-324.05z" fill="#F4CA1C" />
|
| 145 | <path d="M668.35 118.881a73.35 73.35 0 0 0-71.169-4.06l-310.01 148.68a4.608 4.608 0 0 1-2.013.46h-155.11a73.728 73.728 0 0 0-73.728 73.636v349.64a73.728 73.728 0 0 0 73.728 73.636h156.554a4.68 4.68 0 0 1 1.94.43l309.592 143.196a73.702 73.702 0 0 0 104.668-66.82V181.206a73.216 73.216 0 0 0-34.453-62.326zM125.403 687.237v-349.64a4.608 4.608 0 0 1 4.608-4.608h122.035v358.882H130.048a4.608 4.608 0 0 1-4.644-4.634zm508.319 150.441a4.608 4.608 0 0 1-6.564 4.193L321.132 700.32V323.773l305.97-146.723a4.608 4.608 0 0 1 6.62 4.157v656.471zM938.26 478.72H788.01a34.509 34.509 0 1 0 0 69.018H938.26a34.509 34.509 0 1 0 0-69.018zM810.01 360.96a34.447 34.447 0 0 0 24.417-10.102l106.245-106.122a34.524 34.524 0 0 0-48.84-48.809L785.587 302.08a34.509 34.509 0 0 0 24.423 58.88zm24.417 314.609a34.524 34.524 0 1 0-48.84 48.814L891.832 830.52a34.524 34.524 0 0 0 48.84-48.809z" fill="#595BB3" />
|
| 146 | </svg>
|
| 147 | <a href="<?php echo $index_notice['url'] ?>" target="_blank" rel="noopener noreferrer nofollow"><?php echo $index_notice['text'] ?></a>
|
| 148 | </div>
|
| 149 | <?php endif; ?>
|
| 150 | </div>
|
| 151 | <div class="joe_index__list" data-wow="<?php $this->options->JList_Animate() ?>">
|
| 152 | <ul class="joe_list"></ul>
|
| 153 | <ul class="joe_list__loading">
|
| 154 | <li class="item">
|
| 155 | <div class="thumbnail"></div>
|
| 156 | <div class="information">
|
| 157 | <div class="title"></div>
|
| 158 | <div class="abstract">
|
| 159 | <p></p>
|
| 160 | <p></p>
|
| 161 | </div>
|
| 162 | </div>
|
| 163 | </li>
|
| 164 | <li class="item">
|
| 165 | <div class="thumbnail"></div>
|
| 166 | <div class="information">
|
| 167 | <div class="title"></div>
|
| 168 | <div class="abstract">
|
| 169 | <p></p>
|
| 170 | <p></p>
|
| 171 | </div>
|
| 172 | </div>
|
| 173 | </li>
|
| 174 | </ul>
|
| 175 | </div>
|
| 176 | </div>
|
| 177 | <div class="joe_load">查看更多</div>
|
| 178 | </div>
|
| 179 | <?php $this->need('public/aside.php'); ?>
|
| 180 | </div>
|
| 181 | <?php $this->need('public/footer.php'); ?>
|
| 182 | </div>
|
| 183 | </body>
|
| 184 |
|
| 185 | </html> |
| \ | No newline at end of file |