mirror of
https://gitee.com/ulthon/layui-ul.git
synced 2026-07-01 10:32:49 +08:00
新增头部和导航
This commit is contained in:
@@ -50,6 +50,9 @@ class Post extends Common
|
||||
{
|
||||
//
|
||||
|
||||
$list_category = Category::where('status', 1)->order('sort asc')->select();
|
||||
|
||||
View::assign('list_category', $list_category);
|
||||
return View::fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,6 @@ class Index extends Common
|
||||
*/
|
||||
public function index($post_id = 0)
|
||||
{
|
||||
//
|
||||
|
||||
|
||||
|
||||
$list_post = Post::quickSelect();
|
||||
|
||||
if (empty($post_id)) {
|
||||
@@ -30,7 +26,6 @@ class Index extends Common
|
||||
$model_post = $list_post->where('id', $post_id)->first();
|
||||
}
|
||||
|
||||
|
||||
View::assign('model_post', $model_post);
|
||||
|
||||
View::assign('list_post', $list_post);
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<?php
|
||||
|
||||
use think\facade\App;
|
||||
use think\facade\Env;
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 缓存设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
return [
|
||||
// 默认缓存驱动
|
||||
'default' => Env::get('cache.driver', 'file'),
|
||||
@@ -15,7 +18,7 @@ return [
|
||||
// 驱动方式
|
||||
'type' => 'File',
|
||||
// 缓存保存目录
|
||||
'path' => '',
|
||||
'path' => App::getRootPath() . 'runtime/cache',
|
||||
// 缓存前缀
|
||||
'prefix' => '',
|
||||
// 缓存有效期 0表示永久缓存
|
||||
|
||||
64
demo/header.html
Normal file
64
demo/header.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>通用PC头部</legend>
|
||||
<div class="layui-field-box">
|
||||
<div class="ul-section">
|
||||
<div class="ul-header">
|
||||
<div class="ul-header-main" style="max-width: 600px;">
|
||||
|
||||
<div class="ul-header-left">
|
||||
<div class="">
|
||||
<img class="ul-header-logo" src="/static/images/ulthon_logo_108.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ul-header-right">
|
||||
<div class="ul-header-user">
|
||||
<div class="ul-header-user-avatar">
|
||||
|
||||
</div>
|
||||
<div class="ul-header-user-info">
|
||||
<div class="ul-header-user-name">
|
||||
奥古斯宏
|
||||
</div>
|
||||
<div class="ul-header-user-options">
|
||||
<i class="ul-icon-exit"></i>
|
||||
<span>退出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ul-section">
|
||||
<div class="ul-header ">
|
||||
<div class="ul-header-main">
|
||||
|
||||
<div class="ul-header-left">
|
||||
<div class="">
|
||||
<img class="ul-header-logo" src="/static/images/ulthon_logo_108.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ul-header-right">
|
||||
<div class="ul-header-user">
|
||||
<div class="ul-header-user-avatar">
|
||||
|
||||
</div>
|
||||
<div class="ul-header-user-info">
|
||||
<div class="ul-header-user-name">
|
||||
奥古斯宏
|
||||
</div>
|
||||
<div class="ul-header-user-options">
|
||||
<i class="ul-icon-exit"></i>
|
||||
<span>退出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
26
demo/nav.html
Normal file
26
demo/nav.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>一般垂直导航</legend>
|
||||
<div class="layui-field-box">
|
||||
<ul class="layui-nav layui-nav-tree ul-nav-white">
|
||||
<!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a href="javascript:;">默认展开</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd class="layui-this"><a href="javascript:;">选项1</a></dd>
|
||||
<dd><a href="javascript:;">选项2</a></dd>
|
||||
<dd><a href="">跳转</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">解决方案</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">移动模块</a></dd>
|
||||
<dd><a href="">后台模版</a></dd>
|
||||
<dd><a href="">电商平台</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-this"><a href="">产品</a></li>
|
||||
<li class="layui-nav-item"><a href="">大数据</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</fieldset>
|
||||
6
demo/tpl.html
Normal file
6
demo/tpl.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>字段集区块 - 横线风格</legend>
|
||||
<div class="layui-field-box">
|
||||
内容区域
|
||||
</div>
|
||||
</fieldset>
|
||||
BIN
public/cdn/img/exit.png
Normal file
BIN
public/cdn/img/exit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -1,3 +1,4 @@
|
||||
/* 列表开始 */
|
||||
.ul-nav-tree {
|
||||
border-right: 1px solid #bbb;
|
||||
}
|
||||
@@ -20,14 +21,32 @@
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* 列表结束 */
|
||||
|
||||
/* 通用类开始 */
|
||||
.ul-padding-md {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.ul-avatar-list {
|
||||
|
||||
.ul-section {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.ul-icon-exit {
|
||||
display : inline-block;
|
||||
width : 16px;
|
||||
height : 16px;
|
||||
background-image : url('img/exit.png');
|
||||
background-size : cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
/* 通用类结束 */
|
||||
|
||||
/* 用户头像开始 */
|
||||
|
||||
.ul-avatar-list {}
|
||||
|
||||
.ul-avatar-list-item {
|
||||
display : flex;
|
||||
align-items : center;
|
||||
@@ -35,9 +54,11 @@
|
||||
padding : 8px;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.ul-avatar-list-item.current {
|
||||
background-color: #bbb;
|
||||
}
|
||||
|
||||
.ul-avatar-list-item-img {
|
||||
height : 48px;
|
||||
width : 48px;
|
||||
@@ -70,3 +91,98 @@
|
||||
overflow : hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 头像结束 */
|
||||
|
||||
|
||||
/* 头部开始 */
|
||||
|
||||
.ul-header {
|
||||
background-color: #fff;
|
||||
box-shadow : 0 3px 5px #999;
|
||||
padding : 3px;
|
||||
}
|
||||
|
||||
.ul-header-main {
|
||||
display : flex;
|
||||
justify-content: space-between;
|
||||
align-items : center;
|
||||
margin : 0 auto;
|
||||
}
|
||||
|
||||
.ul-header-logo {
|
||||
max-height: 48px;
|
||||
}
|
||||
|
||||
.ul-header-user {
|
||||
display : flex;
|
||||
align-items : center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ul-header-user-avatar {
|
||||
background-image : url('/static/images/avatar.png');
|
||||
width : 45px;
|
||||
height : 45px;
|
||||
background-size : cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.ul-header-user-options {
|
||||
display : flex;
|
||||
align-items: center;
|
||||
color : #999;
|
||||
font-size : 12px;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.ul-header-user-info {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* 头部结束 */
|
||||
|
||||
|
||||
/* 导航开始 */
|
||||
.layui-nav.ul-nav-white {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.layui-nav.ul-nav-white .layui-nav-child a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.layui-nav.ul-nav-white .layui-nav-item a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.layui-nav.ul-nav-white .layui-nav-itemed>.layui-nav-child {
|
||||
background-color: rgba(255, 255, 255, 0.6) !important;
|
||||
}
|
||||
|
||||
.layui-nav-tree.ul-nav-white .layui-nav-item a:hover {
|
||||
background-color: #9cf;
|
||||
color : #fff !important;
|
||||
}
|
||||
|
||||
|
||||
.layui-nav.ul-nav-white .layui-nav-itemed>a,
|
||||
.layui-nav-tree.ul-nav-white .layui-nav-title a,
|
||||
.layui-nav-tree.ul-nav-white .layui-nav-title a:hover {
|
||||
color: #666 !important;
|
||||
}
|
||||
|
||||
.layui-nav-tree.ul-nav-white .layui-nav-bar {
|
||||
background-color: #6cf;
|
||||
}
|
||||
|
||||
.layui-nav-tree.ul-nav-white .layui-nav-child dd.layui-this,
|
||||
.layui-nav-tree.ul-nav-white .layui-nav-child dd.layui-this a,
|
||||
.layui-nav-tree.ul-nav-white .layui-this,
|
||||
.layui-nav-tree.ul-nav-white .layui-this>a,
|
||||
.layui-nav-tree.ul-nav-white .layui-this>a:hover {
|
||||
background-color: #9cf;
|
||||
color : #fff;
|
||||
}
|
||||
|
||||
/* 导航结束 */
|
||||
BIN
public/static/images/ulthon_logo_108.png
Normal file
BIN
public/static/images/ulthon_logo_108.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -139,7 +139,15 @@
|
||||
<input type="radio" name="status" value="0" title="不发布" checked>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">分类</div>
|
||||
<div class="layui-input-block">
|
||||
<select name="category_id" lay-verify="">
|
||||
<option value="0">请选择一个城市</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">跳转链接</div>
|
||||
<div class="layui-input-block">
|
||||
@@ -147,6 +155,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-label">跳转链接状态</div>
|
||||
<div class="layui-input-block">
|
||||
|
||||
Reference in New Issue
Block a user