Files

124 lines
5.2 KiB
HTML

{template "header.html"}
<div class="ep-row ep-mt-8">
<div class="ep-col-main">
<link rel="stylesheet" href="{HOME_THEME_PATH}swiper/css/swiper.min.css">
<script src="{HOME_THEME_PATH}swiper/js/swiper.min.js"></script>
<div data-action="site_param:hdtp" class="tpl-edit-show ep-swiper-wrap swiper-container ep-mb-20">
<div class="swiper-wrapper">
<?php $mysite=dr_site_value('hdtp');?>
{loop $mysite $v}
<div class="swiper-slide">
<a href="{$v[3]}" target="_blank" rel="noopener"><img src="{dr_get_file($v[1])}" alt="" /></a>
</div>
{/loop}
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
<script>
var swiper = new Swiper('.swiper-container', {
spaceBetween: 0,
centeredSlides: true,
autoplay: { delay: 3500, disableOnInteraction: false },
pagination: { el: '.swiper-pagination', clickable: true },
navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' }
});
</script>
<div data-action="index_zuixin_data" class="tpl-edit-show" id="content_list">
{template "index_data.html"}
</div>
</div>
<div class="ep-col-side">
<div class="el-card tpl-edit-show ep-mb-20" data-action="index_zuixin">
<div class="el-card__header"><span>最新动态</span></div>
<div class="el-card__body ep-card-body--tight-y">
{module module=news num=6}
<div class="ep-latest-row">
<div class="ep-flex-grow">
<a href="{$t.url}" class="ep-latest-title">{dr_strcut($t.title, 18)}</a>
<div class="ep-latest-time">{$t.updatetime}</div>
</div>
<a href="{$t.url}" class="el-button el-button--primary is-plain is-circle ep-btn-icon-noshrink">
<i class="fa fa-angle-right"></i>
</a>
</div>
{/module}
</div>
</div>
<div class="el-card tpl-edit-show ep-mb-20" data-action="index_hits">
<div class="el-card__header"><span>热门资讯</span></div>
<div class="el-card__body">
{module module=news order=hits num=10}
<div class="ep-side-hit-row">
<img class="ep-thumb ep-thumb--sm" src="{dr_thumb($t.thumb)}" alt="" />
<div class="ep-flex-grow">
<a href="{$t.url}" class="ep-side-hit-title">{dr_strcut($t.title, 16)}</a>
<div class="ep-side-hit-desc">{dr_strcut($t.description, 40)}</div>
</div>
</div>
{/module}
</div>
</div>
<div class="el-card tpl-edit-show" data-action="site_param:yqlj">
<div class="el-card__header"><span>友情链接</span></div>
<div class="el-card__body">
<?php $mysite=dr_site_value('yqlj');?>
{loop $mysite $v}
<div class="ep-yqlj-row">
<a href="{dr_html2code($v[2])}" target="_blank" rel="noopener" class="el-link el-link--primary">{dr_html2code($v[1])}</a>
<a href="{dr_html2code($v[2])}" target="_blank" rel="noopener" class="el-button el-button--text"><i class="fa fa-external-link"></i></a>
</div>
{/loop}
</div>
</div>
</div>
</div>
<script>
var Mpage = 1;
var scroll_get = true;
$(document).ready(function () {
$(window).scroll(function () {
if (scroll_get == true && (400 + $(window).scrollTop()) > ($(document).height() - $(window).height())) {
scroll_get = false;
layer.msg('内容加载中,请稍候', { time: 1000 });
dr_ajax_load_more();
}
});
});
function dr_ajax_load_more() {
Mpage++;
$.get('/index.php?s=api&c=api&m=template&name=index_data.html&format=json&page=' + Mpage + '&' + Math.random(), function (res) {
$('.footer-cont').hide();
if (res.code == 1) {
if (res.msg.indexOf("<!--begin::Icon-->") != -1) {
$('#content_list').append(res.msg);
scroll_get = true;
} else {
layer.msg("已经显示完了", { time: 500 });
}
} else {
layer.msg(res.msg, { time: 2500 });
}
}, 'json');
}
(function () {
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
} else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
{template "footer.html"}