mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 11:02:48 +08:00
开始文档
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace app\index\controller;
|
namespace app\index\controller;
|
||||||
|
|
||||||
use app\model\Category;
|
use app\model\Category;
|
||||||
|
use app\model\Nav;
|
||||||
use app\model\Post;
|
use app\model\Post;
|
||||||
use app\model\PostCategory;
|
use app\model\PostCategory;
|
||||||
use think\Request;
|
use think\Request;
|
||||||
@@ -21,6 +22,13 @@ class Index extends Common
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __documentsIndex()
|
||||||
|
{
|
||||||
|
$list_index_documents_nav = Nav::where('type',9)->select();
|
||||||
|
|
||||||
|
$this->assign('list_index_documents_nav',$list_index_documents_nav);
|
||||||
|
}
|
||||||
|
|
||||||
public function __articlesIndex()
|
public function __articlesIndex()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
29
public/static/css/index.documents.css
Normal file
29
public/static/css/index.documents.css
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
html,
|
||||||
|
body {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.program-item {
|
||||||
|
margin: 10px 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.program-item .desc {
|
||||||
|
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 4;
|
||||||
|
height: 96px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.program-item .options {
|
||||||
|
text-align: right; color: #999;font-size: 14px;margin-top: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.program-item .layui-icon{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
@@ -52,6 +52,21 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
{if get_system_config('index_tpl_name') == 'documents_' }
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<a href="{:url('Nav/index',['type'=>9,'show_img'=>0,'show_target'=>1])}">首页目录</a>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
||||||
<li class="layui-nav-item layui-nav-itemed">
|
<li class="layui-nav-item layui-nav-itemed">
|
||||||
|
|||||||
@@ -48,12 +48,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<input type="radio" name="index_tpl_name" value="articles_" title="资讯头条主题-'articles_'">
|
<input type="radio" name="index_tpl_name" value="articles_" title="资讯头条主题-'articles_'">
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<div>
|
||||||
<input type="radio" name="index_tpl_name" value="documents_" title="文档主题-'documents_'">
|
<input type="radio" name="index_tpl_name" value="documents_" title="文档主题-'documents_'">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="radio" name="index_tpl_name" value="blog_" title="博客主题-'blog_'">
|
<input type="radio" name="index_tpl_name" value="blog_" title="博客主题-'blog_'">
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
7
view/index/common/_documents_nav.html
Normal file
7
view/index/common/_documents_nav.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<span class="layui-breadcrumb" lay-separator="|">
|
||||||
|
{volist name='list_header_nav' id='nav'}
|
||||||
|
|
||||||
|
<a href="{$nav.value}" target="{$nav.target}">{$nav.title}</a>
|
||||||
|
{/volist}
|
||||||
|
|
||||||
|
</span>
|
||||||
3
view/index/common/_documents_require.html
Normal file
3
view/index/common/_documents_require.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{include file='common/_require'/}
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/static/css/index.documents.css">
|
||||||
51
view/index/index/documents_index.html
Normal file
51
view/index/index/documents_index.html
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{:get_system_config('site_name')}</title>
|
||||||
|
{include file='common/_documents_require'/}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-container">
|
||||||
|
<div class="layui-row" style="margin-top: 15px;">
|
||||||
|
<div class="layui-col-md10 layui-col-lg10 layui-col-md-offset1 layui-col-lg-offset1">
|
||||||
|
|
||||||
|
<h1>{:get_system_config('site_name')}</h1>
|
||||||
|
<p style="margin-top: 15px;">{:get_system_config('site_desc')}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md10 layui-col-lg10 layui-col-md-offset1 layui-col-lg-offset1">
|
||||||
|
{include file='common/_documents_nav'/}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row" style="margin-top: 15px;">
|
||||||
|
<div class="layui-col-md10 layui-col-lg10 layui-col-md-offset1 layui-col-lg-offset1 ">
|
||||||
|
{volist name='list_index_documents_nav' id='nav'}
|
||||||
|
<a href="{:url('Post/read',['id'=>$nav.id])}">
|
||||||
|
|
||||||
|
<div class="layui-col-md4 layui-col-lg4 ">
|
||||||
|
<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-body">
|
||||||
|
<div class="desc">
|
||||||
|
{$nav.desc|raw}
|
||||||
|
</div>
|
||||||
|
<div class="options">
|
||||||
|
详情 <i class="layui-icon layui-icon-right"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{/volist}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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