mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
完成博客的不分页面
This commit is contained in:
@@ -43,6 +43,11 @@ class System extends Common
|
||||
|
||||
return View::fetch();
|
||||
}
|
||||
public function blog()
|
||||
{
|
||||
|
||||
return View::fetch();
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
|
||||
12
app/common/TextFormat.php
Normal file
12
app/common/TextFormat.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace app\common;
|
||||
|
||||
class TextFormat
|
||||
{
|
||||
public static function br($content){
|
||||
$content = str_replace("\n",'<br/>',$content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,29 @@ class Index extends Common
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
public function __blogIndex()
|
||||
{
|
||||
$list_category = Category::select();
|
||||
|
||||
$this->assign('list_category',$list_category);
|
||||
|
||||
$category_id = $this->request->param('category_id');
|
||||
|
||||
if(!empty($category_id)){
|
||||
|
||||
$model_list_post = Post::hasWhere('categorys',['category_id'=>$category_id])->order('sort desc');
|
||||
}else{
|
||||
|
||||
$model_list_post = Post::order('sort desc');
|
||||
}
|
||||
|
||||
$list_post = $model_list_post->paginate();
|
||||
|
||||
$this->assign('list_post',$list_post);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function __documentsIndex()
|
||||
{
|
||||
$list_index_documents_nav = Nav::where('type',9)->select();
|
||||
|
||||
244
public/static/css/index.blog.css
Normal file
244
public/static/css/index.blog.css
Normal file
@@ -0,0 +1,244 @@
|
||||
/**
|
||||
|
||||
@Name: layuiSimpleBlog - 极简博客模板
|
||||
@Author: xuzhiwen
|
||||
@Copyright: layui.com
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*end-menu-btn*/
|
||||
|
||||
|
||||
|
||||
body{font: 14px 宋体 Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; overflow-x: hidden;}
|
||||
.w1000{max-width: 1000px!important; margin:0 auto;}
|
||||
.header{height: 120px; line-height: 120px; position: relative; font-size: 16px;}
|
||||
.header .logo,.header .welcome-text,.header .nav{position: absolute; top: 0;}
|
||||
.header .logo{left: 65px;}
|
||||
.header .logo span{display: none;}
|
||||
.header .nav{left: 250px;}
|
||||
.header .nav a{color: #3f2863; margin:0 40px;}
|
||||
.header .nav a.active{color: #ff7f21;}
|
||||
.header .welcome-text{right: 50px;}
|
||||
.header .header-down-nav{display: none;}
|
||||
|
||||
|
||||
.banner{height: 600px; width: 100%; background: url(../img/banner.jpg) no-repeat; background-size:cover;}
|
||||
.banner .cont{position: relative;}
|
||||
.banner .title{color: #fff; position: absolute; top: 152px; left: 0;}
|
||||
.banner .title h3{font-size: 80px; line-height: 88px;}
|
||||
.banner .title h4{font-size: 46px;}
|
||||
.banner .amount{font-size: 18px; line-height: 50px; color: #ff7f21; position: absolute; right: 20px; top: 290px;}
|
||||
.banner .text{position: relative; width: 80px; display: inline-block;}
|
||||
.banner .text::before { position: absolute; right: -5px; content: '\FF1A';}
|
||||
|
||||
|
||||
.content{padding:100px 0 160px 0;}
|
||||
.content .cont .title{margin-bottom: 60px;}
|
||||
.content .cont .title a{font-size: 16px; color: #000!important;}
|
||||
.content .cont .title .layui-breadcrumb span{position: relative; top: -1px; margin:0 16px;}
|
||||
.content .cont .title a.active,.content .cont .title a:hover{color: #ff7f21!important;}
|
||||
.content .cont .list-item .layui-fluid{padding:0;}
|
||||
.content .cont .list-item .item{margin-bottom: 80px; overflow: hidden;}
|
||||
.content .cont .list-item .item .img img{width: 100%;}
|
||||
.content .cont .list-item .item .item-cont{padding-left: 100px;}
|
||||
.content .cont .list-item .item .item-cont .go-icon{width: 33px; height: 11px; background: url(../img/jiantou.png) center center no-repeat; display: block; padding:10px 0; margin-top: 16px;}
|
||||
.content .cont .list-item .item .item-cont h3{font-size: 24px; margin:20px 0;}
|
||||
.content .cont .list-item .item .item-cont h3 .new-icon{width: 36px; height: 18px; line-height: 18px; text-align: center; padding:0; margin: -3px 0 0 10px;}
|
||||
.content .cont .list-item .item .item-cont h5{font-size: 12px; color: #ff7f21; margin-bottom: 32px;}
|
||||
.content .cont .list-item .item .item-cont p{line-height: 37px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
/* autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
/* autoprefixer: on */
|
||||
}
|
||||
.content .review-version{padding:20px; border-top: 1px dashed #dddddd;}
|
||||
.content .review-version img{float: left;}
|
||||
.content .review-version .form{margin-bottom: 16px;}
|
||||
.content .review-version .form .layui-form-item{clear: none;}
|
||||
.content .review-version .form .layui-input-block{margin-left: 70px;}
|
||||
.content .review-version .form .layui-input-block .layui-btn{width: 100px; height: 40px; line-height: 40px; background: #ff7f21;}
|
||||
.content .review-version .list-cont .cont{padding:40px 0 30px 0; border-bottom: 1px solid #e5e5e5;}
|
||||
.content .review-version .list-cont .cont:last-child{border-bottom: 0;}
|
||||
.content .review-version .list-cont .cont .text{padding-left: 70px; line-height: 22px; color: #333; }
|
||||
.content .review-version .list-cont .cont .text .tit{margin-bottom: 18px;}
|
||||
.content .review-version .list-cont .cont .text .data{float: right;}
|
||||
|
||||
|
||||
.footer-wrap{border-top: 1px solid #402863;}
|
||||
.footer{padding:60px 0 80px 0; position: relative; overflow: hidden;}
|
||||
.footer .qrcode{float: left;}
|
||||
.footer .practice-mode{position: absolute; right: 0; overflow: hidden;}
|
||||
.footer .practice-mode img{float: left; padding-right: 28px;}
|
||||
.footer .practice-mode .text{color: #3f2863; float: left;}
|
||||
.footer .practice-mode .text h4{font-size: 20px; line-height: 60px;}
|
||||
.footer .practice-mode .text p{line-height: 32px;}
|
||||
.footer .practice-mode .text p span{padding-left: 24px;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*whisper*/
|
||||
.whisper-content{padding:40px 0 100px 0;}
|
||||
.whisper-content .item-box{background: #f9f9f9; margin-bottom: 20px;}
|
||||
.whisper-content .cont{max-width: 800px; margin:0 auto;}
|
||||
.whisper-content .cont .item-box .item{padding:50px 46px 20px 54px;}
|
||||
.whisper-content .cont .whisper-list .whisper-title{height: 20px; line-height: 20px; margin-bottom: 20px;}
|
||||
.whisper-content .cont .whisper-list .whisper-title i{position: relative; top: 1px; margin-right: 5px;}
|
||||
.whisper-content .cont .whisper-list .whisper-title span{color: #ff7f21;}
|
||||
.whisper-content .cont .whisper-list .whisper-title span.hour{margin-right: 20px;}
|
||||
.whisper-content .whisper-list .text-cont{line-height: 24px; margin-bottom: 28px;}
|
||||
.whisper-content .whisper-list .op-list{margin-top: 30px; overflow: hidden;}
|
||||
.whisper-content .whisper-list .op-list .like{ -webkit-user-select: none;
|
||||
-moz-user-focus: none;
|
||||
-moz-user-select: none;}
|
||||
.whisper-content .whisper-list .op-list .like.active{color: #ff7f21;}
|
||||
.whisper-content .whisper-list .op-list p{float: left; cursor: pointer; color: #999999;}
|
||||
.whisper-content .whisper-list .op-list p.off{float: right; -webkit-user-select: none;
|
||||
-moz-user-focus: none;
|
||||
-moz-user-select: none;}
|
||||
.whisper-content .whisper-list .op-list p.off span{margin-right: 5px;}
|
||||
.whisper-content .whisper-list .op-list p.like{margin-right: 50px;}
|
||||
.whisper-content .whisper-list .img-box{overflow: hidden;}
|
||||
.whisper-content .whisper-list .img-box img{float: left; margin: 0px 18px 18px 0;}
|
||||
.whisper-content .whisper-list .img-box img:last-child{margin-right: 0;}
|
||||
/*end-whisper*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*leacots*/
|
||||
.leacots-content .review-version{padding:0; border-top: 0;}
|
||||
.leacots-content .review-version .form .layui-form-item{clear: both;}
|
||||
.leacots-content .item-box{background: transparent;}
|
||||
.leacots-content .review-version .form{margin: 70px 0;}
|
||||
.leacots-content .review-version .form textarea{border-color: #402760;}
|
||||
.leacots-content .review-version .form .layui-input-block{margin-left: 0;}
|
||||
.leacots-content .review-version .banner-img{float: none; width: 100%;}
|
||||
.leacots-content .review-version .volume{color: #3f2469;}
|
||||
.leacots-content .review-version .volume span{padding-left: 30px; color: #f37d25;}
|
||||
.leacots-content .review-version .list-cont .cont{max-width: 100%;}
|
||||
/*end-leacots*/
|
||||
|
||||
|
||||
|
||||
/*details*/
|
||||
.details-content .article-cont img{float: none; width: 100%;}
|
||||
.details-content .article-cont .title{text-align: center; margin-bottom: 0;}
|
||||
.details-content .article-cont .title h3{font-size: 24px; margin-bottom: 36px;}
|
||||
.details-content .article-cont .title p{padding:0;}
|
||||
.details-content .article-cont .title p.cont-info{text-indent: 0;}
|
||||
.details-content .article-cont .title p .data{margin-right: 26px;}
|
||||
.details-content .article-cont .title p .types{color: #ff7f21;}
|
||||
.details-content .article-cont p{line-height: 24px; padding:30px 0 30px 5px; color: #333; text-indent: 40px;}
|
||||
.details-content .article-cont .btn-box{text-align: center; margin-top: 50px;}
|
||||
/*end-details*/
|
||||
|
||||
|
||||
/*album*/
|
||||
.album-content .img-info{margin-top: 66px; overflow: hidden; font-size: 16px; margin-bottom: 126px;}
|
||||
.album-content .img-info img{float: left; padding-right: 60px;}
|
||||
.album-content .img-info .title{line-height: 30px; margin-top: 124px; padding-left: 20px;}
|
||||
.album-content .img-info .title .data{color: #ff7f21;}
|
||||
.album-content .img-info .title .data span{padding-left: 35px;}
|
||||
.album-content .img-list{overflow: hidden; padding-bottom: 50px;}
|
||||
.album-content .img-list .item{float: left; width: 100%;}
|
||||
.album-content .img-list .layui-laypage{margin: 50px 0;}
|
||||
.album-content .img-list .space>*{padding: 55px;}
|
||||
.album-content .img-list .layui-col-space80{padding: 40px;}
|
||||
.album-content .img-list .item img{width: 100%;}
|
||||
.album-content .img-list .cont-text{padding-left: 10px;}
|
||||
.album-content .img-list .cont-text .data{line-height: 55px; color: #ff7f21;}
|
||||
.album-content .img-list .cont-text .briefly{line-height: 24px; margin-top: 16px;}
|
||||
/*end-album*/
|
||||
|
||||
|
||||
/*about*/
|
||||
.about-content{background: #faf8fb;}
|
||||
.about-content .item{padding-bottom: 100px;}
|
||||
.about-content .item h3{font-size: 24px; color: #3f2863; line-height: 100px;}
|
||||
.about-content .item.info .cont{overflow: hidden;}
|
||||
.about-content .item.info img{float: left; height: 220px; margin-right:86px; }
|
||||
.about-content .item.info p{line-height: 50px; margin-top: 15px;}
|
||||
.about-content .item.info p{font-size: 16px;}
|
||||
.about-content .item.tool .cont-box{text-align: center;}
|
||||
.about-content .item.tool .cont-box img{ }
|
||||
.about-content .item.tool .cont-box p{line-height: 56px;}
|
||||
.about-content .item.contact .cont{overflow: hidden;}
|
||||
.about-content .item.contact .cont img{width: 110px; height: 110px; float: left; margin:0 100px;}
|
||||
.about-content .item.contact .cont .text{line-height: 36px;}
|
||||
/*end-about*/
|
||||
|
||||
@media screen and (max-width: 1200px){
|
||||
.header .logo{left: 20px;}
|
||||
.header .nav{left: 150px;}
|
||||
.header .nav a{margin: 0 20px;}
|
||||
.content .cont .title{padding-left:10px;}
|
||||
.content .cont .list-item .item .img{padding:0 10px;}
|
||||
.content .cont .list-item .item .item-cont{padding:0 20px;}
|
||||
.content .cont .list-item .item .item-cont h3{margin:15px 0; font-size: 22px;}
|
||||
.content .cont .list-item .item .item-cont h5{margin-bottom: 10px;}
|
||||
.content .cont .list-item .item .item-cont p{line-height: 30px;}
|
||||
.content .cont .list-item .item .item-cont .go-icon{margin-top: 5px;}
|
||||
.content .cont .list-item .item{margin-bottom: 50px;}
|
||||
.content{padding:60px 0 60px 0;}
|
||||
.whisper-content{padding:0 0 60px 0;}
|
||||
.details-content .article-cont .title{padding:0;}
|
||||
.details-content .article-cont .title h3{font-size: 22px;}
|
||||
}
|
||||
@media screen and (max-width: 1000px){
|
||||
.leacots-content{padding:0 20px 40px 20px;}
|
||||
.album-content .img-info img{width: 100%; padding-right: 0; margin-bottom: 20px;}
|
||||
.album-content .img-info{margin-top: 0px; margin-bottom: 50px;}
|
||||
.album-content .img-list .space>*{padding:30px;}
|
||||
}
|
||||
@media screen and (max-width: 768px){
|
||||
.header .nav,.header .welcome-text{display: none;}
|
||||
.banner .amount{line-height: 40px; }
|
||||
.banner .title{top: 245px;}
|
||||
.banner .title h3{font-size: 40px; line-height: 44px;}
|
||||
.banner .title h4{font-size: 24px;}
|
||||
.footer{padding-left: 0;}
|
||||
.footer .qrcode{float: none; margin-bottom: 40px; margin-left: 10px;}
|
||||
.footer .practice-mode{position: relative; margin-left: 10px;}
|
||||
.banner .title{top: 290px; left: 20px;}
|
||||
.banner .amount{left: 20px; top: 210px; line-height: 30px;}
|
||||
.whisper-content .cont .item{padding:30px;}
|
||||
.whisper-content .cont .item-box .item{padding:30px;}
|
||||
.content .review-version .list-cont .cont .text{padding-left:0; line-height: 22px; color: #333; }
|
||||
.content .review-version .list-cont .cont .text .tit{line-height: 50px; margin-bottom: 0;}
|
||||
.content .review-version .list-cont .cont .text .tit .name{margin-left: 20px;}
|
||||
.content .review-version .list-cont .cont .text .ct{margin-top: 20px;}
|
||||
.leacots-content .review-version .form{margin:40px 0;}
|
||||
.album-content .img-list .space>*{padding:10px;}
|
||||
.album-content .img-list .layui-laypage{margin: 50px 0 0 0;}
|
||||
.album-content .img-list #demo{text-align: center;}
|
||||
.about-content .item.info img{margin-right: 0; float: none; height: auto; width: 100%;}
|
||||
.about-content .item.info p{padding-left:20px;}
|
||||
.about-content .item{padding-bottom: 40px;}
|
||||
.about-content .item h3{padding-left: 20px;}
|
||||
.about-content .item.contact .cont img{margin:0 30px 0 20px;}
|
||||
/*menu-btn*/
|
||||
.menu { width: 50px; height: 40px; position: relative; cursor: pointer;}
|
||||
.menu:before, .menu:after { content: ""; display: block; width: 50px; height: 6px; background: #ff7f21; border-radius: 8px; position: absolute; left: 0; -webkit-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out; }
|
||||
.menu:before { top: 0px; box-shadow: 0 34px #ff7f21;}
|
||||
.menu:after { bottom: 17px; }
|
||||
.menu.on:before { top: 17px; box-shadow: none; -webkit-transform: rotate(225deg); transform: rotate(225deg); }
|
||||
.menu.on:after { bottom: 17px; -webkit-transform: rotate(135deg); transform: rotate(135deg); }
|
||||
.menu-btn{position: absolute; top: 40px; right: 20px;}
|
||||
.header .header-down-nav { width: 100%; position: absolute; top: 120px; z-index: 2; left: 0; padding: 0; border-radius: 0;}
|
||||
.header .header-down-nav {background: #ff7f21;}
|
||||
.header .header-down-nav .layui-nav-item a{padding:0 40px;}
|
||||
.header .header-down-nav li {display: block;}
|
||||
.header .header-down-nav li a{font-size: 16px;}
|
||||
@media screen and (max-width: 320px){
|
||||
.whisper-content .cont .item img{width: 100%;}
|
||||
}
|
||||
@@ -67,6 +67,21 @@
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
{if get_system_config('index_tpl_name') == 'blog_' }
|
||||
|
||||
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a class="" href="javascript:;">博客主题</a>
|
||||
<dl class="layui-nav-child">
|
||||
|
||||
<dd class="left-nav-item" data-name="pc-nav-6">
|
||||
<dd class="left-nav-item" data-name="blog"><a href="{:url('System/blog')}">一般参数</a></dd>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
|
||||
122
view/admin/system/blog.html
Normal file
122
view/admin/system/blog.html
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>系统管理</title>
|
||||
{include file="common/_require"}
|
||||
|
||||
<script>
|
||||
var currentHeaderNavItem = 'System';
|
||||
var currentLeftNavItem = 'blog';
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="layui-layout-body">
|
||||
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
{include file="common/_header"}
|
||||
|
||||
{include file="common/left_system"}
|
||||
|
||||
<div class="layui-body">
|
||||
|
||||
<div style="padding:15px">
|
||||
<div class="main-header">
|
||||
<span class="layui-breadcrumb">
|
||||
<a>首页</a>
|
||||
<a><cite>系统设置</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<div class="layui-col-md6">
|
||||
<fieldset class="layui-elem-field">
|
||||
<legend>系统管理</legend>
|
||||
<div class="layui-field-box">
|
||||
<form class="layui-form" action="{:url('admin/System/update')}" method="post"
|
||||
lay-filter="*">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">欢迎语</div>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="blog_welcome_tips" value="{:get_system_config('blog_welcome_tips')}" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">首页背景大图</div>
|
||||
<div class="layui-input-block">
|
||||
<div>
|
||||
<div class="layui-btn upload-index-bg">上传</div>
|
||||
</div>
|
||||
<div>
|
||||
<img class="index-bg" style="max-width: 200px;"
|
||||
src="{:get_source_link(get_system_config('blog_index_bg_img'))}" alt="">
|
||||
</div>
|
||||
<input type="hidden" name="blog_index_bg_img" value="{:get_system_config('blog_index_bg_img')}"
|
||||
class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">首页背景大标题(支持换行)</div>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="blog_index_bg_title" class="layui-textarea">{:get_system_config('blog_index_bg_title')}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">首页背景小标题(支持换行)</div>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="blog_index_bg_title_plus" class="layui-textarea">{:get_system_config('blog_index_bg_title_plus')}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid" submit lay-submit lay-filter="site-info">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{include file="common/_footer"}
|
||||
|
||||
<script>
|
||||
layui.use(['layer', 'form','upload'], function () {
|
||||
|
||||
var form = layui.form;
|
||||
var upload = layui.upload;
|
||||
|
||||
form.val('*', {
|
||||
index_tpl_name: '{:get_system_config("index_tpl_name")}'
|
||||
})
|
||||
|
||||
var uploadSiteLogo = upload.render({
|
||||
elem: '.upload-index-bg',
|
||||
url: '{:url("File/save")}',
|
||||
data: {
|
||||
type: 1,
|
||||
dir: 'site_logo'
|
||||
},
|
||||
accept: 'images',
|
||||
done: function (result) {
|
||||
if (result.code == 0) {
|
||||
layer.msg('上传成功');
|
||||
$('input[name="blog_index_bg_img"]').val(result.data.save_name);
|
||||
$('.index-bg').attr('src', result.data.src);
|
||||
} else {
|
||||
layer.msg(result.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</div>`
|
||||
</body>
|
||||
|
||||
</html>
|
||||
2
view/index/common/_blog_require.html
Normal file
2
view/index/common/_blog_require.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{include file='common/_require'/}
|
||||
<link rel="stylesheet" href="/static/css/index.blog.css">
|
||||
137
view/index/index/blog_index.html
Normal file
137
view/index/index/blog_index.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<title>Document</title>
|
||||
{include file='common/_blog_require'/}
|
||||
|
||||
<!--加载meta IE兼容文件-->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<style>
|
||||
|
||||
.item .img{
|
||||
display: flex;justify-content: center;align-items: center;height: 200px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.index-bg-img{
|
||||
background-image: url('{:get_source_link(get_system_config("blog_index_bg_img"))}');
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="menu-btn">
|
||||
<div class="menu"></div>
|
||||
</div>
|
||||
<h1 class="logo">
|
||||
<a href="index.html">
|
||||
<span>{:get_system_config('site_name')}</span>
|
||||
<img src="{:get_source_link(get_system_config('site_logo'))}">
|
||||
</a>
|
||||
</h1>
|
||||
<div class="nav">
|
||||
{volist name='list_header_nav' id='nav'}
|
||||
<a href="{$nav.value}" target="{$nav.target}">{$nav.title}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
|
||||
<p class="welcome-text">
|
||||
{:get_system_config('blog_welcome_tips','欢迎来到'.get_system_config('site_name').'的博客')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="banner index-bg-img">
|
||||
<div class="cont w1000">
|
||||
<div class="title">
|
||||
<h3>{:app\\common\\TextFormat::br(get_system_config('blog_index_bg_title'))}</h3>
|
||||
<h4>{:app\\common\\TextFormat::br(get_system_config('blog_index_bg_title_plus'))}</h4>
|
||||
</div>
|
||||
<div class="amount">
|
||||
<p><span class="text">访问量</span><span class="access">1000</span></p>
|
||||
<p><span class="text">日志</span><span class="daily-record">1000</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="cont w1000">
|
||||
<div class="title">
|
||||
<span class="layui-breadcrumb" lay-separator="|">
|
||||
<a href="{:url('index',['category_id'=>0])}" {eq name='$Request.param.category_id|default=0' value='0'} class="active" {/eq}>全部</a>
|
||||
{volist name='list_category' id='category'}
|
||||
|
||||
<a href="{:url('index',['category_id'=>$category.id])}" {eq name='$Request.param.category_id' value='$category.id'} class="active" {/eq}>{$category.title}</a>
|
||||
{/volist}
|
||||
</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
{volist name='list_post' id='post'}
|
||||
|
||||
<div class="item">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs12 layui-col-sm4 layui-col-md5">
|
||||
<div class="img"><img src="{$post.poster}" alt=""></div>
|
||||
</div>
|
||||
<div class="layui-col-xs12 layui-col-sm8 layui-col-md7">
|
||||
<div class="item-cont">
|
||||
<h3>{$post.title}<button class="layui-btn layui-btn-danger new-icon">new</button></h3>
|
||||
<h5>
|
||||
{volist name='post.categorys' id='post_category'}
|
||||
<span>{$post_category.category.title}</span>
|
||||
{/volist}
|
||||
</h5>
|
||||
|
||||
<p>{$post.desc}</p>
|
||||
<a href="details.html" class="go-icon"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
|
||||
</div>
|
||||
<div id="demo" style="text-align: center;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-wrap">
|
||||
<div class="footer w1000">
|
||||
<div class="qrcode">
|
||||
<img src="../res/img/erweima.jpg">
|
||||
</div>
|
||||
<div class="practice-mode">
|
||||
<img src="../res/img/down_img.jpg">
|
||||
<div class="text">
|
||||
<h4 class="title">我的联系方式</h4>
|
||||
<p>微信<span class="WeChat">1234567890</span></p>
|
||||
<p>手机<span class="iphone">1234567890</span></p>
|
||||
<p>邮箱<span class="email">1234567890@qq.com</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="../res/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
base: '../res/js/util/'
|
||||
}).use(['element','laypage','jquery','menu'],function(){
|
||||
element = layui.element,laypage = layui.laypage,$ = layui.$,menu = layui.menu;
|
||||
laypage.render({
|
||||
elem: 'demo'
|
||||
,count: 70 //数据总数,从服务端得到
|
||||
});
|
||||
menu.init();
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user