diff --git a/app/Http/Controllers/ArticleController.php b/app/Http/Controllers/ArticleController.php index d22c28e..757ff95 100644 --- a/app/Http/Controllers/ArticleController.php +++ b/app/Http/Controllers/ArticleController.php @@ -15,14 +15,21 @@ class ArticleController extends Controller */ public function show(Article $article) { -// $parent = $category = $article->category; + // $parent = $category = $article->category; // if ($category->childrens->isEmpty()) { // $parent = $category->parent; // } // $advert = Advert::where('category_id',73)->first(); + $categories = $article->categories; + $parent = []; - return view('article.show', compact('article')); -// return view('article.show', compact('article', 'parent', 'category','advert')); + foreach ($categories as $category) { + $top = getTopCate($category->id); + $parent[] = $top->id; + } + + return view('article.show', compact('article', 'parent')); + // return view('article.show', compact('article', 'parent', 'category','advert')); } diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 065ae51..c92cb55 100644 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -20,10 +20,9 @@ class IndexController extends Controller //研究中心 $links = Link::get(); - $adverts = Advert::where('category_id', 72)->latest('sort')->get(); $lt_adverts = Advert::where('category_id', 175)->latest('sort')->get(); - return view('index.index', compact('links', 'adverts', 'lt_adverts')); + return view('index.index', compact('links', 'lt_adverts')); } //通用获取文章 diff --git a/app/Http/Controllers/TestController.php b/app/Http/Controllers/TestController.php index 49fbdfa..8b18cdb 100644 --- a/app/Http/Controllers/TestController.php +++ b/app/Http/Controllers/TestController.php @@ -22,7 +22,8 @@ class TestController extends Controller public function set_article_category() { - $articles = Article::whereHas('category') + $articles = Article::query() + ->whereHas('category') ->chunk(200, function ($articles) { foreach ($articles as $article) { ArticleCategory::create([ diff --git a/public/assets/index/css/base.css b/public/assets/index/css/base.css index 1308b63..a6722c9 100644 --- a/public/assets/index/css/base.css +++ b/public/assets/index/css/base.css @@ -1,567 +1,567 @@ -@charset "utf-8"; - -/******基础样式开始******/ -body { - font-family: Microsoft Yahei, Arial, Helvetica, sans-serif; - font-size: 12px; - color: #333; - background: #fff; - text-align: justify; - text-justify: inter-ideograph; - background-image: url(about:blank); - background-attachment: fixed; - height: 100%; -} - -table, -td { - font-family: Microsoft Yahei, Arial, Helvetica, sans-serif; - font-size: 12px; - line-height: 24px; - color: #2e2e2e; -} - -html, -body, -div, -span, -p, -h1, -h2, -h3, -h4, -h5, -h6, -em, -img, -strong, -blockquote, -sub, -sup, -tt, -i, -b, -dd, -dl, -dt, -form, -label, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -ul, -li, -p, -a, -ol { - margin: 0; - padding: 0; -} - -s, -i, -em { - font-style: normal; - text-decoration: none; -} - -ul, -ol, -li { - list-style-type: none; - list-style: none; -} - -button, -input, -select, -textarea { - vertical-align: middle; - font-family: Microsoft Yahei; - margin: 0; - padding: 0; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: 100%; -} - -address, -cite, -dfn, -em, -var { - font-style: normal; -} - -code, -kbd, -pre, -samp { - font-family: courier new, courier, monospace; -} - -sup { - vertical-align: text-top; -} - -sub { - vertical-align: text-bottom; -} - -legend { - color: #000; -} - -fieldset, -img { - border: 0; -} - -button, -input, -select, -textarea { - font-size: 100%; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -a { - color: #6e6e6e; - text-decoration: none; -} - -.white, -.white a { - color: #fff; - text-decoration: none; -} - -.white, -a:hover { - color: #027eba; -} - -.clearfix { - clear: both; - height: 1px; - margin-top: -1px; - overflow: hidden; -} - -.fw { - font-family: Microsoft Yahei, Arial, Helvetica, sans-serif; -} - -.fl { - float: left; -} - -.fr { - float: right; -} - -.fb { - font-weight: bold; -} - -.disb { - display: block; -} - -.disn { - display: none; -} - -@font-face { - font-family: 'impact'; - src: url(impact.ttf); - src: url('impact.eot'); - /* IE9 Compat Modes */ - src: url('impact.eot?#iefix') format('embedded-opentype'), - /* IE6-IE8 */ - url('impact.woff') format('woff'), - /* Modern Browsers */ - url('impact.ttf') format('truetype'), - /* Safari, Android, iOS */ - url('impact.svg#impact') format('svg'); - /* Legacy iOS */ -} - - -.area-dialog-ct { - width: 760px; - padding: 10px; - background: #fff; -} - -.area-dialog-bar { - height: 40px; - background: #003a52; -} - -.area-dialog-bar span, -.area-dialog-bar a { - line-height: 40px; - color: #fff; - font-size: 14px; - padding: 0 15px; -} - -.area-dialog-bar a#_a_c_close { - float: right; -} - -.area-dialog-ct .area-dialog-content { - margin0; -} - -.area-dialog-ct .area-dialog-content::after { - clear: both; - display: block; - content: ""; -} - -.area-dialog-content li { - float: left; - padding: 10px; - position: relative; -} - -.area-dialog-content .area-m-o { - width: 150px; - margin: 0; - padding: 0 10px; - background: #fff; -} - -.area-dialog-content li .a-i-disable { - background: #d8d8d8; -} - -.area-dialog-content .area-m-o .a-check-num { - color: #d00; -} - -.area-dialog-content input { - margin: -3px 5px 0 0; -} - -.area-dialog-content .area-m-o lable { - line-height: 35px; - font-size: 12px; - color: #333; -} - -.area-dialog-content li .a-city-ct { - display: none; -} - -.area-dialog-content li.area-item-mover { - background: #f7e76a; -} - -.area-dialog-content li.area-item-mover .a-city-ct { - display: block; -} - -.area-dialog-bottom { - margin-top: 10px; - text-align: center; -} - -.area-dialog-bottom a { - padding: 5px 15px; - color: #fff; - background: #007ba9; - font-size: 14px; - border-radius: 3px; -} - -.area-dialog-bottom a:hover { - background: #003a52; - transition: 0.3s ease; -} - -.area-dialog-content .a-city-ct { - position: absolute; - left: 0; - top: 45px; - background: #f7e76a; - padding: 10px; - z-index: 100; - width: 480px; -} - -.area-dialog-content .a-city-ct:after { - content: ""; - display: block; - clear: both; -} - -.area-dialog-content .a-city-ct p { - float: left; - width: 100px; - padding: 5px 10px; -} - - -.color-1 { - background-color: #249edc; -} - -.color-2 { - background-color: #17a668; -} - -.color-3 { - background-color: #741d88; -} - -.color-4 { - background-color: #da9627; -} - -.color-5 { - background-color: #ff9933; -} - -.color-6 { - background-color: #6666ff; -} - -.color-7 { - background-color: #ff99ff; -} - -.color-8 { - background-color: #66cc66; -} - -.color-9 { - background-color: #666; -} - -.color-10 { - background-color: #ff7800; -} - -.color-11 { - background-color: #ccc; -} - -.color-12 { - background-color: #ff3333; -} - -.color-white { - background-color: #fff; -} - -.bgcolor-gray { - background: #f5f5f5; -} - -.ipt-txt { - outline: none; - border: 1px solid #ccc; -} - -.ipt-txt:focus, -.ipt-sec:focus { - border: 1px solid #0078b5; - box-shadow: #ccc 2px 4px 2px; -} - -.small-ipt { - line-height: 16px; - width: 150px; - height: 16px; - padding: 4px; -} - -.ipt-sec { - padding: 5px; -} - -.ipt-radio, -.ipt-check { - vertical-align: middle; - margin: 0 5px 4px 0; -} - -.btnBox { - width: 100%; - text-align: center; -} - -.Submit { - width: 200px; - height: 42px; - line-height: 42px; - font-size: 16px; - color: #fff; - border: 0; - outline: none; - margin: 0 auto; - cursor: pointer; - transition: background-color 0.3s ease; - -moz-transition: background-color 0.3s ease; - -webkit-transition: background-color 0.3s ease; -} - -.Submit:hover { - background-color: #F60; -} - -/* 弹性盒子布局 */ - -.flexrow { - display: -webkit-box; - /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ - display: -moz-box; - /* Firefox 17- */ - display: -webkit-flex; - /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ - display: -moz-flex; - /* Firefox 18+ */ - display: -ms-flexbox; - /* IE 10 */ - display: flex; - /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ - flex-direction: row; - justify-content: center; - align-items: center; - box-sizing: border-box; -} - -.flexcolumn { - display: -webkit-box; - /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ - display: -moz-box; - /* Firefox 17- */ - display: -webkit-flex; - /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ - display: -moz-flex; - /* Firefox 18+ */ - display: -ms-flexbox; - /* IE 10 */ - display: flex; - /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ - flex-direction: column; - justify-content: center; - align-items: center; - box-sizing: border-box; -} - -.jc_start { - justify-content: flex-start; -} - -.jc_end { - justify-content: flex-end; -} - -.jc_sb { - justify-content: space-between; -} - -.jc_sr { - justify-content: space-around; -} - -/* align-items: stretch|center|flex-start|flex-end|baseline|initial|inherit; */ - -.ai_start { - align-items: flex-start; -} - -.ai_end { - align-items: flex-end; -} - -.flex1 { - flex: 1; -} - -.flex2 { - flex: 2; -} - -.flex3 { - flex: 3; -} - -.flex4 { - flex: 4; -} - -.flex5 { - flex: 5; -} - -/* wrap 超出一行隐藏... 超出两行隐藏...*/ - - -.overflow1 { - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; -} - -.overflow2 { - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; -} - -.overflow3 { - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; -} - -.overflow4 { - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 4; - -webkit-box-orient: vertical; -} - -.overflow7 { - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 7; - -webkit-box-orient: vertical; -} - -.flexwrap{ - flex-wrap: wrap; -} \ No newline at end of file +@charset "utf-8"; + +/******基础样式开始******/ +body { + font-family: Microsoft Yahei, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #333; + background: #fff; + text-align: justify; + text-justify: inter-ideograph; + background-image: url(about:blank); + background-attachment: fixed; + height: 100%; +} + +table, +td { + font-family: Microsoft Yahei, Arial, Helvetica, sans-serif; + font-size: 12px; + line-height: 24px; + color: #2e2e2e; +} + +html, +body, +div, +span, +p, +h1, +h2, +h3, +h4, +h5, +h6, +em, +img, +strong, +blockquote, +sub, +sup, +tt, +i, +b, +dd, +dl, +dt, +form, +label, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +ul, +li, +p, +a, +ol { + margin: 0; + padding: 0; +} + +s, +i, +em { + font-style: normal; + text-decoration: none; +} + +ul, +ol, +li { + list-style-type: none; + list-style: none; +} + +button, +input, +select, +textarea { + vertical-align: middle; + font-family: Microsoft Yahei; + margin: 0; + padding: 0; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: 100%; +} + +address, +cite, +dfn, +em, +var { + font-style: normal; +} + +code, +kbd, +pre, +samp { + font-family: courier new, courier, monospace; +} + +sup { + vertical-align: text-top; +} + +sub { + vertical-align: text-bottom; +} + +legend { + color: #000; +} + +fieldset, +img { + border: 0; +} + +button, +input, +select, +textarea { + font-size: 100%; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +a { + color: #6e6e6e; + text-decoration: none; +} + +.white, +.white a { + color: #fff; + text-decoration: none; +} + +.white, +a:hover { + color: green; +} + +.clearfix { + clear: both; + height: 1px; + margin-top: -1px; + overflow: hidden; +} + +.fw { + font-family: Microsoft Yahei, Arial, Helvetica, sans-serif; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +.fb { + font-weight: bold; +} + +.disb { + display: block; +} + +.disn { + display: none; +} + +@font-face { + font-family: 'impact'; + src: url(impact.ttf); + src: url('impact.eot'); + /* IE9 Compat Modes */ + src: url('impact.eot?#iefix') format('embedded-opentype'), + /* IE6-IE8 */ + url('impact.woff') format('woff'), + /* Modern Browsers */ + url('impact.ttf') format('truetype'), + /* Safari, Android, iOS */ + url('impact.svg#impact') format('svg'); + /* Legacy iOS */ +} + + +.area-dialog-ct { + width: 760px; + padding: 10px; + background: #fff; +} + +.area-dialog-bar { + height: 40px; + background: #003a52; +} + +.area-dialog-bar span, +.area-dialog-bar a { + line-height: 40px; + color: #fff; + font-size: 14px; + padding: 0 15px; +} + +.area-dialog-bar a#_a_c_close { + float: right; +} + +.area-dialog-ct .area-dialog-content { + margin0; +} + +.area-dialog-ct .area-dialog-content::after { + clear: both; + display: block; + content: ""; +} + +.area-dialog-content li { + float: left; + padding: 10px; + position: relative; +} + +.area-dialog-content .area-m-o { + width: 150px; + margin: 0; + padding: 0 10px; + background: #fff; +} + +.area-dialog-content li .a-i-disable { + background: #d8d8d8; +} + +.area-dialog-content .area-m-o .a-check-num { + color: #d00; +} + +.area-dialog-content input { + margin: -3px 5px 0 0; +} + +.area-dialog-content .area-m-o lable { + line-height: 35px; + font-size: 12px; + color: #333; +} + +.area-dialog-content li .a-city-ct { + display: none; +} + +.area-dialog-content li.area-item-mover { + background: #f7e76a; +} + +.area-dialog-content li.area-item-mover .a-city-ct { + display: block; +} + +.area-dialog-bottom { + margin-top: 10px; + text-align: center; +} + +.area-dialog-bottom a { + padding: 5px 15px; + color: #fff; + background: #007ba9; + font-size: 14px; + border-radius: 3px; +} + +.area-dialog-bottom a:hover { + background: #003a52; + transition: 0.3s ease; +} + +.area-dialog-content .a-city-ct { + position: absolute; + left: 0; + top: 45px; + background: #f7e76a; + padding: 10px; + z-index: 100; + width: 480px; +} + +.area-dialog-content .a-city-ct:after { + content: ""; + display: block; + clear: both; +} + +.area-dialog-content .a-city-ct p { + float: left; + width: 100px; + padding: 5px 10px; +} + + +.color-1 { + background-color: #249edc; +} + +.color-2 { + background-color: #17a668; +} + +.color-3 { + background-color: #741d88; +} + +.color-4 { + background-color: #da9627; +} + +.color-5 { + background-color: #ff9933; +} + +.color-6 { + background-color: #6666ff; +} + +.color-7 { + background-color: #ff99ff; +} + +.color-8 { + background-color: #66cc66; +} + +.color-9 { + background-color: #666; +} + +.color-10 { + background-color: #ff7800; +} + +.color-11 { + background-color: #ccc; +} + +.color-12 { + background-color: #ff3333; +} + +.color-white { + background-color: #fff; +} + +.bgcolor-gray { + background: #f5f5f5; +} + +.ipt-txt { + outline: none; + border: 1px solid #ccc; +} + +.ipt-txt:focus, +.ipt-sec:focus { + border: 1px solid #0078b5; + box-shadow: #ccc 2px 4px 2px; +} + +.small-ipt { + line-height: 16px; + width: 150px; + height: 16px; + padding: 4px; +} + +.ipt-sec { + padding: 5px; +} + +.ipt-radio, +.ipt-check { + vertical-align: middle; + margin: 0 5px 4px 0; +} + +.btnBox { + width: 100%; + text-align: center; +} + +.Submit { + width: 200px; + height: 42px; + line-height: 42px; + font-size: 16px; + color: #fff; + border: 0; + outline: none; + margin: 0 auto; + cursor: pointer; + transition: background-color 0.3s ease; + -moz-transition: background-color 0.3s ease; + -webkit-transition: background-color 0.3s ease; +} + +.Submit:hover { + background-color: #F60; +} + +/* 弹性盒子布局 */ + +.flexrow { + display: -webkit-box; + /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ + display: -moz-box; + /* Firefox 17- */ + display: -webkit-flex; + /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ + display: -moz-flex; + /* Firefox 18+ */ + display: -ms-flexbox; + /* IE 10 */ + display: flex; + /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; +} + +.flexcolumn { + display: -webkit-box; + /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ + display: -moz-box; + /* Firefox 17- */ + display: -webkit-flex; + /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ + display: -moz-flex; + /* Firefox 18+ */ + display: -ms-flexbox; + /* IE 10 */ + display: flex; + /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ + flex-direction: column; + justify-content: center; + align-items: center; + box-sizing: border-box; +} + +.jc_start { + justify-content: flex-start; +} + +.jc_end { + justify-content: flex-end; +} + +.jc_sb { + justify-content: space-between; +} + +.jc_sr { + justify-content: space-around; +} + +/* align-items: stretch|center|flex-start|flex-end|baseline|initial|inherit; */ + +.ai_start { + align-items: flex-start; +} + +.ai_end { + align-items: flex-end; +} + +.flex1 { + flex: 1; +} + +.flex2 { + flex: 2; +} + +.flex3 { + flex: 3; +} + +.flex4 { + flex: 4; +} + +.flex5 { + flex: 5; +} + +/* wrap 超出一行隐藏... 超出两行隐藏...*/ + + +.overflow1 { + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; +} + +.overflow2 { + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.overflow3 { + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; +} + +.overflow4 { + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 4; + -webkit-box-orient: vertical; +} + +.overflow7 { + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 7; + -webkit-box-orient: vertical; +} + +.flexwrap{ + flex-wrap: wrap; +} diff --git a/public/assets/index/css/main.css b/public/assets/index/css/main.css index 84c25e8..3d5cf2f 100644 --- a/public/assets/index/css/main.css +++ b/public/assets/index/css/main.css @@ -2,7 +2,7 @@ body { min-width: 1200px; - background: #d6e8f4; + /*background: #d6e8f4;*/ } .header { @@ -151,7 +151,7 @@ body { #navul li.navmoon a, #navul li.active a { - color: #ffba64; + color: #fff; } #navul li.navhome a:hover { @@ -160,13 +160,17 @@ body { #navul li.navmoon ul { display: block; + background-color: rgb(63, 155, 11); + border-top: 1px solid #f7f7f7; } #navul li.navmoon ul li { - background: rgb(63, 155, 11); + /*background: rgb(63, 155, 11);*/ height: 40px; line-height: 40px; - border-top: 1px solid rgb(63, 155, 11); + width: 100%; + text-align: left; + border-top: solid 1px rgba(255,155,255,0.2); } #navul li.navmoon ul a { @@ -175,7 +179,7 @@ body { line-height: 40px; font-size: 12px; color: #fff; - width: 64px; + text-align: left; } #navul li.navmoon ul a:hover { @@ -339,7 +343,7 @@ body { .newslist { display: block; - padding: 10px 12px; + margin: 12px 12px 0 12px; } .hotnews { @@ -385,6 +389,9 @@ body { padding: 0 80px 0 14px; background: url(../images/jiantou.png) 2px 15px no-repeat; } +.newslist li:hover a{ + color: rgba(72,144,26,1); +} .newslist li:last-child { border: none; @@ -520,12 +527,29 @@ body { .news-txt.col-3 { width: 388px; - height: 280px; + /*height: 280px;*/ overflow: hidden; float: left; margin-right: 15px; } - +.worker_title{ + /*position: absolute;*/ + /*top: 140px;*/ + z-index: 100; + padding-bottom: 10px; + padding:10px 10px; +/* color: #353535;*/ + text-align: center; + overflow: hidden; + width: 100%; + display: inline-block; + /*font-weight: bold;*/ + font-size: 16px; +} +.worker_title span{ + font-size: 12px; + color: #999; +} .news-txt.col-3.last { margin-right: 0; } @@ -861,8 +885,9 @@ body { } .linkcon { - height: 54px; - margin: 10px; + /*height: 54px;*/ + /*margin: 10px;*/ + padding:10px; overflow: auto; } @@ -877,7 +902,7 @@ body { } .ft-menu { - height: 230px; + /*height: 230px;*/ width: 100%; background: linear-gradient(rgb(63, 155, 11), #3e8a1a); overflow: hidden; @@ -886,7 +911,7 @@ body { .menu { width: 1000px; float: left; - margin-top: 40px; + margin-top: 20px; padding-left: 20px; box-sizing: border-box; } @@ -940,7 +965,7 @@ body { text-align: center; line-height: 30px; margin-right: 70px; - margin-top: 80px; + margin-top: 12px; color: #fff; } @@ -952,6 +977,7 @@ body { line-height: 50px; background: #1c5302; padding-left: 20px; + text-align: center; } .mg-t-b { @@ -1235,16 +1261,17 @@ body { .words11_zzgz_xfgz_content { width: 100%; - height: 270px; - overflow: hidden; + /*height: 270px;*/ + /*overflow: hidden;*/ margin: 10px 0px; } .words11_zzgz_xfgz_content .box { width: 100%; - overflow: hidden; + overflow:hidden; + height: 314px; } - + /* 这是针对缺省样式 (必须的) */ .words11_zzgz_xfgz_content .box .focus { width: 100%; overflow: hidden; @@ -1313,25 +1340,25 @@ body { .news_list_content .sanjiao { width: 0; height: 0; - border-width: 10px; + border-width: 20px; border-style: solid; border-color: transparent transparent rgb(63, 155, 11) transparent; bottom: 0; position: absolute; left: 50%; - margin-left: -10px; + margin-left: -20px; } .news_list_content .sanjiao2 { width: 0; height: 0; - border-width: 10px; + border-width: 20px; border-style: solid; border-color: rgb(63, 155, 11) transparent transparent transparent; top: 0; position: absolute; left: 50%; - margin-left: -10px; + margin-left: -20px; } .news_list_content .img { @@ -1374,6 +1401,7 @@ body { .news_list_item:hover .txt .overflow4 { + overflow: hidden; opacity: 1; } @@ -1449,11 +1477,77 @@ body { } .tem ul { - width: calc(50% - 10px); + /*width: calc(50% - 10px);*/ float: left; margin: 0 5px; } - +.banner_title{ + display: inline-block; + width: 100%; + background-color: rgba(255,255,255,0.5); + color: #353535; + font-size: 30px; + text-align: center; + position: absolute; + bottom: 0; + padding:10px 0; +} +.lt_adverts_c{ + height: 64.7px; + width: 100%; + line-height: 64.7px; + text-align: center; + background-position: center; + background-repeat: no-repeat; + color: #fff; + font-size: 30px; + background-size: 100% 100%; + box-shadow: 0 0 10px rgba(2,2,2,0.5); + text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0; +} +.news_list_content1{ + width: 100%; + /*height: 400px;*/ + background-color: #fff; + display: flex; + flex-direction: row; + justify-content: flex-start; + align-item:center; + box-sizing:border-box; + margin-top: 10px; +} +.news_list_item1{ + flex:1; + width: 25%; + text-align: center; + /*background-color: pink;*/ + border:solid 1px #f9f8f7; + font-size: 14px; + cursor:pointer; +/* padding:10px;*/ + /*color: #353535;*/ +} +.news_list_item1>div{ + background-position: center; + background-repeat: no-repeat; + background-size: cover; + width: 100%; + height: 140px; + /*background-color: green;*/ +} +.news_list_item1:hover{ + border:solid 1px rgba(72,144,26,0.2); +} +.news_list_item1:hover span{ + color: rgba(72,144,26,1) +} +.news_list_item1>span{ + overflow: hidden; + width: 100%; + display: inline-block; + padding-top: 10px; + text-decoration: ellipsis; +} /*2020-10-15*/ .naturalCont{display:table; height: 120px; text-align: center;} diff --git a/public/assets/index/js/cjango.js b/public/assets/index/js/cjango.js index 17394c6..605e0d0 100644 --- a/public/assets/index/js/cjango.js +++ b/public/assets/index/js/cjango.js @@ -4,4 +4,4 @@ $('[data-href]').on('click', function (event) { return; } location.href = $(this).data('href'); -}); \ No newline at end of file +}); diff --git a/public/assets/index/js/nav.js b/public/assets/index/js/nav.js index 2be8a57..dbf393f 100644 --- a/public/assets/index/js/nav.js +++ b/public/assets/index/js/nav.js @@ -1,59 +1,57 @@ -/* -*author:Null -*DATE:2013.5.24 -*/ - -$(function(){ - //头页登录 - $("#navul > li").not(".navhome").hover(function(){ - $(this).addClass("navmoon") - },function(){ - $(this).removeClass("navmoon") - }); - -}); - - -(function($){ - $.fn.capacityFixed = function(options) { - var opts = $.extend({},$.fn.capacityFixed.deflunt,options); - var FixedFun = function(element) { - var top = opts.top; - element.css({ - "top":top - }); - $(window).scroll(function() { - var scrolls = $(this).scrollTop(); - if (scrolls > top) { - - if (window.XMLHttpRequest) { - element.css({ - position: "fixed", - top: 0 - }); - } else { - element.css({ - top: scrolls - }); - } - }else { - element.css({ - position: "absolute", - top: top - }); - } - }); - element.find(".close-ico").click(function(event){ - element.remove(); - event.preventDefault(); - }) - }; - return $(this).each(function() { - FixedFun($(this)); - }); - }; - $.fn.capacityFixed.deflunt={ - right : 0,//相对于页面宽度的右边定位 - top:0 - }; -})(jQuery); \ No newline at end of file +/* +*author:Null +*DATE:2013.5.24 +*/ + +$(function(){ + //头页登录 + $("#navul > li").not(".navhome").hover(function(){ + $(this).addClass("navmoon") + },function(){ + $(this).removeClass("navmoon") + }); +}); + +(function($){ + $.fn.capacityFixed = function(options) { + var opts = $.extend({},$.fn.capacityFixed.deflunt,options); + var FixedFun = function(element) { + var top = opts.top; + element.css({ + "top":top + }); + $(window).scroll(function() { + var scrolls = $(this).scrollTop(); + if (scrolls > top) { + + if (window.XMLHttpRequest) { + element.css({ + position: "fixed", + top: 0 + }); + } else { + element.css({ + top: scrolls + }); + } + }else { + element.css({ + position: "absolute", + top: top + }); + } + }); + element.find(".close-ico").click(function(event){ + element.remove(); + event.preventDefault(); + }) + }; + return $(this).each(function() { + FixedFun($(this)); + }); + }; + $.fn.capacityFixed.deflunt={ + right : 0,//相对于页面宽度的右边定位 + top:0 + }; +})(jQuery); diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index 4a10869..9cf0389 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -25,6 +25,7 @@ + {{-- 新闻与通告--}}
@@ -35,16 +36,18 @@
-
- @if (getArticlesBYCate(53,6)->isNotEmpty()) +
+ @if (getArticlesBYCate(53,8)->isNotEmpty())
    - @foreach (getArticlesBYCate(53,6) as $info) + @foreach (getArticlesBYCate(53,8) as $info) @if ($loop->iteration>1)
  • {{ $info->title }}{{ $info->created_at->format('Y-m-d') }} @@ -53,18 +56,19 @@ @endforeach
@endif -
-
- +
{{ getOneCategory(17,'title') }} @@ -100,7 +103,8 @@
{{ $info->title }}
-
查看更多 +
{{ $info->description1 ?? '' }} +
@@ -113,7 +117,8 @@
{{ $info->title }}
-
查看更多 +
{{ $info->description1 ?? ''}} +
@@ -127,10 +132,63 @@ @endif
- + +
+
+ {{ getOneCategory(17,'title') }} + 更多 >> +
+ {{--
--}} + {{-- @if (getArticlesBYCate(17,8,'all')->isNotEmpty())--}} + {{-- @foreach (getArticlesBYCate(17,8,'all') as $info)--}} + {{-- @if ($loop->odd)--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
{{ $info->title }}
--}} + {{--
{{ $info->description1 ?? '' }}--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{-- @else--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
{{ $info->title }}
--}} + {{--
{{ $info->description1 ?? ''}}--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{-- @endif--}} + {{-- @endforeach--}} + {{-- @endif--}} + {{--
--}} +
+ @if (getArticlesBYCate(17,8,'all')->isNotEmpty()) + @foreach (getArticlesBYCate(17,8,'all') as $info) +
+
+ {{ $info->title }} +
+ @endforeach + @endif +
+
-
+
{{ getOneCategory(43,'title') }} 更多 >> @@ -138,76 +196,157 @@
@if (getArticlesBYCate(43,6,'all')->isNotEmpty())
-
- @foreach (getArticlesBYCate(43,6,'all') as $article) - @if ($loop->iteration<=2) - - @endif - @endforeach -
    - @foreach (getArticlesBYCate(43,6,'all') as $article) - @if ($loop->iteration<=3) -
  • - - {{ $article->title }} - -
  • - @endif - @endforeach -
-
@endif -
-
+ {{--科技平台--}} +
{{ getOneCategory(18,'title') }}更多 >>
- @if (getArticlesBYCate(18,4)->isNotEmpty()) -
- -

{{ getArticlesBYCate(18,4)->first()->title}}

+ @if (getArticlesBYCate(18,8)->isNotEmpty()) +
+
+ @foreach (getArticlesBYCate(18,8) as $info) + + @endforeach +
+
-
    - @foreach (getArticlesBYCate(18,4) as $info) - @if ($loop->iteration>1) -
  • - {{ $info->title }} -
  • - @endif - @endforeach -
@endif
+
+ {{-- 政府决策服务--}} +
+
+
+ {{ getOneCategory(8,'title')}} + 更多 >> +
+
+ @if (getArticlesBYCate(8,6,'all')->isNotEmpty()) +
+
+ +
+
+ @endif +
+
+
+
+ + +
+
+ +
+
+
+ @if (getArticlesBYCate(127,3)->isNotEmpty()) + + @endif +
+
+
+ {{--院级领军人才梯队--}} + +
+
+
+ @if (getArticlesBYCate(176,3)->isNotEmpty()) + + @endif +
+
+
-
-
- 论坛 + {{-- 专家学者--}} + +
+
+
{{ getOneCategory(74,'title') }}
+ 更多 >> +
+
+ @if (getArticlesBYCate(74,5)->isNotEmpty()) +
+
+ @foreach (getArticlesBYCate(74,5) as $info) + + @endforeach +
+
+
+ @endif +
+
+
+
+
论坛
+ {{-- 更多 >>--}}
@if ($lt_adverts->isNotEmpty())
    @foreach ($lt_adverts as $advert) -
  • - +
  • + + {{ $advert->title }}
  • @endforeach
@@ -215,86 +354,9 @@
-
- -
-
-
-
{{ getOneCategory(127,'title') }}
- 更多 >> -
-
- @if (getArticlesBYCate(127,4)->isNotEmpty()) -
- -

{{ getArticlesBYCate(127,4)->first()->title}}

-
-
    - @foreach (getArticlesBYCate(127,4) as $info) - @if ($loop->iteration>1) -
  • - {{ $info->title }} -
  • - @endif - @endforeach -
- @endif -
-
-
-
-
{{ getOneCategory(74,'title') }}
- 更多 >> -
-
- - -
-
-
-
-
{{ getOneCategory(8,'title') }}
- 更多 >> -
-
- - @if (getArticlesBYCate(8,4)->isNotEmpty()) -
- -

{{ getArticlesBYCate(8,4)->first()->title}}

-
-
    - @foreach (getArticlesBYCate(8,4) as $info) - @if ($loop->iteration>1) -
  • - {{ $info->title }} -
  • - @endif - @endforeach -
- @endif -
-
+
- +
diff --git a/resources/views/layouts/header.blade.php b/resources/views/layouts/header.blade.php index 1e2d7ac..9d35f4d 100644 --- a/resources/views/layouts/header.blade.php +++ b/resources/views/layouts/header.blade.php @@ -13,13 +13,29 @@