调整领导班子

This commit is contained in:
2020-11-05 13:13:24 +08:00
parent 31307a9735
commit ef4a3292a4
8 changed files with 1184 additions and 998 deletions

View File

@@ -35,7 +35,7 @@ class IndexController extends AdminController
$grid->column('sort', '序号');
$states = [
'on' => ['value' => 1, 'text' => '打开', 'color' => 'primary'],
'off' => ['value' => 2, 'text' => '关闭', 'color' => 'default'],
'off' => ['value' => 0, 'text' => '关闭', 'color' => 'default'],
];
$grid->column('status', '状态')->switch($states);
$grid->column('created_at', '创建时间');
@@ -56,14 +56,27 @@ class IndexController extends AdminController
'required' => '必须选择所属分类',
'min' => '必须选择所属分类',
]);
$form->textarea('description', '内容简介')->rules('max:350');
$form->list('subjoin', '附加')
->help('只有领导班子需要添加');
$form->image('cover', '封面')
->move('images/' . date('Y/m/d'))
->removable()
->uniqueName();
$form->ueditor('content', '文章内容')->rules('required', ['required' => '详情不能为空']);
$form->number('sort', '序号')->default(0)->rules('required', ['required' => '序号必须填写'])->help('倒序优先');
$form->number('sort', '序号')
->default(0)->rules('required', ['required' => '序号必须填写'])
->help('倒序优先');
$states = [
'on' => ['value' => 1, 'text' => '打开', 'color' => 'success'],
'off' => ['value' => 0, 'text' => '关闭', 'color' => 'danger'],
];
$form->switch('status', '状态')->states($states);
return $form;
}

View File

@@ -22,9 +22,9 @@ class HomeController extends Controller
$column->append(Dashboard::environment());
});
$row->column(4, function (Column $column) {
$column->append(Dashboard::extensions());
});
// $row->column(4, function (Column $column) {
// $column->append(Dashboard::extensions());
// });
$row->column(4, function (Column $column) {
$column->append(Dashboard::dependencies());

View File

@@ -18,7 +18,7 @@ class CategoryController extends Controller
if ($category->type == Category::TYPE_SHOW && $category->article_id) {
return redirect("articles/" . $category->article_id);
} else {
$articles = $category->relations(Category::TYPE_ARTICLE)->latest()->paginate();
$articles = $category->relations(Category::TYPE_ARTICLE)->where('status', 1)->latest()->paginate();
$parent = $category;
if ($category->childrens->isEmpty() && $category->parent) {
@@ -26,6 +26,9 @@ class CategoryController extends Controller
}
$advert = Advert::where('category_id', 73)->first();
if ($category->id == 4) {
return view('category.list', compact('articles', 'category', 'parent', 'advert'));
}
return view('category.show', compact('articles', 'category', 'parent', 'advert'));
}

View File

@@ -10,6 +10,14 @@ class Article extends Model
use HasOneCover, BelongsToCategory;
/**
* 应进行类型转换的属性
* @var array
*/
protected $casts = [
'subjoin' => 'array',
];
public function getLinkAttribute()
{
return route('article.show', $this);

View File

@@ -1,11 +1,34 @@
@charset "utf-8";
/* CSS Document */
*{ margin:0; padding:0}
ul li{ list-style:none}
img{ border:0; max-width:100%}
a{ text-decoration:none;}
body{ font-family:"微软雅黑"; width:100%; min-width:1200px;color: #333;font-size: 14px;}
p{text-align:justify}
* {
margin: 0;
padding: 0
}
ul li {
list-style: none
}
img {
border: 0;
max-width: 100%
}
a {
text-decoration: none;
}
body {
font-family: "微软雅黑";
width: 100%;
min-width: 1200px;
color: #333;
font-size: 14px;
}
p {
text-align: justify
}
.idxTop-back {
background: url(../images/nys_bg01.jpg) #b2eaf9 no-repeat top center;
@@ -19,16 +42,20 @@ p{text-align:justify}
.ce-white {
background: #fff;
}
.contant {
width: 1200px;
margin: 0 auto;
}
.ce-morgin-tb {
margin: 30px 0;
}
.ce-img {
position: relative;
}
.ce-img > span {
position: absolute;
left: 0;
@@ -39,12 +66,14 @@ p{text-align:justify}
background-repeat: no-repeat;
background-position: center;
}
.ce-nowrap {
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis
}
.ce-nowrap-multi {
display: -webkit-box;
overflow: hidden;
@@ -158,12 +187,14 @@ p{text-align:justify}
line-height: 50px;
margin-bottom: 10px;
}
.idxTitle-name {
font-size: 22px;
flex: 1;
position: relative;
padding-left: 20px;
}
.idxTitle-name::after {
position: absolute;
background: #06acf9;
@@ -173,17 +204,20 @@ p{text-align:justify}
width: 6px;
height: 22px;
}
.idxTitle-name > span {
font-size: 12px;
padding-left: 6px;
color: #999999;
text-transform: uppercase;
}
.idxTitle-more {
display: flex;
color: #999999;
cursor: pointer;
}
.idxTitle-more img {
width: 16px;
height: 16px;
@@ -197,16 +231,20 @@ p{text-align:justify}
.idxOneCont {
display: flex;
}
.contant-left {
width: 700px;
}
.oneCont-top {
position: relative;
}
.oneCont-top-img {
width: 280px;
height: 170px;
}
.oneCont-top-cont {
position: absolute;
left: 300px;
@@ -220,15 +258,18 @@ p{text-align:justify}
margin-bottom: 10px;
text-align: center;
}
.oneCont-top-time {
display: flex;
}
.oneCont-top-text {
color: #909090;
line-height: 24px;
-webkit-line-clamp: 4;
margin-bottom: 25px;
}
.oneCont-top-time > span {
flex: 1;
font-size: 13px;
@@ -246,6 +287,7 @@ p{text-align:justify}
height: 16px;
margin: 2px 0 0 10px;
}
.oneCont-ul {
margin-top: 15px;
}
@@ -378,11 +420,13 @@ p{text-align:justify}
.idxTwo-list li:nth-child(1) .idxTwo-list-img, .idxTwo-list li:nth-child(1) .idxTwo-list-title, .idxTwo-list li:nth-child(1) .idxTwo-list-time {
display: none;
}
.idxTwo-list li:nth-child(1) .idxTwo-list-cont {
background-color: #fff;
width: 100%;
color: #000;
}
.idxTwo-list li:nth-child(1) .idxTwo-list-text {
position: relative;
font-size: 16px;
@@ -391,6 +435,7 @@ p{text-align:justify}
padding-top: 15px;
line-height: 26px;
}
.idxTwo-list li:nth-child(1) .idxTwo-list-text::after {
position: absolute;
content: '';
@@ -436,11 +481,29 @@ p{text-align:justify}
border-left: 10px solid #06acf9;
}
.newTwo-list {margin: 0 -.5rem;}
.newTwo-list li {width: calc(25% - 1rem); margin: 0 .5rem; float: left;}
.newTwo-list-img {width: 100%; padding-top: 65%;}
.newTwo-list-title{font-size: 1rem; margin: .7rem 0 .5rem;}
.newTwo-list-text {color: #999;}
.newTwo-list {
margin: 0 -.5rem;
}
.newTwo-list li {
width: calc(25% - 1rem);
margin: 0 .5rem;
float: left;
}
.newTwo-list-img {
width: 100%;
padding-top: 65%;
}
.newTwo-list-title {
font-size: 1rem;
margin: .7rem 0 .5rem;
}
.newTwo-list-text {
color: #999;
}
/*
首页第三模块
@@ -449,6 +512,7 @@ p{text-align:justify}
overflow: hidden;
padding: 10px 0 20px;
}
.threeCont {
width: calc(50% - 10px);
float: left;
@@ -456,46 +520,56 @@ p{text-align:justify}
padding: 20px 20px 0;
box-sizing: border-box;
}
.threeCont:nth-child(1) {
margin-right: 10px;
}
.threeCont:nth-child(2) {
margin-left: 10px;
}
.threeCont-top {
position: relative;
margin-bottom: 15px;
cursor: pointer;
}
.threeCont-top-img {
width: 140px;
height: 90px;
}
.threeCont-top-cont {
position: absolute;
left: 150px;
top: 0;
width: calc(100% - 150px);
}
.threeCont-top:hover .threeCont-top-title {
color: #06acf9;
}
.threeCont-top-title {
font-size: 15px;
margin-bottom: 6px;
}
.threeCont-top-text {
-webkit-line-clamp: 3;
font-size: 12px;
color: #999;
line-height: 19px;
}
.threeCont-list li {
display: flex;
position: relative;
padding: 15px 0 15px 14px;
transition: .3s;
}
.threeCont-list li::after {
position: absolute;
content: '';
@@ -507,6 +581,7 @@ p{text-align:justify}
border: 1px dashed #ededed;
transition: .3s;
}
.threeCont-list li::before {
position: absolute;
content: '';
@@ -517,27 +592,33 @@ p{text-align:justify}
width: 6px;
height: 6px;
}
.threeCont-list li > p {
flex: 1;
margin-right: 60px;
}
.threeCont-list li > span {
color: #999;
font-size: 13px;
}
.threeCont-list li:hover {
color: #0599de;
cursor: pointer;
}
.threeCont-list li:hover::before {
background-color: #0599de;
}
.idxThree-title {
position: relative;
display: flex;
margin-bottom: 20px;
height: 40px;
}
.idxThree-title::after {
position: absolute;
content: '';
@@ -550,10 +631,12 @@ p{text-align:justify}
left: 0;
bottom: 0;
}
.idxThree-title-name {
flex: 1;
position: relative;
}
.idxThree-title-name::after {
position: absolute;
content: '';
@@ -566,6 +649,7 @@ p{text-align:justify}
left: 0;
bottom: 0;
}
.idxThree-title-icon {
position: absolute;
width: 120px;
@@ -584,6 +668,7 @@ p{text-align:justify}
height: 18px;
margin: 12px 8px 0 0;
}
.idxThree-title-more {
color: #51c5fb;
font-size: 14px;
@@ -604,34 +689,42 @@ p{text-align:justify}
background-position: center;
background-repeat: no-repeat;
}
.idxFour .idxTitle, .idxFour .idxTitle-name > span {
color: #fff;
}
.idxFour .idxTitle-name::after {
background: #fff;
}
.idxFourSwiper {
padding: 0 20px;
box-sizing: border-box;
position: relative;
}
.idxFour-slide {
background: #fff;
}
.idxFour-img {
width: 100%;
padding-top: 80%
}
.idxFour-cont {
padding: 0 20px 20px;
box-sizing: border-box;
}
.idxFour-title {
text-align: center;
line-height: 50px;
font-size: 17px;
position: relative;
}
.idxFour-title::before {
position: absolute;
content: '';
@@ -641,6 +734,7 @@ p{text-align:justify}
width: 100%;
height: 1px;
}
.idxFour-text {
-webkit-line-clamp: 4;
line-height: 24px;
@@ -655,17 +749,21 @@ p{text-align:justify}
line-height: 34px;
margin: 20px auto 0;
}
.idxFour-slide:hover {
cursor: pointer;
}
.idxFour-slide:hover .idxFour-title {
color: #06acf9;
}
.idxFour-slide:hover .idxFour-more {
background: #06acf9;
border-color: transparent;
color: #fff;
}
.idxFour-Arrows {
position: absolute;
top: -50px;
@@ -677,9 +775,11 @@ p{text-align:justify}
overflow: hidden;
border: 1px solid #fff;
}
.idxFour-Arrows .swiper-button-disabled {
opacity: 1;
}
.idxFour-Arrows .swiper-button-next {
right: 0;
background-image: none;
@@ -689,6 +789,7 @@ p{text-align:justify}
color: #fff;
font-size: 20px;
}
.idxFour-Arrows .swiper-button-prev {
left: 0;
background-image: none;
@@ -706,6 +807,7 @@ p{text-align:justify}
padding: 0 20px;
box-sizing: border-box;
}
.idxLink-ul li {
float: left;
width: 16.66%;
@@ -713,9 +815,11 @@ p{text-align:justify}
cursor: pointer;
line-height: 40px;
}
.idxLink-ul li:hover {
color: #06acf9;
}
.line {
background: #e6e6e6;
width: 100%;
@@ -724,6 +828,7 @@ p{text-align:justify}
margin-bottom: 10px;
position: relative;
}
.line::before {
position: absolute;
content: '';
@@ -764,23 +869,24 @@ p{text-align:justify}
}
/*详情*/
.details {
overflow: hidden;
}
.page-left {
width: 280px;
float: left;
background: #fff;
}
.page-right {
width: 900px;
float: right;
margin-left: 20px;
margin-top: 20px;
}
.pagelist h1 {
color: #fff;
height: 45px;
@@ -791,15 +897,18 @@ p{text-align:justify}
padding-left: 20px;
margin-top: 20px;
}
.pagelist .listbox {
border: 1px solid #efefef;
margin: 20px 0;
}
.pagelist li {
border-top: 1px solid #efefef;
border-bottom: 1px solid #efefef;
margin-top: -1px;
}
.pagelist li a {
height: 35px;
line-height: 35px;
@@ -809,17 +918,20 @@ p{text-align:justify}
color: #333;
padding-left: 20px;
}
.pagelist li a:hover,
.pagelist li.active > a {
background: url(../images/sanjiao.png) 218px 14px no-repeat #fafafa;
font-weight: bold;
}
.pagelujing {
height: 40px;
border-bottom: 2px solid #efefef;
position: relative;
margin-bottom: 14px;
}
.pagelujing .name {
position: absolute;
left: 0;
@@ -830,15 +942,18 @@ p{text-align:justify}
font-size: 16px;
font-weight: bold;
}
.pagelujing span {
position: absolute;
right: 0;
line-height: 40px;
color: #888;
}
.pagelujing span a {
color: #313131;
}
.tcdPageCode {
padding: 15px 20px;
text-align: left;
@@ -846,6 +961,7 @@ p{text-align:justify}
text-align: center;
margin-top: 30px;
}
.tcdPageCode span.disabled {
display: inline-block;
height: 25px;
@@ -858,6 +974,7 @@ p{text-align:justify}
border-radius: 4px;
vertical-align: middle;
}
.tcdPageCode span.current {
display: inline-block;
height: 25px;
@@ -870,6 +987,7 @@ p{text-align:justify}
border-radius: 4px;
vertical-align: middle;
}
.tcdPageCode a {
display: inline-block;
color: #428bca;
@@ -882,12 +1000,14 @@ p{text-align:justify}
border-radius: 4px;
vertical-align: middle;
}
.newslist li {
border-bottom: 1px dotted #dedede;
position: relative;
padding: 0 80px 0 14px;
background: url(../images/jiantou.png) 2px 15px no-repeat;
}
.newslist li a {
display: block;
height: 36px;
@@ -901,6 +1021,7 @@ p{text-align:justify}
-webkit-box-orient: vertical;
overflow: hidden;
}
.newslist li span {
position: absolute;
right: 0;
@@ -909,6 +1030,7 @@ p{text-align:justify}
color: #bbb;
text-align: center;
}
.biaoti {
font-size: 18px;
color: #333;
@@ -917,12 +1039,14 @@ p{text-align:justify}
font-weight: 600;
margin-top: 30px;
}
.sshuomign {
color: #888;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.article_txt {
font-size: 14px;
line-height: 28px;
@@ -930,3 +1054,35 @@ p{text-align:justify}
margin: 20px 0;
overflow: hidden;
}
/* 领导班子样式 */
.leaderslist li {
height: 120px;
position: relative;
padding-left: 120px;
background-size: 100px 100%;
background-repeat: no-repeat;
background-position: left;
margin-top: 10px;
}
.leaderslist li a {
display: block;
width: 100%;
line-height: 24px;
font-size: 14px;
color: #666;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
display: inline-block;
}
.leaderslist .name {
padding-bottom: 14px;
/* padding-top: 10px; */
font-weight: 600px;
font-size: 18px;
}

View File

@@ -33,11 +33,18 @@
</div>
<div class="news-txt ny mg-t-b">
<div class="news-con">
<ul class="newslist ny">
<ul class="leaderslist ny">
@if ($articles->isNotEmpty())
@foreach ($articles as $article)
<li>
<a href="{{ $article->link }}">{{ $article->title }}</a><span>{{ $article->created_at->format('m-d') }}</span>
<li style="background-image: url({{ $article->cover_path }});">
<a href="{{ $article->link }}">
<div class="name"> {{ $article->title }} </div>
@if ($article->subjoin)
@foreach ($article->subjoin as $item)
<div>{{ $item }}</div>
@endforeach
@endif
</a>
</li>
@endforeach
@endif

View File

@@ -37,7 +37,8 @@
@if ($articles->isNotEmpty())
@foreach ($articles as $article)
<li>
<a href="{{ $article->link }}">{{ $article->title }}</a><span>{{ $article->created_at->format('m-d') }}</span>
<a href="{{ $article->link }}">{{ $article->title }}</a>
<span>{{ $article->created_at->format('m-d') }}</span>
</li>
@endforeach
@endif

View File

@@ -22,7 +22,7 @@
<div class="ce-img oneCont-top-img">
<span style="background-image: url({{ getArticlesBYCate(7,5)->first()->cover_path }});"></span>
</div>
<div class="oneCont-top-cont">
<div class="oneCont-top-cont" data-href="{{ getArticlesBYCate(7,5)->first()->link }}">
<div class="ce-nowrap oneCont-top-title">
{{ getArticlesBYCate(7,5)->first()->title }}
</div>
@@ -31,8 +31,6 @@
</div>
<div class="oneCont-top-time">
<span>{{ getArticlesBYCate(7,5)->first()->created_at->format('Y-m-d') }}</span>
<div class="oneCont-top-more" data-href="{{ getArticlesBYCate(7,5)->first()->link }}">
查看更多<img src="/assets/index/images/idxRow_color.png"></div>
</div>
</div>
<ul class="oneCont-ul">