diff --git a/app/Admin/Controllers/Article/IndexController.php b/app/Admin/Controllers/Article/IndexController.php index 1e32fb6..0a9b15b 100644 --- a/app/Admin/Controllers/Article/IndexController.php +++ b/app/Admin/Controllers/Article/IndexController.php @@ -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; } diff --git a/app/Admin/Controllers/HomeController.php b/app/Admin/Controllers/HomeController.php index 12b80f3..5ef2bd1 100644 --- a/app/Admin/Controllers/HomeController.php +++ b/app/Admin/Controllers/HomeController.php @@ -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()); diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 7205b4b..062908a 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -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')); } diff --git a/app/Models/Article.php b/app/Models/Article.php index 6fb2f7c..eab2ec3 100644 --- a/app/Models/Article.php +++ b/app/Models/Article.php @@ -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); diff --git a/public/assets/index/css/style.css b/public/assets/index/css/style.css index 0062399..c036c83 100644 --- a/public/assets/index/css/style.css +++ b/public/assets/index/css/style.css @@ -1,932 +1,1088 @@ -@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} - -.idxTop-back { - background: url(../images/nys_bg01.jpg) #b2eaf9 no-repeat top center; - width: 100%; - background-size: 100% 100%; -} - -/* - 公告样式 -*/ -.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; - top: 0; - width: 100%; - height: 100%; - background-size: cover; - 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; - text-overflow: ellipsis; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2 -} - -/* - 首页头部 -*/ -.idxTop { - box-sizing: border-box; - position: relative; -} - -.idxLogo { - width: 100%; - cursor: pointer; -} - -.idxNav { - width: 100%; - display: flex; - background-color: #008dd0; -} - -.idxNav li { - padding: 0 50px 0; - color: #fff; - font-size: 15px; - cursor: pointer; - line-height: 50px; - height: 50px; - position: relative; - transition: .2s; -} - -.idxNav li:hover { - color: #fff; -} - -.idxNav li::after { - position: absolute; - content: ''; - left: 50%; - bottom: 0; - background: transparent; - width: 0; - height: 100%; - transition: .2s; -} - -.idxNav li.active::after, .idxNav li:hover::after { - background: #005c88; - width: 100%; - color: #fff; - left: 0%; -} - -.idxNav li span { - position: absolute; - z-index: 9; - width: 100%; - height: 100%; - display: inline-block; - text-align: center; - left: 0; - top: 0; -} - -/* - 首页banenr -*/ -.idxBanner { - width: 100%; - padding-top: 28%; -} - -.idxBanner .swiper-wrapper { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; -} - -.idxBanner .swiper-slide { - background-size: cover; - background-position: center center; - background-repeat: no-repeat; -} - -.swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction{ - bottom: 25px !important; -} - -.idxBanner .swiper-pagination-white .swiper-pagination-bullet { - opacity: 1; -} - -.idxBanner .swiper-pagination-white .swiper-pagination-bullet-active { - background-color: #06acf9; -} - -/* - 首页公告标题 -*/ -.idxTitle { - display: flex; - 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; - content: ''; - left: 0; - top: calc(50% - 11px); - 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; - margin: 16px 0 0 10px; -} - - -/* - 首页第一模块 -*/ -.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; - top: 0; - width: calc(100% - 300px); -} - -.oneCont-top-title{ - color: #06acf9; - font-size: 18px; - 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; - color: #999999; -} - -.oneCont-top-more { - color: #06acf9; - display: flex; - cursor: pointer; -} - -.oneCont-top-more img { - width: 16px; - height: 16px; - margin: 2px 0 0 10px; -} -.oneCont-ul { - margin-top: 15px; -} - -.oneCont-ul li { - display: flex; - line-height: 36px; -} - -.oneCont-ul p { - flex: 1; - margin-right: 100px; -} - -.oneCont-ul span { - color: #999; -} - -.contant-right { - width: calc(500px - 30px); - margin-left: 30px; -} - -.contant-right-list { - background-color: #f0f0f0; - padding: 12px 20px; - box-sizing: border-box; -} - -.contant-right-list li { - line-height: 44px; - display: flex; -} - -.contant-right-list li:hover, .oneCont-ul li:hover { - color: #06acf9; -} - -.contant-right-list li>p { - flex: 1; - margin-right: 20px; -} - -.contant-right-list li>span { - color: #999; - font-size: 12px; -} - -.oneCont-ul li, .contant-right-list li { - cursor: pointer; - transition: .3s; -} - -/* - 首页第二模块 -*/ -.idxTwo { - background-color: #f0f0f0; - padding: 30px 0 60px; - overflow: hidden; -} - -.idxTwo-list { - overflow: hidden; -} - -.idxTwo-list li { - float: left; - width: 400px; - height: 200px; - text-align: center; - position: relative; - cursor: pointer; -} - -.idxTwo-list-img { - position: absolute; - top: 0; - width: 50%; - height: 200px; -} - -.idxTwo-list-img span { - width: 100%; - height: 100%; - background-size: cover; - display: block; - background-repeat: no-repeat; - background-position: center; -} - -.idxTwo-list-img::after { - border: 10px solid transparent; - width: 0; - height: 0; - position: absolute; - top: calc(50% - 5px); - content: ' ' -} - -.idxTwo-list-cont { - width: 50%; - height: 100%; - padding: 20px; - box-sizing: border-box; - position: absolute; - top: 0; - background-color: #06acf9; - color: #fff; -} - -.idxTwo-list-title { - font-size: 16px; -} - -.idxTwo-list-text { - font-size: 12px; - -webkit-line-clamp: 4; - line-height: 24px; - margin: 10px 0; -} - -.idxTwo-list-time img { - width: 16px; - height: 16px; - margin-left: 10px; - vertical-align: middle; -} - -.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; - -webkit-line-clamp: 5; - text-align: left; - padding-top: 15px; - line-height: 26px; -} -.idxTwo-list li:nth-child(1) .idxTwo-list-text::after { - position: absolute; - content: ''; - left: 0; - top: 0; - background-color: #06acf9; - width: 70px; - height: 4px; -} - -.idxTwo-list li:nth-child(2) .idxTwo-list-img, -.idxTwo-list li:nth-child(3) .idxTwo-list-img { - left: 0; -} - -.idxTwo-list li:nth-child(2) .idxTwo-list-cont, -.idxTwo-list li:nth-child(3) .idxTwo-list-cont { - left: 50%; -} - -.idxTwo-list li:nth-child(2) .idxTwo-list-img::after, -.idxTwo-list li:nth-child(3) .idxTwo-list-img::after { - right: 0; - border-right: 10px solid #06acf9; -} - -.idxTwo-list li:nth-child(4) .idxTwo-list-img, -.idxTwo-list li:nth-child(5) .idxTwo-list-img, -.idxTwo-list li:nth-child(6) .idxTwo-list-img { - right: 0; -} - -.idxTwo-list li:nth-child(4) .idxTwo-list-cont, -.idxTwo-list li:nth-child(5) .idxTwo-list-cont, -.idxTwo-list li:nth-child(6) .idxTwo-list-cont { - right: 50%; -} - -.idxTwo-list li:nth-child(4) .idxTwo-list-img::after, -.idxTwo-list li:nth-child(5) .idxTwo-list-img::after, -.idxTwo-list li:nth-child(6) .idxTwo-list-img::after { - left: 0; - 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;} - -/* - 首页第三模块 -*/ -.idxThree .contant{ - overflow: hidden; - padding: 10px 0 20px; -} -.threeCont { - width: calc(50% - 10px); - float: left; - box-shadow: 0 2px 20px rgba(0,0,0,.1); - 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: ''; - left: 10px; - right: 4px; - top: 0; - width: calc(100% - 14px); - height: 0; - border: 1px dashed #ededed; - transition: .3s; -} -.threeCont-list li::before { - position: absolute; - content: ''; - left: 0; - top: calc(50% - 3px); - background-color:#e0e0e0; - border-radius: 50%; - 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: ''; - display: flex; - background-image: url(../images/title_line.png); - background-repeat: repeat; - background-position: center; - width: 100%; - height: 4px; - left: 0; - bottom: 0; -} -.idxThree-title-name { - flex: 1; - position: relative; -} -.idxThree-title-name::after { - position: absolute; - content: ''; - display: flex; - background-image: url(../images/title_back.png); - background-repeat: no-repeat; - background-position: left; - width: 120px; - height: 40px; - left: 0; - bottom: 0; -} -.idxThree-title-icon { - position: absolute; - width: 120px; - height: 40px; - line-height: 40px; - color: #fff; - padding-left: 6px; - box-sizing: border-box; - z-index: 9; - font-size: 17px; - display: flex; -} - -.idxThree-title-icon img { - width: 18px; - height: 18px; - margin: 12px 8px 0 0; -} -.idxThree-title-more { - color: #51c5fb; - font-size: 14px; - line-height: 40px; - cursor: pointer; -} - - -/* - 首页第四模块 -*/ -.idxFour { - width: 100%; - background-image: url(../images//idxFour_back.png); - height: 600px; - padding: 30px 0; - background-size: cover; - 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: ''; - left: 0; - bottom: 0; - background-color:#e0e0e0; - width: 100%; - height: 1px; -} -.idxFour-text { - -webkit-line-clamp: 4; - line-height: 24px; - padding-top: 10px; -} - -.idxFour-more { - width: 100px; - text-align: center; - border: 1px solid #000; - background: transparent; - 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; - right: 20px; - background: #fff; - width: 60px; - height: 30px; - line-height: 40px; - overflow: hidden; - border: 1px solid #fff; -} -.idxFour-Arrows .swiper-button-disabled{ - opacity: 1; -} -.idxFour-Arrows .swiper-button-next{ - right: 0; - background-image:none; - background: #2da9e2; - text-align: center; - width: 50%; - color: #fff; - font-size: 20px; -} -.idxFour-Arrows .swiper-button-prev{ - left: 0; - background-image:none; - text-align: center; - font-size: 20px; - color: #2da9e2; - opacity: 1; -} - -/* - 友情链接 -*/ -.idxLink-ul { - overflow: hidden; - padding: 0 20px; - box-sizing: border-box; -} -.idxLink-ul li { - float: left; - width: 16.66%; - font-size: 15px; - cursor: pointer; - line-height: 40px; -} -.idxLink-ul li:hover { - color: #06acf9; -} -.line { - background: #e6e6e6; - width: 100%; - height: 1px; - margin-top: -15px; - margin-bottom: 10px; - position: relative; -} -.line::before { - position: absolute; - content: ''; - left: 0; - bottom: 0; - background-color:#06acf9; - width: 12%; - height: 2px; -} - -/* - 尾部 -*/ -.idxFooter { - background: #585858; - color: #fff; - width: 100%; - padding: 40px 0; -} - -.idxFooter-text { - text-align: center; -} - -.idxFooter-text span { - display: block; - font-size: 18px; - line-height: 30px; -} - -.idxFooter-img { - text-align: center; - margin-top: 30px; -} - -.idxFooter-img img { - width: 86px; -} - - - - -/*详情*/ -.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; - line-height: 45px; - font-size: 18px; - font-weight: 600; - background: #028dcf; - 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; - display: block; - background: url(../images/sanjiao2.png) 220px 14px no-repeat #fafafa; - font-size: 14px; - 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; - top: 0; - height: 40px; - border-bottom: 2px solid #016bd2; - line-height: 40px; - 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; - color: #ccc; - text-align: center; - margin-top: 30px; -} -.tcdPageCode span.disabled { - display: inline-block; - height: 25px; - line-height: 25px; - padding: 0 10px; - margin: 0 2px; - color: #bfbfbf; - background: #f2f2f2; - border: 1px solid #bfbfbf; - border-radius: 4px; - vertical-align: middle; -} -.tcdPageCode span.current { - display: inline-block; - height: 25px; - line-height: 25px; - padding: 0 10px; - margin: 0 2px; - color: #fff; - background-color: #428bca; - border: 1px solid #428bca; - border-radius: 4px; - vertical-align: middle; -} -.tcdPageCode a { - display: inline-block; - color: #428bca; - display: inline-block; - height: 25px; - line-height: 25px; - padding: 0 10px; - border: 1px solid #ddd; - margin: 0 2px; - 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; - width: 100%; - line-height: 36px; - font-size: 14px; - color: #666; - word-break: break-all; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; -} -.newslist li span { - position: absolute; - right: 0; - top: 0; - line-height: 36px; - color: #bbb; - text-align: center; -} -.biaoti { - font-size: 18px; - color: #333; - text-align: center; - margin: 0 20px; - 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; - color: #454545; - margin: 20px 0; - overflow: hidden; -} +@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 +} + +.idxTop-back { + background: url(../images/nys_bg01.jpg) #b2eaf9 no-repeat top center; + width: 100%; + background-size: 100% 100%; +} + +/* + 公告样式 +*/ +.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; + top: 0; + width: 100%; + height: 100%; + background-size: cover; + 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; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2 +} + +/* + 首页头部 +*/ +.idxTop { + box-sizing: border-box; + position: relative; +} + +.idxLogo { + width: 100%; + cursor: pointer; +} + +.idxNav { + width: 100%; + display: flex; + background-color: #008dd0; +} + +.idxNav li { + padding: 0 50px 0; + color: #fff; + font-size: 15px; + cursor: pointer; + line-height: 50px; + height: 50px; + position: relative; + transition: .2s; +} + +.idxNav li:hover { + color: #fff; +} + +.idxNav li::after { + position: absolute; + content: ''; + left: 50%; + bottom: 0; + background: transparent; + width: 0; + height: 100%; + transition: .2s; +} + +.idxNav li.active::after, .idxNav li:hover::after { + background: #005c88; + width: 100%; + color: #fff; + left: 0%; +} + +.idxNav li span { + position: absolute; + z-index: 9; + width: 100%; + height: 100%; + display: inline-block; + text-align: center; + left: 0; + top: 0; +} + +/* + 首页banenr +*/ +.idxBanner { + width: 100%; + padding-top: 28%; +} + +.idxBanner .swiper-wrapper { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} + +.idxBanner .swiper-slide { + background-size: cover; + background-position: center center; + background-repeat: no-repeat; +} + +.swiper-container-horizontal > .swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction { + bottom: 25px !important; +} + +.idxBanner .swiper-pagination-white .swiper-pagination-bullet { + opacity: 1; +} + +.idxBanner .swiper-pagination-white .swiper-pagination-bullet-active { + background-color: #06acf9; +} + +/* + 首页公告标题 +*/ +.idxTitle { + display: flex; + 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; + content: ''; + left: 0; + top: calc(50% - 11px); + 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; + margin: 16px 0 0 10px; +} + + +/* + 首页第一模块 +*/ +.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; + top: 0; + width: calc(100% - 300px); +} + +.oneCont-top-title { + color: #06acf9; + font-size: 18px; + 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; + color: #999999; +} + +.oneCont-top-more { + color: #06acf9; + display: flex; + cursor: pointer; +} + +.oneCont-top-more img { + width: 16px; + height: 16px; + margin: 2px 0 0 10px; +} + +.oneCont-ul { + margin-top: 15px; +} + +.oneCont-ul li { + display: flex; + line-height: 36px; +} + +.oneCont-ul p { + flex: 1; + margin-right: 100px; +} + +.oneCont-ul span { + color: #999; +} + +.contant-right { + width: calc(500px - 30px); + margin-left: 30px; +} + +.contant-right-list { + background-color: #f0f0f0; + padding: 12px 20px; + box-sizing: border-box; +} + +.contant-right-list li { + line-height: 44px; + display: flex; +} + +.contant-right-list li:hover, .oneCont-ul li:hover { + color: #06acf9; +} + +.contant-right-list li > p { + flex: 1; + margin-right: 20px; +} + +.contant-right-list li > span { + color: #999; + font-size: 12px; +} + +.oneCont-ul li, .contant-right-list li { + cursor: pointer; + transition: .3s; +} + +/* + 首页第二模块 +*/ +.idxTwo { + background-color: #f0f0f0; + padding: 30px 0 60px; + overflow: hidden; +} + +.idxTwo-list { + overflow: hidden; +} + +.idxTwo-list li { + float: left; + width: 400px; + height: 200px; + text-align: center; + position: relative; + cursor: pointer; +} + +.idxTwo-list-img { + position: absolute; + top: 0; + width: 50%; + height: 200px; +} + +.idxTwo-list-img span { + width: 100%; + height: 100%; + background-size: cover; + display: block; + background-repeat: no-repeat; + background-position: center; +} + +.idxTwo-list-img::after { + border: 10px solid transparent; + width: 0; + height: 0; + position: absolute; + top: calc(50% - 5px); + content: ' ' +} + +.idxTwo-list-cont { + width: 50%; + height: 100%; + padding: 20px; + box-sizing: border-box; + position: absolute; + top: 0; + background-color: #06acf9; + color: #fff; +} + +.idxTwo-list-title { + font-size: 16px; +} + +.idxTwo-list-text { + font-size: 12px; + -webkit-line-clamp: 4; + line-height: 24px; + margin: 10px 0; +} + +.idxTwo-list-time img { + width: 16px; + height: 16px; + margin-left: 10px; + vertical-align: middle; +} + +.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; + -webkit-line-clamp: 5; + text-align: left; + padding-top: 15px; + line-height: 26px; +} + +.idxTwo-list li:nth-child(1) .idxTwo-list-text::after { + position: absolute; + content: ''; + left: 0; + top: 0; + background-color: #06acf9; + width: 70px; + height: 4px; +} + +.idxTwo-list li:nth-child(2) .idxTwo-list-img, +.idxTwo-list li:nth-child(3) .idxTwo-list-img { + left: 0; +} + +.idxTwo-list li:nth-child(2) .idxTwo-list-cont, +.idxTwo-list li:nth-child(3) .idxTwo-list-cont { + left: 50%; +} + +.idxTwo-list li:nth-child(2) .idxTwo-list-img::after, +.idxTwo-list li:nth-child(3) .idxTwo-list-img::after { + right: 0; + border-right: 10px solid #06acf9; +} + +.idxTwo-list li:nth-child(4) .idxTwo-list-img, +.idxTwo-list li:nth-child(5) .idxTwo-list-img, +.idxTwo-list li:nth-child(6) .idxTwo-list-img { + right: 0; +} + +.idxTwo-list li:nth-child(4) .idxTwo-list-cont, +.idxTwo-list li:nth-child(5) .idxTwo-list-cont, +.idxTwo-list li:nth-child(6) .idxTwo-list-cont { + right: 50%; +} + +.idxTwo-list li:nth-child(4) .idxTwo-list-img::after, +.idxTwo-list li:nth-child(5) .idxTwo-list-img::after, +.idxTwo-list li:nth-child(6) .idxTwo-list-img::after { + left: 0; + 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; +} + +/* + 首页第三模块 +*/ +.idxThree .contant { + overflow: hidden; + padding: 10px 0 20px; +} + +.threeCont { + width: calc(50% - 10px); + float: left; + box-shadow: 0 2px 20px rgba(0, 0, 0, .1); + 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: ''; + left: 10px; + right: 4px; + top: 0; + width: calc(100% - 14px); + height: 0; + border: 1px dashed #ededed; + transition: .3s; +} + +.threeCont-list li::before { + position: absolute; + content: ''; + left: 0; + top: calc(50% - 3px); + background-color: #e0e0e0; + border-radius: 50%; + 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: ''; + display: flex; + background-image: url(../images/title_line.png); + background-repeat: repeat; + background-position: center; + width: 100%; + height: 4px; + left: 0; + bottom: 0; +} + +.idxThree-title-name { + flex: 1; + position: relative; +} + +.idxThree-title-name::after { + position: absolute; + content: ''; + display: flex; + background-image: url(../images/title_back.png); + background-repeat: no-repeat; + background-position: left; + width: 120px; + height: 40px; + left: 0; + bottom: 0; +} + +.idxThree-title-icon { + position: absolute; + width: 120px; + height: 40px; + line-height: 40px; + color: #fff; + padding-left: 6px; + box-sizing: border-box; + z-index: 9; + font-size: 17px; + display: flex; +} + +.idxThree-title-icon img { + width: 18px; + height: 18px; + margin: 12px 8px 0 0; +} + +.idxThree-title-more { + color: #51c5fb; + font-size: 14px; + line-height: 40px; + cursor: pointer; +} + + +/* + 首页第四模块 +*/ +.idxFour { + width: 100%; + background-image: url(../images//idxFour_back.png); + height: 600px; + padding: 30px 0; + background-size: cover; + 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: ''; + left: 0; + bottom: 0; + background-color: #e0e0e0; + width: 100%; + height: 1px; +} + +.idxFour-text { + -webkit-line-clamp: 4; + line-height: 24px; + padding-top: 10px; +} + +.idxFour-more { + width: 100px; + text-align: center; + border: 1px solid #000; + background: transparent; + 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; + right: 20px; + background: #fff; + width: 60px; + height: 30px; + line-height: 40px; + overflow: hidden; + border: 1px solid #fff; +} + +.idxFour-Arrows .swiper-button-disabled { + opacity: 1; +} + +.idxFour-Arrows .swiper-button-next { + right: 0; + background-image: none; + background: #2da9e2; + text-align: center; + width: 50%; + color: #fff; + font-size: 20px; +} + +.idxFour-Arrows .swiper-button-prev { + left: 0; + background-image: none; + text-align: center; + font-size: 20px; + color: #2da9e2; + opacity: 1; +} + +/* + 友情链接 +*/ +.idxLink-ul { + overflow: hidden; + padding: 0 20px; + box-sizing: border-box; +} + +.idxLink-ul li { + float: left; + width: 16.66%; + font-size: 15px; + cursor: pointer; + line-height: 40px; +} + +.idxLink-ul li:hover { + color: #06acf9; +} + +.line { + background: #e6e6e6; + width: 100%; + height: 1px; + margin-top: -15px; + margin-bottom: 10px; + position: relative; +} + +.line::before { + position: absolute; + content: ''; + left: 0; + bottom: 0; + background-color: #06acf9; + width: 12%; + height: 2px; +} + +/* + 尾部 +*/ +.idxFooter { + background: #585858; + color: #fff; + width: 100%; + padding: 40px 0; +} + +.idxFooter-text { + text-align: center; +} + +.idxFooter-text span { + display: block; + font-size: 18px; + line-height: 30px; +} + +.idxFooter-img { + text-align: center; + margin-top: 30px; +} + +.idxFooter-img img { + width: 86px; +} + + +/*详情*/ +.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; + line-height: 45px; + font-size: 18px; + font-weight: 600; + background: #028dcf; + 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; + display: block; + background: url(../images/sanjiao2.png) 220px 14px no-repeat #fafafa; + font-size: 14px; + 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; + top: 0; + height: 40px; + border-bottom: 2px solid #016bd2; + line-height: 40px; + 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; + color: #ccc; + text-align: center; + margin-top: 30px; +} + +.tcdPageCode span.disabled { + display: inline-block; + height: 25px; + line-height: 25px; + padding: 0 10px; + margin: 0 2px; + color: #bfbfbf; + background: #f2f2f2; + border: 1px solid #bfbfbf; + border-radius: 4px; + vertical-align: middle; +} + +.tcdPageCode span.current { + display: inline-block; + height: 25px; + line-height: 25px; + padding: 0 10px; + margin: 0 2px; + color: #fff; + background-color: #428bca; + border: 1px solid #428bca; + border-radius: 4px; + vertical-align: middle; +} + +.tcdPageCode a { + display: inline-block; + color: #428bca; + display: inline-block; + height: 25px; + line-height: 25px; + padding: 0 10px; + border: 1px solid #ddd; + margin: 0 2px; + 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; + width: 100%; + line-height: 36px; + font-size: 14px; + color: #666; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.newslist li span { + position: absolute; + right: 0; + top: 0; + line-height: 36px; + color: #bbb; + text-align: center; +} + +.biaoti { + font-size: 18px; + color: #333; + text-align: center; + margin: 0 20px; + 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; + color: #454545; + 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; +} diff --git a/resources/views/category/list.blade.php b/resources/views/category/list.blade.php index b4853c9..5615758 100644 --- a/resources/views/category/list.blade.php +++ b/resources/views/category/list.blade.php @@ -1,56 +1,63 @@ -@extends('layouts.app') - -@section('title', $category->title) - -@section('content') - -
-
-
-
-

{{ $parent->title }}

-
    - @if ($parent->children->isNotEmpty()) - @foreach ($parent->children as $children) -
  • id==$children->id) class="active" @endif> - {{ $children->title }} -
  • - @endforeach - @endif -
-
-
-
-
-
{{ $category->title }}
- - 您当前所在位置:首页 > - @if ($category->id!=$parent->id) - {{ $parent->title }} > - @endif - {{ $category->title }} - -
-
-
-
    - @if ($articles->isNotEmpty()) - @foreach ($articles as $article) -
  • - {{ $article->title }}{{ $article->created_at->format('m-d') }} -
  • - @endforeach - @endif -
-
- @if ($articles->isNotEmpty()) - {{ $articles->links('layouts.pagination') }} - @endif -
-
-
-
-
-
- -@endsection +@extends('layouts.app') + +@section('title', $category->title) + +@section('content') + +
+
+
+
+

{{ $parent->title }}

+
    + @if ($parent->children->isNotEmpty()) + @foreach ($parent->children as $children) +
  • id==$children->id) class="active" @endif> + {{ $children->title }} +
  • + @endforeach + @endif +
+
+
+
+
+
{{ $category->title }}
+ + 您当前所在位置:首页 > + @if ($category->id!=$parent->id) + {{ $parent->title }} > + @endif + {{ $category->title }} + +
+
+
+ +
+ @if ($articles->isNotEmpty()) + {{ $articles->links('layouts.pagination') }} + @endif +
+
+
+
+
+
+ +@endsection diff --git a/resources/views/category/show.blade.php b/resources/views/category/show.blade.php index b4853c9..34dd8b7 100644 --- a/resources/views/category/show.blade.php +++ b/resources/views/category/show.blade.php @@ -37,7 +37,8 @@ @if ($articles->isNotEmpty()) @foreach ($articles as $article)
  • - {{ $article->title }}{{ $article->created_at->format('m-d') }} + {{ $article->title }} + {{ $article->created_at->format('m-d') }}
  • @endforeach @endif diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index 2b6a1ce..3e6df19 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -22,7 +22,7 @@
    -
    +
    {{ getArticlesBYCate(7,5)->first()->title }}
    @@ -31,8 +31,6 @@
    {{ getArticlesBYCate(7,5)->first()->created_at->format('Y-m-d') }} -
    - 查看更多