diff --git a/app/index/controller/Post.php b/app/index/controller/Post.php index ce4b7ba..87912cd 100644 --- a/app/index/controller/Post.php +++ b/app/index/controller/Post.php @@ -57,6 +57,19 @@ class Post extends Common return $this->fetch(); } + public function __documentsRead() + { + $category_id = $this->request->param('category_id',0); + + $list_post = []; + if(!empty($category_id)){ + $list_post = ModelPost::hasWhere('categorys',['category_id'=>$category_id])->order('sort desc')->select(); + } + + $this->assign('list_post',$list_post); + + } + /** * 显示编辑资源表单页. * diff --git a/app/model/Post.php b/app/model/Post.php index e67ab3d..7583db8 100644 --- a/app/model/Post.php +++ b/app/model/Post.php @@ -44,7 +44,6 @@ class Post extends Model return date('Y-m-d',$value); } - public function getCategorysListAttr() { $list_post_categorys = $this->getAttr('categorys'); diff --git a/public/static/css/index.documents.css b/public/static/css/index.documents.css index 8b2c56b..f5355b4 100644 --- a/public/static/css/index.documents.css +++ b/public/static/css/index.documents.css @@ -1,6 +1,7 @@ html, body { background-color: #f5f5f5; + } .program-item { @@ -26,4 +27,49 @@ body { .program-item .layui-icon{ font-size: 14px; +} + +.site-logo{ + display: flex; + align-items: center; + color: #fff; +} +.site-logo:hover{ + color: #fff; +} + +.site-logo img{ + max-height: 60px; +} + +.read-header{ + background-color: #6699CC; + color: #fff; +} + +.read-header .layui-breadcrumb a:hover{ + color: #99CCFF !important; +} + +.read-header .layui-breadcrumb a{ + color: #fff !important; +} + +.main-body{ + +} + + +.list-container li{ + list-style: unset; + margin-left: 15px; +} + +.post-title{ + margin: 15px 0; + font-size: 22px; +} + +.post-container{ + margin: 15px; } \ No newline at end of file diff --git a/view/admin/system/theme.html b/view/admin/system/theme.html index e6796ba..b107293 100644 --- a/view/admin/system/theme.html +++ b/view/admin/system/theme.html @@ -56,7 +56,6 @@ -
{:get_system_config('site_desc')}
-{:get_system_config('site_desc')}
+