增加悬浮
This commit is contained in:
@@ -35,7 +35,7 @@ class IndexController extends AdminController
|
|||||||
$grid->column('cover', '图片')->image('', 60, 60);
|
$grid->column('cover', '图片')->image('', 60, 60);
|
||||||
$grid->column('category.title', '分类名称');
|
$grid->column('category.title', '分类名称');
|
||||||
$grid->column('title', '图片名称');
|
$grid->column('title', '图片名称');
|
||||||
$grid->column('url', '地址');
|
// $grid->column('url', '地址')->width(80);
|
||||||
$grid->column('sort', '排序');
|
$grid->column('sort', '排序');
|
||||||
|
|
||||||
return $grid;
|
return $grid;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use App\Models\Category;
|
|||||||
use Encore\Admin\Controllers\AdminController;
|
use Encore\Admin\Controllers\AdminController;
|
||||||
use Encore\Admin\Form;
|
use Encore\Admin\Form;
|
||||||
use Encore\Admin\Grid;
|
use Encore\Admin\Grid;
|
||||||
|
use Encore\Admin\Show;
|
||||||
|
|
||||||
class IndexController extends AdminController
|
class IndexController extends AdminController
|
||||||
{
|
{
|
||||||
@@ -76,4 +77,16 @@ class IndexController extends AdminController
|
|||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
$show = new Show(Article::findOrFail($id));
|
||||||
|
|
||||||
|
$show->field('id', 'ID');
|
||||||
|
$show->field('title', '标题');
|
||||||
|
$show->field('content', '内容');
|
||||||
|
$show->field('created_at');
|
||||||
|
|
||||||
|
return $show;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,60 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Patent;
|
use App\Models\Patent;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class PatentController extends Controller
|
class PatentController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
//显示论文详情
|
//显示论文详情
|
||||||
public function show(Patent $patent)
|
public function show(Patent $patent)
|
||||||
{
|
{
|
||||||
$next = Patent::where('id', '>', $patent->id)->where('status', 1)->first();
|
$next = Patent::where('id', '>', $patent->id)->where('status', 1)->first();
|
||||||
|
|
||||||
return view('patents.show', compact('patent', 'next'));
|
return view('patents.show', compact('patent', 'next'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//显示文章列表
|
//显示文章列表
|
||||||
public function list(Request $request)
|
public function list(Request $request)
|
||||||
{
|
{
|
||||||
$type = $request->type;
|
$type = $request->type;
|
||||||
$title = $request->title;
|
$title = $request->title;
|
||||||
$number = $request->number;
|
$number = $request->number;
|
||||||
$category_id = $request->category_id;
|
$category_id = $request->category_id;
|
||||||
$nickname = $request->nickname;
|
$nickname = $request->nickname;
|
||||||
$publication = $request->publication;
|
$publication = $request->publication;
|
||||||
$year = $request->year;
|
$year = $request->year;
|
||||||
|
|
||||||
$patents = Patent::where('status', 1)
|
$patents = Patent::where('status', 1)
|
||||||
->when($type, function ($q) use ($type) {
|
->when($type, function ($q) use ($type) {
|
||||||
$q->where('type', $type);
|
$q->where('type', $type);
|
||||||
})
|
})
|
||||||
->when($title, function ($q) use ($title) {
|
->when($title, function ($q) use ($title) {
|
||||||
$q->where('title', 'like', "%{$title}%");
|
$q->where('title', 'like', "%{$title}%");
|
||||||
})
|
})
|
||||||
->when($number, function ($q) use ($number) {
|
->when($number, function ($q) use ($number) {
|
||||||
$q->where('number', $number);
|
$q->where('number', $number);
|
||||||
})
|
})
|
||||||
->when($category_id, function ($q) use ($category_id) {
|
->when($category_id, function ($q) use ($category_id) {
|
||||||
$q->where('category_id', $category_id);
|
$q->where('category_id', $category_id);
|
||||||
})
|
})
|
||||||
->when($nickname, function ($q) use ($nickname) {
|
->when($nickname, function ($q) use ($nickname) {
|
||||||
$q->where('nickname', 'like', "%{$nickname}%");
|
$q->where('nickname', 'like', "%{$nickname}%");
|
||||||
})
|
})
|
||||||
->when($publication, function ($q) use ($publication) {
|
->when($publication, function ($q) use ($publication) {
|
||||||
$q->where('publication', $publication);
|
$q->where('publication', $publication);
|
||||||
})
|
})
|
||||||
->when($year, function ($q) use ($year) {
|
->when($year, function ($q) use ($year) {
|
||||||
$q->where('year', 'like', "%{$year}%");
|
$q->where('year', 'like', "%{$year}%");
|
||||||
})
|
})
|
||||||
->latest('sort')
|
->latest('sort')
|
||||||
->latest()
|
->latest()
|
||||||
->paginate(2);
|
->paginate();
|
||||||
|
|
||||||
return view('patents.list', compact('patents'));
|
return view('patents.list', compact('patents'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -485,6 +485,7 @@ img {
|
|||||||
|
|
||||||
.nav-talent-job {
|
.nav-talent-job {
|
||||||
color: gray;
|
color: gray;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-talent-cover {
|
.nav-talent-cover {
|
||||||
@@ -1238,6 +1239,7 @@ img {
|
|||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-inst-ul span i,
|
.org-inst-ul span i,
|
||||||
@@ -1257,10 +1259,16 @@ img {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-inst-ul li span {
|
.org-inst-ul li span,
|
||||||
|
.org-inst-ul li a {
|
||||||
float: left;
|
float: left;
|
||||||
color: gray;
|
color: gray;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.org-inst-ul li a:hover{
|
||||||
|
color: #273981;
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-inst-ul li span:first-child,
|
.org-inst-ul li span:first-child,
|
||||||
@@ -1287,6 +1295,7 @@ img {
|
|||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.research-award-cover {
|
.research-award-cover {
|
||||||
@@ -1378,6 +1387,7 @@ img {
|
|||||||
.lw-left-lg {
|
.lw-left-lg {
|
||||||
height: 160px;
|
height: 160px;
|
||||||
top: calc(50% - 80px);
|
top: calc(50% - 80px);
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 党建与科学文化 */
|
/* 党建与科学文化 */
|
||||||
@@ -1427,6 +1437,7 @@ img {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
width: calc(12.5% - 20px);
|
width: calc(12.5% - 20px);
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rcdw-cover {
|
.rcdw-cover {
|
||||||
@@ -1448,6 +1459,10 @@ img {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rcdw-xxh p{
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 人才队伍 - 省领军人才梯队 */
|
/* 人才队伍 - 省领军人才梯队 */
|
||||||
.rctd-boeder {
|
.rctd-boeder {
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
@@ -1571,3 +1586,49 @@ img {
|
|||||||
background-color: #273981;
|
background-color: #273981;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 漂浮的工具栏 */
|
||||||
|
.laytool{
|
||||||
|
position: fixed;
|
||||||
|
top: 45vh;
|
||||||
|
left: calc(50% + 615px);
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laytool-ul li{
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
background: #4864ae;
|
||||||
|
font-size: 18px;
|
||||||
|
transition: background .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-code{
|
||||||
|
position: absolute;
|
||||||
|
left: -305px;
|
||||||
|
top: -205px;
|
||||||
|
width: 300px;
|
||||||
|
height: 448px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wechat-code img{
|
||||||
|
width: 100%;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laytool-ul i{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laytool-ul li:hover{
|
||||||
|
background: #273981;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laytool-ul li:hover .wechat-code{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|||||||
BIN
public/assets/index/img/jisuanjijuece.png
Normal file
BIN
public/assets/index/img/jisuanjijuece.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
BIN
public/assets/index/img/kexueyujishu.png
Normal file
BIN
public/assets/index/img/kexueyujishu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 222 KiB |
BIN
public/assets/index/img/z19_ewm3.jpg
Normal file
BIN
public/assets/index/img/z19_ewm3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 215 KiB |
@@ -42,6 +42,12 @@
|
|||||||
</header>
|
</header>
|
||||||
<!-- end header -->
|
<!-- end header -->
|
||||||
|
|
||||||
|
<!-- Laytool -->
|
||||||
|
<div class="laytool">
|
||||||
|
漂浮
|
||||||
|
</div>
|
||||||
|
<!-- end Laytool -->
|
||||||
|
|
||||||
@include('layouts.header')
|
@include('layouts.header')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|||||||
Reference in New Issue
Block a user