TaoLer/view/taoler/index/article/blog/cate.html

158 lines
5.6 KiB
HTML
Raw Normal View History

2022-09-07 15:26:01 +08:00
{extend name="public/base" /}
{block name="title"}{$cateinfo.catename} - {$sysInfo.webname}{/block}
{block name="keywords"}{$cateinfo.catename},{$sysInfo.webname}{/block}
{block name="description"}{$cateinfo.desc}{/block}
{block name="ogtitle"}<meta property="og:title" content="{$cateinfo.catename} - {$sysInfo.webname}">{/block}
{block name="ogdescription"}<meta property="og:description" content="{$cateinfo.desc}" />{/block}
{block name="meta"}
<!-- SEO优化 -->
<meta name="Copyright" content="{$sysInfo.webname}">
<meta property="og:type" content="website"/>
<meta property="og:url" content="{$Request.domain}"/>
<meta property="og:site_name" content="{$sysInfo.webname}"/>
<meta property="og:image" content=""/>
{/block}
{block name="link"}
<!-- 特效丶样式 -->
<link rel="dns-prefetch" href="//q4.qlogo.cn">
<link rel="shortcut icon" type="image/x-icon" href="{$Request.domain}/favicon.ico"/>
<link rel="apple-touch-icon" sizes="180x180" href=""/>
<link rel="apple-touch-icon-precomposed" href=""/>
<link rel="stylesheet" href="{$Request.domain}/view/common/blog/css/style.css" type="text/css" charset="utf-8"/>
<script src="/static/jquery-3.6.0.min.js"></script>
{/block}
{block name="column"}{include file="/public/column" /}{/block}
{block name="content"}
<main class="py-2 py-md-2 pb-3">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="post"><h1>{$sysInfo.webname}</h1></div>
<section id="main" class="list-home list-grid list-grid-padding">
{volist name="artList['data']" id="art"}
<article class="list-item block card-plain">
{if getOnepic($art.content)}
<figure class="media media-3x2 col-4 col-md-4 d-none d-md-block">
<a class="media-content" href="{$art.url}" title="{$art.title}">
<img src="{:getOnepic($art.content)}" width="233" height="155" alt="{$art.title}">
</a>
</figure>
{/if}
<div class="list-width list-content">
<div class="list-body">
<h3>
<a href="{$Request.domain}{$art.url}" title="{$art.title}" class="list-title fanpian">{$art.title}</a>
</h3>
<div class="list-desc d-block d-md-block text-sm text-secondary my-3">
<p class="h-3x">{:getArtContent($art.content)}</p>
</div>
</div>
<div class="list-footer">
<div class="d-flex flex-fill align-items-center text-muted text-xs">
<time class="d-inline-block" datetime="{$art.create_time|date='Y-m-d'}">{$art.create_time|date='Y-m-d'}</time>
<div class="d-inline-block mx-1 mx-md-2">
<i class="text-primary">·</i>
</div>
<div class="d-inline-block">
<a href="{$Request.domain}{:url('user/home',['id'=>$art.user.id])}" class="text-muted" title="发布于{$art.user.name}" rel="category">{$art.user.nickname ?: $art.user.name}</a>
</div>
<div class="flex-fill"></div>
<div class="mx-1">
<a href="{$Request.domain}{$art.url}" class="text-muted">阅读全文</a>
</div>
</div>
</div>
</div>
</article>
{/volist}
</section>
<nav class="navigation pagination" role="navigation" aria-label="Posts Navigation">
<div class="nav-links" style="padding-bottom: 10px;" id="pages">
<ul class="page-navigator">
<li class='current'><span aria-current="page">1</span></li>
<li id="loadmore"><a style="margin-right: 0px;">当前第 1 页</a></li>
</ul>
</div>
</nav>
</div>
<div class="sidebar col-lg-4 d-none d-lg-block">
<div class="theiaStickySidebar">
{if showSlider(3)}
<dl class="function" id="rongkeji_tuwenad">
<dt style="display:none;"></dt>
{volist name="ad_cateImg" id="vo"}
<dd class="function_c">
<div><a href="{$vo.slid_href}" target="_blank" rel="nofollow"><img src="{$Request.domain}/{$vo.slid_img}" width="350" height="350" alt="图文广告"></a>
</div>
</dd>
{/volist}
</dl>
{/if}
<dl class="function" id="rongkeji_remenwenzhang">
<dt class="function_t">热门文章</dt>
<dd class="function_c">
<ul>
{volist name="artHot" id="vo"}
<li style="display: block;">
<div class="list-body fanpian">
<a href="{$Request.domain}{$vo.url}" target="_blank">{$vo.title}</a>
</div>
<div class="list-footer">
<div class="text-muted text-xs"><time class="d-inline-block">{$vo.create_time|date='Y-m-d'}</time></div>
</div>
</li>
{/volist}
</ul>
</dd>
</dl>
{notempty name="flinks"}
<dl class="function" id="divLinkage">
<dt class="function_t">友情链接</dt>
<dd class="function_c">
<ul>
{volist name="flinks" id="vo"}
<li class="link-item"><a href="{$vo.slid_href}" target="_blank" title="{$vo.slid_name}">{$vo.slid_name}</a></li>
{/volist}
</ul>
</dd>
</dl>
{/notempty}
</div>
</div>
</div>
</div>
</main>
{include file="public/menu" /}
{/block}
{block name="script"}
<script type='text/javascript' src="{$Request.domain}/view/common/blog/js/theme.js"></script>
<script>
layui.use(['laypage'], function(){
var laypage = layui.laypage;
var $ = layui.jquery;
//执行一个laypage实例
laypage.render({
elem: 'pages' //注意,这里的 test1 是 ID不用加 # 号
,count: "{$artList['total']}" //数据总数,从服务端得到
,limit: "{$artList['per_page']}"
,curr : "{$artList['current_page']}"
//获取起始页
,jump: function(obj, first){
//首次不执行
if(!first){
var page = obj.curr;
location.href ="{$path}/"+page+'.html';
}
}
});
});
</script>
{/block}