mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
完成文档主题
This commit is contained in:
@@ -57,6 +57,19 @@ class Post extends Common
|
|||||||
return $this->fetch();
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示编辑资源表单页.
|
* 显示编辑资源表单页.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ class Post extends Model
|
|||||||
return date('Y-m-d',$value);
|
return date('Y-m-d',$value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCategorysListAttr()
|
public function getCategorysListAttr()
|
||||||
{
|
{
|
||||||
$list_post_categorys = $this->getAttr('categorys');
|
$list_post_categorys = $this->getAttr('categorys');
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.program-item {
|
.program-item {
|
||||||
@@ -27,3 +28,48 @@ body {
|
|||||||
.program-item .layui-icon{
|
.program-item .layui-icon{
|
||||||
font-size: 14px;
|
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;
|
||||||
|
}
|
||||||
@@ -56,7 +56,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button class="layui-btn layui-btn-fluid" submit lay-submit lay-filter="site-info">保存</button>
|
<button class="layui-btn layui-btn-fluid" submit lay-submit lay-filter="site-info">保存</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{:get_system_config('site_name')}</title>
|
<title>{:get_system_config('site_name')}</title>
|
||||||
{include file='common/_documents_require'/}
|
{include file='common/_documents_require'/}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-container">
|
<div class="layui-container">
|
||||||
<div class="layui-row" style="margin-top: 15px;">
|
<div class="layui-row" style="margin-top: 15px;">
|
||||||
@@ -23,11 +25,12 @@
|
|||||||
<div class="layui-row" style="margin-top: 15px;">
|
<div class="layui-row" style="margin-top: 15px;">
|
||||||
<div class="layui-col-md10 layui-col-lg10 layui-col-md-offset1 layui-col-lg-offset1 ">
|
<div class="layui-col-md10 layui-col-lg10 layui-col-md-offset1 layui-col-lg-offset1 ">
|
||||||
{volist name='list_index_documents_nav' id='nav'}
|
{volist name='list_index_documents_nav' id='nav'}
|
||||||
<a href="{:url('Post/read',['id'=>$nav.id])}">
|
<a href="{$nav.value}">
|
||||||
|
|
||||||
<div class="layui-col-md4 layui-col-lg4 ">
|
<div class="layui-col-md4 layui-col-lg4 ">
|
||||||
<div class="layui-card program-item">
|
<div class="layui-card program-item">
|
||||||
<div class="layui-card-header"> <img style="width: 30px;height: 30px;" src="{$nav.img}" alt=""> {$nav.title}</div>
|
<div class="layui-card-header"> <img style="width: 30px;height: 30px;" src="{$nav.img}" alt="">
|
||||||
|
{$nav.title}</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
{$nav.desc|raw}
|
{$nav.desc|raw}
|
||||||
@@ -43,9 +46,21 @@
|
|||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md10 layui-col-lg10 layui-col-md-offset1 layui-col-lg-offset1" style="text-align: center;">
|
||||||
|
<span class="layui-breadcrumb" lay-separator="|">
|
||||||
|
{volist name='list_nav_friend_url' id='nav'}
|
||||||
|
|
||||||
|
<a href="{$nav.value}" target="{$nav.target}">{$nav.title}</a>
|
||||||
|
{/volist}
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-row" style="text-align: center;margin-top: 15px;">
|
<div class="layui-row" style="text-align: center;margin-top: 15px;">
|
||||||
<a href="http://www.beian.miit.gov.cn/" target="_blank">{:get_system_config('site_beian')}</a>
|
<a href="http://www.beian.miit.gov.cn/" target="_blank">{:get_system_config('site_beian')}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
67
view/index/post/documents_read.html
Normal file
67
view/index/post/documents_read.html
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{$post.title}-{:get_system_config('site_name')}</title>
|
||||||
|
{include file='common/_documents_require'/}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="layui-row read-header" style="display: flex;align-items: center;">
|
||||||
|
<div class=" layui-col-md2">
|
||||||
|
<a href="{:url('Index/index')}" class="site-logo">
|
||||||
|
|
||||||
|
<img src="{:get_source_link(get_system_config('site_logo'))}" alt="">
|
||||||
|
<div>{$post.title}</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md10">
|
||||||
|
{include file='common/_documents_nav'/}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row main-body">
|
||||||
|
{notempty name='list_post'}
|
||||||
|
|
||||||
|
<div class="layui-col-md2 full-height">
|
||||||
|
<div class="layui-card full-height">
|
||||||
|
<div class="layui-card-header"><a
|
||||||
|
href="{:url('read',['category_id'=>$Request.param.category_id,'id'=>$post.id])}">{$post.title}</a></div>
|
||||||
|
<div class="layui-card-body list-container">
|
||||||
|
<ol>
|
||||||
|
{volist name='list_post' id='l_post'}
|
||||||
|
|
||||||
|
<li><a
|
||||||
|
href="{:url('read',['category_id'=>$Request.param.category_id,'id'=>$l_post.id])}">{$l_post.title}</a>
|
||||||
|
</li>
|
||||||
|
{/volist}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/notempty}
|
||||||
|
|
||||||
|
<div class="layui-col-md10 {empty name='list_post'} layui-col-md-offset1 {/empty}">
|
||||||
|
<div class="post-container">
|
||||||
|
<div class="post-title">{$post.title}</div>
|
||||||
|
<div class="info">
|
||||||
|
<span>{$post->publish_time_text}</span>
|
||||||
|
</div>
|
||||||
|
<div class="post-content">
|
||||||
|
<div class="ql-snow">
|
||||||
|
<div class="ql-editor">{$post->content_html|raw}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-row" style="text-align: center;margin-top: 15px;">
|
||||||
|
<a href="http://www.beian.miit.gov.cn/" target="_blank">{:get_system_config('site_beian')}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user