静态资源

This commit is contained in:
2020-09-16 08:35:46 +08:00
parent 24315e4798
commit ac3b53b163
40 changed files with 8270 additions and 660 deletions

View File

@@ -43,6 +43,7 @@ class IndexController extends AdminController
/** /**
* Make a form builder. * Make a form builder.
*
* @return Form * @return Form
*/ */
protected function form() protected function form()

View File

@@ -33,6 +33,11 @@ class IndexController extends AdminController
$grid->column('category.title', '所属分类'); $grid->column('category.title', '所属分类');
$grid->column('title', '文章标题'); $grid->column('title', '文章标题');
$grid->column('sort', '序号'); $grid->column('sort', '序号');
$states = [
'on' => ['value' => 1, 'text' => '打开', 'color' => 'primary'],
'off' => ['value' => 2, 'text' => '关闭', 'color' => 'default'],
];
$grid->column('status', '状态')->switch($states);
$grid->column('created_at', '创建时间'); $grid->column('created_at', '创建时间');
return $grid; return $grid;
@@ -58,6 +63,12 @@ class IndexController extends AdminController
->uniqueName(); ->uniqueName();
$form->ueditor('content', '文章内容')->rules('required', ['required' => '详情不能为空']); $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)->default(1);
return $form; return $form;
} }

View File

@@ -11,6 +11,7 @@ use Encore\Admin\Layout\Row;
use Encore\Admin\Tree; use Encore\Admin\Tree;
use Encore\Admin\Widgets\Box; use Encore\Admin\Widgets\Box;
use Encore\Admin\Widgets\Form as WidgetsForm; use Encore\Admin\Widgets\Form as WidgetsForm;
use Illuminate\Support\MessageBag;
class IndexController extends AdminController class IndexController extends AdminController
{ {
@@ -35,6 +36,14 @@ class IndexController extends AdminController
$form->text('title', '分类名称')->rules('required'); $form->text('title', '分类名称')->rules('required');
$form->select('type', '分类类型') $form->select('type', '分类类型')
->options(Category::TYPES) ->options(Category::TYPES)
->when('show', function (WidgetsForm $form) {
$form->select('article_id', '关联文章')
->options(function ($option, $info) {
return Article::whereHas('category', function ($q) {
$q->where('type', 'show');
})->pluck('title', 'id');
})->help('当分类类型是文章详情的时候需要选择关联文章');
})
->required(); ->required();
$form->textarea('description', '分类简介') $form->textarea('description', '分类简介')
->rules('nullable'); ->rules('nullable');
@@ -43,6 +52,7 @@ class IndexController extends AdminController
->removable() ->removable()
->uniqueName(); ->uniqueName();
$form->number('order', '排序')->default(0); $form->number('order', '排序')->default(0);
$form->switch('top_show', '顶部导航显示')->states()->default(0);
$form->switch('status', '显示')->states()->default(1); $form->switch('status', '显示')->states()->default(1);
$form->action(admin_url('categories')); $form->action(admin_url('categories'));
@@ -89,6 +99,14 @@ class IndexController extends AdminController
$form->text('title', '分类名称')->rules('required'); $form->text('title', '分类名称')->rules('required');
$form->select('type', '分类类型') $form->select('type', '分类类型')
->options(Category::TYPES) ->options(Category::TYPES)
->when('show', function (Form $form) {
$form->select('article_id', '关联文章')
->options(function ($option, $info) {
return Article::whereHas('category', function ($q) {
$q->where('type', 'show');
})->pluck('title', 'id');
})->help('当分类类型是文章详情的时候需要选择关联文章');
})
->required() ->required()
->rules('required'); ->rules('required');
$form->textarea('description', '分类简介')->rows(4)->rules('nullable'); $form->textarea('description', '分类简介')->rows(4)->rules('nullable');
@@ -97,27 +115,19 @@ class IndexController extends AdminController
->removable() ->removable()
->uniqueName(); ->uniqueName();
$form->number('order', '排序')->default(0); $form->number('order', '排序')->default(0);
$form->select('article_id', '关联文章') $form->switch('top_show', '顶部导航显示')->states()->default(0);
->options(function ($option, $info) {
$category = $this;
if ($category) {
return Article::where('category_id', $category->id)->pluck('title', 'id');
} else {
return [0 => '没有数据'];
}
})->help('当分类类型是文章详情的时候需要选择关联文章');
$form->switch('status', '显示')->states()->default(1); $form->switch('status', '显示')->states()->default(1);
$form->saving(function (Form $form) { $form->saving(function (Form $form) {
if (request()->has('title')) { if (request()->has('title')) {
if (request()->type == Category::TYPE_SHOW && empty(request()->article_id)) { if (request()->type == Category::TYPE_SHOW && empty(request()->article_id)) {
$error = new MessageBag([ // $error = new MessageBag([
'title' => '错误', // 'title' => '错误',
'message' => '文章类型是文章详情的时候需要选择关联文章', // 'message' => '文章类型是文章详情的时候需要选择关联文章',
]); // ]);
//
return back()->withInput()->with(compact('error')); // return back()->withInput()->with(compact('error'));
} }
} }

View File

@@ -1,67 +0,0 @@
<?php
namespace App\Admin\Controllers;
use Encore\Admin\Controllers\AdminController;
use Encore\Admin\Form;
use Encore\Admin\Grid;
use Encore\Admin\Show;
class ExampleController extends AdminController
{
/**
* Title for current resource.
*
* @var string
*/
protected $title = 'Example controller';
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
$grid = new Grid(new ExampleModel);
$grid->column('id', __('ID'))->sortable();
$grid->column('created_at', __('Created at'));
$grid->column('updated_at', __('Updated at'));
return $grid;
}
/**
* Make a show builder.
*
* @param mixed $id
* @return Show
*/
protected function detail($id)
{
$show = new Show(ExampleModel::findOrFail($id));
$show->field('id', __('ID'));
$show->field('created_at', __('Created at'));
$show->field('updated_at', __('Updated at'));
return $show;
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$form = new Form(new ExampleModel);
$form->display('id', __('ID'));
$form->display('created_at', __('Created At'));
$form->display('updated_at', __('Updated At'));
return $form;
}
}

View File

@@ -10,10 +10,11 @@ use Encore\Admin\Layout\Row;
class HomeController extends Controller class HomeController extends Controller
{ {
public function index(Content $content) public function index(Content $content)
{ {
return $content return $content
->title('Dashboard') ->title('看板')
->description('Description...') ->description('Description...')
->row(Dashboard::title()) ->row(Dashboard::title())
->row(function (Row $row) { ->row(function (Row $row) {
@@ -22,13 +23,14 @@ class HomeController extends Controller
$column->append(Dashboard::environment()); $column->append(Dashboard::environment());
}); });
$row->column(4, function (Column $column) { // $row->column(4, function (Column $column) {
$column->append(Dashboard::extensions()); // $column->append(Dashboard::extensions());
// });
//
// $row->column(4, function (Column $column) {
// $column->append(Dashboard::dependencies());
// });
}); });
}
$row->column(4, function (Column $column) {
$column->append(Dashboard::dependencies());
});
});
}
} }

126
app/Helpers/function.php Normal file
View File

@@ -0,0 +1,126 @@
<?php
use App\Models\Advert;
use App\Models\Category;
use App\Models\Article;
function getOneCategory($categoryId, $return = '')
{
$category = Category::find($categoryId);
if ($category) {
if ($return) {
return $category->{$return};
}
return $category;
}
return new Category;
}
/**
* Notes: 获取文章分类详情
* @Author: 玄尘
* @Date : 2020/9/10 13:21
* @param $categoryId
* @param string $result
* @return \App\Models\Article
*/
function getOneArticleBYCate($categoryId, $result = '')
{
$info = Article::where('category_id', $categoryId)->latest('sort')->latest()->first();
if ($info) {
if ($result) {
return $info->{$result};
}
return $info;
} else {
return '';
}
return new Article;
}
/**
* Notes: 获取分类下的文章
* @Author: 玄尘
* @Date : 2020/9/10 10:05
* @param $categoryId
* @param $take
* @return \App\Models\Article
*/
function getArticlesBYCate($categoryId, $take = 8, $mark = 'one')
{
if ($mark == 'one') {
$articles = Article::where('category_id', $categoryId)
->where('status', 1)
->latest('sort')
->latest()
->take($take)
->get();
} else {
$cate = Category::find($categoryId);
$ids = $cate->getAllChildrenId();
$articles = Article::whereIn('category_id', $ids)
->where('status', 1)
->latest('sort')
->latest()
->take($take)
->get();
}
return $articles;
}
//获取子分类
function getCateChild($categoryId)
{
return Category::where('status', 1)
->where('parent_id', $categoryId)
->orderBy('order', 'asc')
->get();
}
//获取顶级分类
function getTopCate($categoryId)
{
$parent = Category::find($categoryId);
while ($parent->parent_id != 0) {
$parent = $parent->parent;
}
return $parent;
}
//获取一个广告
function getOneAdvertByCate($categoryId, $result = '')
{
$info = Advert::where('category_id', $categoryId)
->latest('sort')
->latest()
->first();
if ($info) {
if ($result) {
return $info->{$result};
}
return $info;
} else {
return '';
}
return new Advert;
}
function getAdvertsByCate($categoryId, $take = 8)
{
return Advert::where('category_id', $categoryId)
->latest('sort')
->latest()
->take($take)->get();
}

View File

@@ -15,13 +15,15 @@ class ArticleController extends Controller
*/ */
public function show(Article $article) public function show(Article $article)
{ {
$parent = $category = $article->category; $category = $article->category;
if ($category->childrens->isEmpty()) { $parent = getTopCate($category->id);
$parent = $category->parent;
}
$advert = Advert::where('category_id',73)->first();
return view('article.show', compact('article', 'parent', 'category','advert')); $next = Article::where('id', '>', $article->id)
->where('category_id', $article->category_id)
->where('status', 1)
->first();
return view('article.show', compact('article', 'next', 'parent'));
} }

View File

@@ -18,7 +18,7 @@ class CategoryController extends Controller
if ($category->type == Category::TYPE_SHOW && $category->article_id) { if ($category->type == Category::TYPE_SHOW && $category->article_id) {
return redirect("articles/" . $category->article_id); return redirect("articles/" . $category->article_id);
} else { } else {
$articles = $category->relations(Category::TYPE_ARTICLE)->paginate(); $articles = $category->relations(Category::TYPE_ARTICLE)->paginate(8);
$parent = $category; $parent = $category;
if ($category->childrens->isEmpty()) { if ($category->childrens->isEmpty()) {
$parent = $category->parent; $parent = $category->parent;

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Advert; use App\Models\Advert;
use App\Models\Category; use App\Models\Category;
use App\Models\Link;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Validation\ValidatesRequests;
@@ -24,14 +25,10 @@ class Controller extends BaseController
->orderBy('order', 'desc') ->orderBy('order', 'desc')
->select('id', 'title') ->select('id', 'title')
->get(); ->get();
$links = Link::get();
//地步友情链接
if (url()->current() == route('index.index')) {
$adverts = Advert::where('category_id', 26)->get();
View::share('adverts', $adverts);
}
View::share('all_categorys', $categorys); View::share('all_categorys', $categorys);
View::share('links', $links);
} }
} }

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Advert;
use App\Models\Article; use App\Models\Article;
use App\Models\Link; use App\Models\Link;
@@ -23,7 +24,10 @@ class IndexController extends Controller
$info = Article::where('category_id', 2)->first(); //院所介绍 $info = Article::where('category_id', 2)->first(); //院所介绍
$links = Link::get(); $links = Link::get();
return view('index.index', compact('links', 'fydt', 'kydt', 'ldbz', 'kycg', 'rctd', 'info')); $advert = Advert::where('category_id', 26)->latest('sort')->first();
$center_advert = Advert::where('category_id', 28)->latest('sort')->first();
return view('index.index', compact('advert', 'center_advert', 'fydt', 'kydt', 'ldbz', 'kycg', 'rctd', 'info'));
} }
//通用获取文章 //通用获取文章

View File

@@ -10,6 +10,7 @@ use App\Traits\Tree;
class TestController extends Controller class TestController extends Controller
{ {
use Tree; use Tree;
public function index() public function index()
@@ -40,9 +41,12 @@ class TestController extends Controller
dump(count($cateids)); dump(count($cateids));
dump(count($oldids)); dump(count($oldids));
dump($diffids); dump($diffids);
dd();
foreach ($diffids as $diffid) { foreach ($diffids as $diffid) {
$info = DedeArctype::where('id', $diffid)->where('ishidden', 0)->select('id', 'reid as parent_id', 'typename as title', 'content')->first(); $info = DedeArctype::where('id', $diffid)
->where('ishidden', 0)
->select('id', 'reid as parent_id', 'typename as title', 'content')
->first();
$data = $this->getData($info); $data = $this->getData($info);
Category::create($data); Category::create($data);
} }
@@ -83,14 +87,20 @@ class TestController extends Controller
public function checkArticle() public function checkArticle()
{ {
// $lists = Article::where('category_id', 0)->get(); $lists = Article::where('category_id', 0)->get();
// foreach ($lists as $list) {
// $old = DedeArchive::find($list->oldid); foreach ($lists as $list) {
// $cate = Category::where('oldid', $old->typeid)->first(); $old = DedeArchive::find($list->oldid);
// $list->category_id = $cate->id; $cate = Category::where('oldid', $old->typeid)->first();
// $list->save(); if (!$cate || !$old) {
// } dump($old);
// dd(); dump($cate);
dd('出问题了');
}
$list->category_id = $cate->id;
$list->save();
}
dd();
$articleids = Article::where('oldid', '>', 0)->pluck('oldid'); $articleids = Article::where('oldid', '>', 0)->pluck('oldid');
$oldids = DedeArchive::pluck('id'); $oldids = DedeArchive::pluck('id');
$diffids = array_diff($oldids->toArray(), $articleids->toArray()); $diffids = array_diff($oldids->toArray(), $articleids->toArray());
@@ -168,7 +178,9 @@ class TestController extends Controller
if ($categorys->count() > 1) { if ($categorys->count() > 1) {
dd('已经导入过数据'); dd('已经导入过数据');
} }
$lists = DedeArctype::where('ishidden', 0)->select('id', 'reid as parent_id', 'typename as title', 'content')->get(); $lists = DedeArctype::where('ishidden', 0)
->select('id', 'reid as parent_id', 'typename as title', 'content')
->get();
$list = Tree::list2tree($lists->toArray(), 'id', 'parent_id', 'children', 0); $list = Tree::list2tree($lists->toArray(), 'id', 'parent_id', 'children', 0);
foreach ($list as $key => $value) { foreach ($list as $key => $value) {
@@ -191,6 +203,7 @@ class TestController extends Controller
'content' => $category['content'], 'content' => $category['content'],
'status' => 1, 'status' => 1,
]; ];
return $data; return $data;
} }

View File

@@ -7,8 +7,14 @@ use App\Models\Traits\HasOneCover;
class Article extends Model class Article extends Model
{ {
use HasOneCover, BelongsToCategory; use HasOneCover, BelongsToCategory;
public function getLinkAttribute()
{
return route('article.show', $this);
}
public function get_content_cover() public function get_content_cover()
{ {
preg_match("/<img.*?src=\"([^\"]+)\"[^>].*?>/isU", str_ireplace("\\", "", $this->content), $matches); preg_match("/<img.*?src=\"([^\"]+)\"[^>].*?>/isU", str_ireplace("\\", "", $this->content), $matches);
@@ -39,6 +45,7 @@ class Article extends Model
$path = config('app.url') . $path; $path = config('app.url') . $path;
} }
return $path; return $path;
} }

View File

@@ -7,17 +7,22 @@ use Encore\Admin\Traits\ModelTree;
class Category extends Model class Category extends Model
{ {
use AdminBuilder, ModelTree;
public const TYPES = [ use AdminBuilder, ModelTree;
'article' => '文章列表',
'show' => '文章详情',
'advert' => '广告',
];
public const TYPE_SHOW = 'show'; public const TYPE_SHOW = 'show';
public const TYPE_ARTICLE = 'article'; public const TYPE_ARTICLE = 'article';
public const TYPE_ADVERT = 'advert'; public const TYPE_ADVERT = 'advert';
public const TYPES = [
self::TYPE_ARTICLE => '文章列表',
self::TYPE_SHOW => '文章详情',
self::TYPE_ADVERT => '图片',
];
public function getLinkAttribute()
{
return route('category.show', $this);
}
/** /**
* 关联的数据 * 关联的数据

View File

@@ -40,6 +40,9 @@
"classmap": [ "classmap": [
"database/seeds", "database/seeds",
"database/factories" "database/factories"
],
"files": [
"app/Helpers/function.php"
] ]
}, },
"autoload-dev": { "autoload-dev": {

4079
newdqb.sql Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,194 +1,733 @@
@charset "utf-8"; @charset "UTF-8";
/* CSS Document */
*{ margin:0; padding:0}
ul li{ list-style:none}
img{ border:0; max-width:100%}
a{ text-decoration:none; color:#333}
.clear{ clear:both}
body{ font-family:"微软雅黑"; width:100%; min-width:1200px;color: #333;font-size: 14px;}
.ccsl{ display:block;overflow:hidden; white-space:nowrap;text-overflow:ellipsis;}
p{text-align:justify}
.main{ width:1200px; margin:0 auto;} html, body {
padding: 0;
margin: 0;
font-size: 14px;
font-family: "微软雅黑";
color: #333;
}
a {
color: #333;
}
.banner{ width:100%; min-width:1200px; /*height:400px;*/ overflow:hidden; position:relative;font-size:0; margin:0 auto;} a:hover {
.b-img{ /*height:400px;*/ position:absolute; left:0; top:0;} color: #203175;
.b-img img{ display:block; /*height:400px;*/ float:left;} }
.b-list{ height:20px; /*padding-top:380px;*/ margin:0 auto;position:relative;z-index:1;}
.b-list span{ display:block;cursor:pointer; width:10px; height:10px; border-radius:50%; background:#fff; float:left; margin:0 5px; _margin:0 3px;}
.b-list .spcss{ background:#0580c8}
.topbox{ width:100%; min-width:1200px; height:40px; line-height:40px; overflow:hidden;background:#ededed;} a, a:hover {
.topbox p{ width:1200px; margin:0 auto; font-size:14px; color:#333;} text-decoration: none;
}
.logo{ width:1200px; margin:0 auto; overflow:hidden} p, h1, h2, h3, h4 {
.logo img{ display:block; width:1200px;} margin: 0;
}
.nav{width:100%; min-width:1200px; overflow:hidden;background: #0580c8;height: 54px;} ul {
.nav ul{ overflow:hidden} list-style: none;
.nav ul li{ float:left;width: 125px;height: 54px;text-align: center;line-height: 54px; overflow:hidden; margin-right:1px} padding: 0;
.nav ul li a{color: #fff;font-size: 15px; display:block} margin: 0;
.nav ul li:hover,.nav ul li.on{ background:rgb(74, 136, 207)} }
.part1{margin: 20px auto; width:1200px;color: #666;font-size: 14px;line-height: 28px; height:28px; overflow:hidden} img {
.part1 span{ display:block; float:left; font-weight:bold;} vertical-align: top;
.part1 .con{ float:left; max-width:1000px; overflow:hidden} }
.part1 .con a{ display:inline-block;color: #666; padding-right:5px}
.part2{ width:100%; min-width:1200px;background:#F3F3F3; padding:20px 0} /* 文字裁剪 */
.part2 .titbox{width: 340px;margin: 20px auto;height: 65px;text-align: center; overflow:hidden} .nowrap {
.part2 .titbox p{ text-align:center;color: #0580c8;font-weight:bold;font-size: 30px;} max-width: 100%;
.part2 .titbox em{font-style:normal;text-transform: uppercase;color: #afb2af;font-size: 14px;font-family: arial;text-align: center;margin-left: 10px;} overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.part2 ul{ padding-bottom:20px; overflow:hidden} .nowrap-multi {
.part2 ul li{background: #fff;width: 285px;height: 324px;float: left;margin: 10px 20px 10px 0;overflow: hidden;} display: -webkit-box;
.part2 ul li:nth-child(4n){ margin-right:0} overflow: hidden;
.part2 ul li img{margin: 10px 10px 0 10px;width: 265px;height: 265px;} text-overflow: ellipsis;
.part2 ul li p{ text-align:center;line-height: 48px;color: #333; font-size: 16px;} -webkit-box-orient: vertical;
.part2 ul li:hover p{color: #0580c8;} -webkit-line-clamp: 2;
}
.part3{ padding-top:46px; width:1200px; margin:0 auto; overflow:hidden; padding-bottom:20px} /* 禁止响应式 */
.part3 .titbox{width: 600px;margin:0 auto;text-align: center;} .container {
.part3 .titbox p{padding-top: 18px; font-weight:bold;font-size: 28px;color: #000;text-align: center;} width: 1190px;
.part3 .titbox span{font-style:normal;text-transform: uppercase;color: #afb2af;font-size: 14px;font-family: arial;text-align: center;line-height: 34px;} margin: 0 auto;
.part3box{ padding-top:30px;} }
.part3box .p3L{border: 10px solid #eee;width: 315px;height: 216px;margin-right: 20px;float: left; overflow:hidden}
.part3box .p3L img{width: 315px;height: 216px;}
.part3box .p3R{width: 845px;float: left; padding-top: 10px;}
.part3box .p3R .con{color: #666666;font-size: 14px;line-height: 2;margin-bottom: 10px; max-height:170px; overflow:hidden}
.part3box .p3R a.more{border-radius: 20px;padding: 2px 10px;background: #0580c8;color: #fff;margin-top: 10px;display: inline-block;}
.part3box .p3R a.more:hover{background: #ccc;color: #000;transition: all .5s;}
.marqueeleft{width:1200px;overflow:hidden; padding-top:40px}
.marqueeleft ul{float:left;}
.marqueeleft li{float:left;display:inline;height:128px;overflow:hidden; padding-right:20px }
/* 首页 */
.mian {
background-color: #eff0f4;
}
.part4{width:100%; min-width:1200px; background:url(../images/bg.jpg) repeat;padding: 43px 0;margin: 20px auto;} .mian-title {
.part4box{ float:left;width: 582px;overflow: hidden;} border-bottom: solid 1px #e6e6e6;
.part4box .titbox{ height:27px; overflow:hidden; line-height:27px;} padding: 10px 0;
.part4box .titbox h2{ float:left;color: #0580c8;font-size: 18px;font-weight: normal; max-width:450px; overflow:hidden;border-left: 4px solid #0580c8; padding-left: 10px;} margin-bottom: 20px;
.part4box .titbox a{ float:right;color: #333;font-size: 14px;} position: relative;
}
.part4box .cons{background: #fff;margin-top: 20px;padding: 10px;} .mian-title b {
.p4one{ height:147px; overflow:hidden} font-size: 18px;
.p4one .p4oneL{width:183px; height:137px;float: left;margin-right: 10px;margin-bottom: 10px; overflow:hidden} padding: 0 10px;
.p4one .p4oneL img{width:183px; height:137px;} position: relative;
.p4one .p4oneR{width: 350px;height:137px;float: right; overflow:hidden} }
.p4one .p4oneR a{font-weight: bold;color: #333;font-size: 14px;margin: 10px 0; float:left; max-width:250px;}
.p4one .p4oneR span{ margin:10px 0; float:right;font-weight: normal;font-size: 14px;color: #666;}
.p4one .p4oneR .sub{font-size: 14px;line-height: 1.8; height:75px; overflow:hidden}
.p4one .p4oneR a:hover{ color:#0580c8}
.part4 ul{ padding-top:15px; overflow:hidden} .mian-title b::before {
.part4 ul li{line-height:35px; overflow:hidden;height:35px;border-bottom: 1px dotted #ccc;} content: "";
.part4 ul li p{background: #0580c8;width: 14px;height: 14px;border-radius: 50%;float: left;text-align: center;color: #fff;margin-right: 15px;line-height: 14px;margin-top: 10px; font-size:14px;} position: absolute;
.part4 ul li a{ float:left;color: #333;font-size: 14px; max-width:410px;} bottom: -11px;
.part4 ul li span{ float:right;color: #666;font-size: 14px;} left: 0;
.part4 ul li:hover p{background: #ccc;color: #000; transition: all .5s;} right: 0;
.part4 ul li:hover a{color: #0580c8;transition: all .5s;} height: 3px;
.part4 ul li:hover span{color: #0580c8; transition: all .5s;} background-color: #203175;
}
.part4box.fr{ float:right} .mian-title span {
color: gray;
font-size: 14px;
font-weight: normal;
}
.mian-title-more {
position: absolute;
right: 0;
line-height: 25px;
color: gray;
padding: 0 15px;
}
.linkbox{margin: 40px auto; width:1200px; overflow:hidden} .mian-title-more i {
.linkbox .linkL{ width:81px; height:70px; overflow:hidden; float:left} margin-left: 5px;
.linkbox .linkL .p1{ width:73px; height:35px; padding-left:8px; line-height:35px; color:#fff; font-size:14px; background:url(../images/icon.png) no-repeat} font-size: 18px;
.linkbox .linkL .p2{width:73px; height:35px; padding-left:8px;color:#fff; line-height:35px; font-size:14px; background:url(../images/icon2.png) no-repeat} }
.linkbox .linkR{width: 1096px;float: right;border: 1px solid #ccc; height: 50px;padding: 10px;font-size: 14px;line-height: 2;overflow: hidden;}
.linkbox .linkR a{color: #797979;margin: 0 5px;display: inline-block;}
/* 广告条 */
.index-ad {
width: 100%;
margin-top: 30px;
}
.footer{width:100%; min-width:1200px; background: #000;padding: 20px 0;font-size: 14px;} .index-ad img {
.fnav{ color:#a2a2a2; max-width:1200px; margin:0 auto; text-align:center} width: 100%;
.fnav a{display: inline-block;line-height: 2;margin: 0 5px 20px;color: #fff;} }
.foot{ text-align:center;color: #a2a2a2; line-height:2}
/* tool */
.tool {
background-color: #eff0f4;
height: 40px;
line-height: 40px;
text-align: right;
}
.mainWarp{ width:1200px; margin:0 auto;margin: 40px auto;} .tool a {
.mainLeft{float: left;width: 220px;} color: gray;
.typebox{border: 2px solid #0580c8;width: 212px;min-height:50px;background: #fcfcfc;} margin-left: 20px;
.typebox .tit{background:#0580c8;color: #fff;font-size: 18px;font-weight: normal;line-height: 2.5;} transition: color .4s;
.typebox .tit p{ text-align:center} }
.typebox ul{ overflow:hidden;margin-top: 20px;margin-bottom: 10px;}
.typebox ul li{background: #e1e1e1;margin: 10px 15px;line-height:35px;font-size: 14px; height:35px;}
.typebox ul li a{ float:left;color: #444444; max-width:140px;}
.typebox ul li p{ float:left;margin: 12px 10px;background: #000;border-radius: 50%;width: 12px;height: 12px;color: #fff;line-height: 0.8;text-align: center;}
.typebox ul li:hover{background: #0580c8; transition: all .5s;}
.typebox ul li:hover p{background: #fff;color: #000; transition: all .5s;}
.typebox ul li:hover a{color: #fff;transition: all .5s;}
.mainLeft .titboxcon{border-left: 4px solid #0580c8; height:27px;padding-left: 10px;margin:20px 0 10px; overflow:hidden} .tool a i {
.mainLeft .titboxcon p{font-size: 18px;color: #0580c8;} margin-right: 3px;
.mainLeft .lxwm{} }
.mainLeft .lxwm .con{line-height: 2; padding-top:10px}
ul.newsul{ overflow:hidden}
ul.newsul li{ height:35px;line-height:35px;color: #666; border-bottom:1px dashed #ddd}
ul.newsul li a{ color:#666}
ul.newsul li a:hover{ color:#0580c8}
.tool a:hover {
color: #203175;
}
/* 导航 */
.header {
padding: 10px 0;
position: relative;
}
.mainRight{ float:right; width:962px; overflow:hidden} .header-logo {
.brandnav{width: 950px;border: 1px solid #ccc;padding: 5px; height:25px; line-height:25px; overflow:hidden} height: 68px;
.brandnav p{ float:left;color: #0580c8;font-size: 16px;font-weight: normal;padding-left: 10px; max-width:200px;} width: 395px;
.brandnav .con{ float:right; font-size:14px; color:#333; max-width:300px} vertical-align: top;
}
ul.piclistul{padding: 15px;width: 930px; border: 1px solid #ccc;margin-top: 10px;min-height:300px; overflow:hidden} .header nav {
ul.piclistul li{ width:217px; height:192px; overflow:hidden; float:left; margin:10px 8px} position: absolute;
ul.piclistul li .proimg{ width:215px; height:160px;_display:table;display:table-cell;text-align:center;border:1px solid #ddd;vertical-align:middle} padding-left: 20px;
ul.piclistul li .proimg img{vertical-align:middle;max-height:160px; max-width:215px;} top: 10px;
ul.piclistul li p{ text-align:center;line-height: 30px; color:#333; padding:0 10px} right: 0;
ul.piclistul li:nth-child(4n){ margin-right:0} display: flex;
ul.piclistul li:hover p{color: #0580c8;} justify-content: flex-end;
ul.piclistul li:hover .proimg{ border:1px solid #0580c8} }
.header nav a {
display: inline-block;
color: #203175;
width: 90px;
line-height: 68px;
text-align: center;
position: relative;
transition: all .4s;
position: relative;
}
.header nav a::before {
position: absolute;
content: " ";
bottom: 0;
width: 50px;
height: 4px;
left: 20px;
background-color: #203175;
opacity: 0;
transition: all .4s;
}
ul.listul{padding: 15px 35px; overflow:hidden;border: 1px solid #ccc;margin-top: 10px;min-height:300px;} .header nav a.show::before,
ul.listul li{ height:36px; line-height: 36px;border-bottom: 1px dotted #CCC;} .header nav a:hover::before {
ul.listul li p{background: #0580c8;width: 14px; height: 14px; border-radius: 50%;float: left;text-align: center;color: #fff;margin-right: 15px;line-height: 12px;margin-top: 12px;} bottom: 15px;
ul.listul li a{ float:left;color: #333; max-width:600px;font-size: 14px;} opacity: 1;
ul.listul li span{ float:right;color: #666;font-size: 13px;} }
/* 欢迎语 */
.hello {
background-color: #203175;
}
.detailbox{padding: 15px;border: 1px solid #ccc;margin-top: 10px;min-height:70vh; overflow:hidden} .hello-text {
.detailbox .xq{} color: #abb2cb;
.detailbox .xq h1{font-size: 20px;line-height: 40px;text-align: center;color: #0580c8;} line-height: 40px;
.detailbox .xq .date{margin: 10px 0;padding: 5px 10px;font-size: 14px;line-height: 24px;color: #666;text-align: center;border: 1px dotted #ccc;} }
.detailbox .xq .con{padding: 10px;line-height:30px; padding-bottom:20px}
.detailbox .xq .prroimg{ display:block; margin:0 auto; max-width:650px; padding:10px 0}
/* banner图 */
.swiper-slide {
text-align: center;
}
.swiper-banner-img {
width: 100%;
padding-top: 20%;
background-size: 100%;
transition: all .2s;
background-repeat: no-repeat;
background-position: center;
position: relative;
display: block;
}
.pagebox{ text-align:center; padding-top:30px; padding-bottom:50px} .swiper-banner-img h3 {
.pagebox a{ border:1px solid #ccc; padding:5px 10px; display:inline-block; color:#333; margin:3px} background-image: linear-gradient(to left, transparent, rgba(0, 0, 0, .2), transparent);
.pagebox a:hover{background:#0580c8; color:#fff} padding: 15px 15px 50px 15px;
.pagebox a.on{ background:#0580c8; color:#fff} color: white;
font-size: 18px;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
}
.imgcenter{display: flex; flex-direction: row; justify-content: center;align-items: center;box-sizing: border-box;} .swiper-banner-img:hover {
.imgcenter li{width: 400px !important; } background-size: 102%;
.imgcenter li img{width: 400px !important;} }
.swiper-pagination .swiper-pagination-bullet {
background-color: white;
width: 12px;
height: 12px;
opacity: .8;
}
.swiper-pagination .swiper-pagination-bullet-active {
background-color: #203175;
opacity: 1;
}
/* 分院新闻 */
.news {
overflow: hidden;
padding-top: 30px;
}
.news-item {
float: left;
}
.news-hot {
width: 700px;
margin-right: 20px;
background-color: #EEEEEE;
position: relative;
}
.news-hot-cover {
width: 700px;
height: 336px;
}
.news-hot-text {
padding: 10px;
background-color: rgba(0, 0, 0, .5);
height: 100px;
position: absolute;
bottom: 0;
left: 0;
}
.news-hot-text a {
color: #fff;
}
.news-hot-text h3 {
line-height: 30px;
color: #fff;
}
.news-hot-text p {
line-height: 20px;
color: white;
}
.news-hot-more {
text-align: right;
padding-top: 10px;
}
.news-hot-more i {
margin-left: 5px;
color: #fff;
}
.news-title {
padding-top: 0;
box-sizing: border-box;
}
.news-ul {
width: 470px;
}
.news-ul-li {
line-height: 35px;
}
.news-ul-li:last-child {
margin: 0;
}
.news-ul-li a {
display: block;
transition: all .4s;
}
.news-ul-li a:hover {
background-color: #fafafa;
padding-left: 10px;
}
.news-time {
margin-right: 10px;
color: gray;
}
/* 科研动态 */
.dynamic {
padding-top: 30px;
}
.dynamic-ul {
margin: 0 -10px;
overflow: hidden;
}
.dynamic-ul-item {
background-color: white;
margin: 0 10px;
float: left;
width: calc(33.33% - 20px);
}
.dynamic-ul-cover {
width: 100%;
padding-top: 50%;
background-position: center;
background-size: cover;
display: block;
}
.dynamic-ul-text {
background-color: white;
height: 70px;
padding: 10px 0;
}
.dynamic-ul-text h3 {
line-height: 30px;
}
.dynamic-ul-text p {
line-height: 20px;
color: gray;
min-height: 40px;
}
.dynamic-ul-text a {
transition: color .4s;
}
/* 党团生活 */
.party {
width: 700px;
}
.party-ul-li {
padding: 5px 10px 5px 95px;
background-color: white;
position: relative;
min-height: 80px;
margin-bottom: 10px;
box-sizing: border-box;
transition: background-color .3s;
}
.party-ul-li:last-child {
margin: 0;
}
.party-ul-li a:hover .party-time {
color: white;
background-color: #203175;
transition: all .3s;
border: none;
}
.party-title {
font-weight: bold;
font-size: 16px;
display: block;
line-height: 30px;
}
.party-info {
line-height: 20px;
color: gray;
}
.party-time {
position: absolute;
left: 0;
top: 0;
border-right: solid 1px #EEEEEE;
text-align: center;
width: 80px;
height: 80px;
padding: 15px 0;
box-sizing: border-box;
}
.party-time h3 {
font-size: 20px;
line-height: 30px;
}
.party-time p {
line-height: 20px;
}
.party-cover {
background-size: cover;
background-position: center;
}
/* 精神文明 */
.spirit {
width: 470px;
margin-left: 20px;
background-color: white;
}
.spiritual-ul-li {
padding: 5px 10px;
background-color: white;
position: relative;
border-left: solid 1px transparent;
box-sizing: border-box;
min-height: 80px;
margin-bottom: 10px;
box-sizing: border-box;
transition: background-color .3s;
}
.spiritual-ul-li:last-child {
margin: 0;
}
.spiritual-ul-li:hover {
background-color: #fafafa;
border-left: solid 1px #203175;
}
.spiritual-ul-li a {
display: block;
}
.spiritual-title {
font-weight: bold;
font-size: 16px;
display: block;
line-height: 30px;
}
.spiritual-info {
line-height: 20px;
color: gray;
}
/* 国内国际新闻 */
.tabs {
padding-top: 30px;
}
.tabs-content-block {
overflow: hidden;
margin: 0 -10px;
}
.tabs-content-block li {
line-height: 35px;
float: left;
width: calc(50% - 20px);
margin: 0 10px;
}
.tabs-content-block li a {
display: block;
transition: all .4s;
}
.tabs-content-block li a:hover {
background-color: #fafafa;
padding-left: 10px;
}
.tabs-content-block li i {
margin-right: 5px;
}
/* tabs */
.tabs-title {
border-bottom: solid 1px #e6e6e6;
padding: 10px 0;
margin-bottom: 20px;
position: relative;
}
.tabs-item {
padding: 0 10px;
position: relative;
cursor: pointer;
font-size: 15px;
color: gray;
}
.tabs-item:hover {
color: #203175;
}
.tabs-item.show {
font-size: 18px;
font-weight: bold;
color: black;
}
.tabs-item.show::before {
content: "";
position: absolute;
bottom: -11px;
left: 0;
right: 0;
height: 3px;
background-color: #203175;
}
.tabs-content {
display: none;
}
.tabs-content.active {
display: block;
}
/* 子页面 */
.child {
overflow: hidden;
}
.child-nav,
.child-content {
float: left;
}
.child-nav {
width: 220px;
}
.child-content {
width: 950px;
margin-left: 20px;
}
/* 友情链接 */
.href {
padding: 30px 0;
}
.href-content {
padding-top: 10px;
overflow: hidden;
}
.href-content a {
line-height: 40px;
width: 20%;
display: inline-block;
float: left;
}
/* footer */
.footer {
background-color: #203175;
padding: 40px 0;
text-align: center;
color: white;
line-height: 30px;
}
.footer span {
padding: 0 10px;
}
/* 带有日期的列表 */
.list-ul {
margin-top: 20px;
}
/* 侧边栏导航 */
.kj-bjt {
margin-top: 20px;
min-height: 70px;
padding: 10px;
font-size: 20px;
box-sizing: border-box;
color: #fff;
text-align: right;
background-repeat: no-repeat;
background-image: url(../img/beijing.png);
background-size: cover;
}
.kj-bjt > b {
display: block;
line-height: 30px;
}
.kj-bjt > p {
line-height: 20px;
}
.child-nav-cover {
width: 100%;
margin-top: 20px;
}
.child-nav-ul {
background: #eee;
}
.child-nav-ul li {
position: relative;
}
.child-nav-ul li::before {
position: absolute;
content: " ";
height: 1px;
background: #ddd;
left: 15px;
right: 15px;
bottom: 0;
}
.child-nav-ul li:last-child::before {
display: none;
}
.child-nav-ul a {
line-height: 60px;
text-align: center;
display: block;
border-left: solid 4px rgba(0, 0, 0, 0);
padding-right: 4px;
}
.child-nav-ul a.show,
.child-nav-ul a:hover {
color: #203175;
background-color: white;
border-left: solid 4px #203175;
}
/*交流合作*/
.jlhz-border {
margin-top: 20px;
}
/*文章详情*/
.wzxq {
padding: 20px 0;
}
.wzxq h3 {
color: #333;
font-size: 25px;
margin-bottom: 10px;
}
.wzxq p {
color: #999898;
}
.xyp {
margin-top: 20px;
}
.xyp b {
color: #5d5c5c;
}
.xyp a {
color: #676767;
margin-left: 20px;
}
.ritText img {
max-width: 100%;
}
/* 分页 */
.pages {
text-align: center;
margin-top: 20px;
}
.pages a {
display: inline-block;
margin: 0 2px;
line-height: 30px;
padding: 0 12px;
text-align: center;
background-color: #f1f3f8;
color: #333;
}
.pages a:hover,
.pages a.show {
background-color: #273981;
color: white;
}

15
public/assets/index/css/swiper.min.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

5
public/assets/index/js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

18
public/assets/index/js/swiper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -2,13 +2,11 @@
/** /**
* Laravel - A PHP Framework For Web Artisans * Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com> * @author Taylor Otwell <taylor@laravel.com>
* @package Laravel
*/ */
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Auto Loader | Register The Auto Loader

View File

@@ -3,50 +3,26 @@
@section('title', '文章详情') @section('title', '文章详情')
@section('content') @section('content')
<div class="clear"></div> <!-- mian -->
<div class="mainWarp"> <div class="container child">
<div class="mainLeft"> <div class="wzxq">
<div class="typebox"> <h3>{{ $article->title }}</h3>
<div class="tit"> <p>发表时间:{{ $article->created_at }}</p>
<p class="ccsl">{{ $parent->title }}</p>
</div> </div>
<ul> <div class="ritText">
@foreach ($parent->childrens as $children)
<li>
<p>&gt;</p>
<a href="{{ route('category.show',$children) }}" class="ccsl">{{ $children->title }}</a>
</li>
@endforeach
</ul>
</div>
</div>
<div class="mainRight">
<div class="brandnav">
<p class="ccsl">{{ $category->title }}</p>
<div class="con">首页>
@if ($parent->id==$category->id)
{{ $category->title }}
@else
{{ $parent->title }}
<font>></font>
{{ $category->title }}
@endif
</div>
</div>
<div class="detailbox">
<div class="xq">
<h1>{{ $article->title }}</h1>
<div class="date">日期:{{ $article->created_at }}</div>
<div class="con">
@if ($article->cover) @if ($article->cover)
<img src="{{ $article->cover_path }}"></br> <img src="{{ $article->cover_path }}">
@endif @endif
<p>
{!! $article->content !!} {!! $article->content !!}
</p>
</div> </div>
@if ($next)
<div class="xyp">
<b>下一篇</b><a href="{{ $next->link }}">{{ $next->title }}</a>
</div> </div>
@endif
</div> </div>
</div> <!-- end mian -->
<div class="clear"></div>
</div>
@endsection @endsection

View File

@@ -0,0 +1,75 @@
@extends('layouts.app')
@section('title', '首页')
@section('content')
<!-- mian -->
<div class="container child">
<!-- 侧边导航 -->
<div class="child-nav">
<div class="kj-bjt">
<b>{{ $parent->title }}</b>
<p>Exchange and cooperation</p>
</div>
<ul class="child-nav-ul">
@if ($parent->childrens->isNotEmpty())
@foreach ($parent->childrens as $child)
<li>
<a href="{{ $child->link }}" @if($category->id==$child->id) class="show" @endif>{{ $child->title }}</a>
</li>
@endforeach
@endif
</ul>
</div>
<!-- content -->
<div class="child-content">
<ul class="party-ul list-ul">
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
</ul>
</div>
</div>
<!-- end mian -->
@endsection

View File

@@ -3,53 +3,46 @@
@section('title', '首页') @section('title', '首页')
@section('content') @section('content')
<div class="clear"></div> <!-- mian -->
<div class="mainWarp"> <div class="container child">
<div class="mainLeft"> <!-- 侧边导航 -->
<div class="typebox"> <div class="child-nav">
<div class="tit"> <div class="kj-bjt">
<p class="ccsl">{{ $parent->title }}</p> <b>{{ $parent->title }}</b>
<p>Exchange and cooperation</p>
</div> </div>
<ul> <ul class="child-nav-ul">
@foreach ($parent->childrens as $children) @if ($parent->childrens->isNotEmpty())
@foreach ($parent->childrens as $child)
<li> <li>
<p>&gt;</p> <a href="{{ $child->link }}" @if($category->id==$child->id) class="show" @endif>{{ $child->title }}</a>
<a href="{{ route('category.show',$children) }}" class="ccsl">{{ $children->title }}</a>
</li> </li>
@endforeach @endforeach
</ul>
</div>
</div>
<div class="mainRight">
<div class="brandnav">
<p class="ccsl">{{ $category->title }}</p>
<div class="con">首页>
@if ($parent->id==$category->id)
{{ $category->title }}
@else
{{ $parent->title }}
<font>></font>
{{ $category->title }}
@endif @endif
</ul>
</div> </div>
</div> <!-- content -->
<ul class="listul"> <div class="child-content">
<ul class="spiritual-ul jlhz-border">
@if ($articles->isNotEmpty())
@foreach ($articles as $article) @foreach ($articles as $article)
<li> <li class="spiritual-ul-li">
<p>&gt;</p> <a href="{{ $article->link }}">
<a href="{{ route('article.show',$article) }}" class="ccsl">{{ $article->title }}</a> <h3 class="spiritual-title nowrap">{{ $article->title }}</h3>
<span>{{ $article->created_at }}</span> <p class="spiritual-info nowrap-multi">
{{ $article->description }}
</p>
</a>
</li> </li>
@endforeach @endforeach
@endif
</ul> </ul>
</br> </div>
<div class="clear"></div> <div class="pages">
@if ($articles->isNotEmpty()) @if ($articles->isNotEmpty())
{{ $articles->links('layouts.pagination') }} {{ $articles->links('layouts.pagination') }}
@endif @endif
</div> </div>
</div> </div>
<!-- end mian -->
@endsection @endsection

View File

@@ -3,230 +3,322 @@
@section('title', '首页') @section('title', '首页')
@section('content') @section('content')
<!-- mian -->
{{-- 顶部广告 --}} <div class="container">
@if ($adverts->isNotEmpty()) <!-- 院所新闻 -->
<div class="clear"></div> <div class="news">
<div class="banner"> <div class="news-item news-hot">
<div class="b-img"> <img class="news-hot-cover" src="lib/img/banner_02.jpg">
@foreach ($adverts as $advert) <div class="news-hot-text">
<img src="{{ $advert->cover_path }}" width="100%"/> <h3 class="nowrap"><a href="#">杜新宇副院长到大庆分院调研</a></h3>
<p class="nowrap-multi">
国家新闻出版署日前下发通知确定《“十三五”国家重点图书、音像、电子出版物出版规划》第三次增补项目235个。规划实行动态管理公布增补项目的同时对撤销或变更的项目一并作出调整确定出版单位申请撤销项目141个、变更项目14个。</p>
<p class="news-hot-more"><a href="#">详情<i class="fa fa-chevron-right"></i></a></p>
</div>
</div>
<div class="news-item news-ul">
<div class="mian-title news-title">
<b>{{ getOneCategory(6,'title') }}</b>
<span>/&nbsp;&nbsp;School news</span>
<a class="mian-title-more" href="{{ getOneCategory(6,'link') }}">更多<i class="fa fa-angle-right"></i></a>
</div>
<ul>
@if (getArticlesBYCate(6,8)->isNotEmpty())
@foreach (getArticlesBYCate(6,8) as $article)
<li class="news-ul-li">
<a class="nowrap" href="{{ $article->link }}">
<span class="news-time">{{ $article->created_at->format('m-d') }}</span>{{ $article->title }}
</a>
</li>
@endforeach @endforeach
@endif
</ul>
</div> </div>
<div class="clear"></div>
<div class="b-list"> </div>
</div> </div>
<!-- 科研动态 -->
<div class="dynamic">
<div class="mian-title">
<b>{{ getOneCategory(9,'title') }}</b>
<span>/&nbsp;&nbsp;Scientific research dynamic</span>
<a class="mian-title-more" href="{{ getOneCategory(9,'link') }}">更多<i class="fa fa-angle-right"></i></a>
</div>
<ul class="dynamic-ul">
@if (getArticlesBYCate(9,3)->isNotEmpty())
@foreach (getArticlesBYCate(9,3) as $article)
<li class="dynamic-ul-item">
<span class="dynamic-ul-cover" style="background-image: url({{ $article->cover_path }});"></span>
<div class="dynamic-ul-text">
<h3 class="nowrap"><a href="{{ $article->link }}">{{ $article->title }}</a></h3>
<p class="nowrap-multi">{{ $article->description }}</p>
</div>
</li>
@endforeach
@endif @endif
<div class="part4"> </ul>
<div class="main">
<div class="part4box">
<div class="titbox">
<h2 class="ccsl">分院动态</h2>
<a href="{{ route('category.show',6) }}">更多>></a>
</div> </div>
<div class="cons"> <!-- 广告条 -->
<div class="p4one"> <div class="index-ad">
<div class="p4oneL"> <a href="{{ getOneAdvertByCate(28,'url') }}">
<a href="{{ route('article.show',$fydt->first()) }}"><img src="{{ $fydt->first()->get_one_cover() }}" /></a> <img src="{{ getOneAdvertByCate(28,'cover_path') }}">
</a>
</div> </div>
<div class="p4oneR">
<a href="detail.html" class="ccsl">{{ $fydt->first()->title }}</a> <!-- 党团生活, 精神文明 -->
<span>{{ $fydt->first()->created_at->format('Y-m-d') }}</span> <div class="news">
<div class="clear"></div> <div class="news-item party">
<div class="sub">{{ $fydt->first()->description }}</div> <div class="tabs-title" id="information">
<span class="tabs-item show">{{ getOneCategory(30,'title') }}</span>
<span class="tabs-item">{{ getOneCategory(29,'title') }}</span>
</div> </div>
</div> <div class="tabs-content-wrapper" id="informationContent">
<ul> <!-- 国内资讯 -->
@foreach ($fydt as $new) <ul class="party-ul tabs-content active">
<li> @if (getArticlesBYCate(30,3)->isNotEmpty())
<p>&gt;</p> @foreach (getArticlesBYCate(30,3) as $article)
<a href="{{ route('article.show',$new) }}" class="ccsl">{{ $new->title }}</a> <li class="party-ul-li">
<span>{{ $new->created_at->format('y-m-d') }}</span> <a href="{{ $article->link }}">
<span class="party-time">
<h3>{{ $article->created_at->format('d') }}</h3>
<p>{{ $article->created_at->format('Y-m') }}</p>
</span>
<h3 class="party-title nowrap">{{ $article->title }}</h3>
<p class="party-info nowrap-multi">{{ $article->description }}</p>
</a>
</li> </li>
@endforeach @endforeach
@endif
</ul>
<ul class="party-ul tabs-content">
@if (getArticlesBYCate(29,12)->isNotEmpty())
@foreach (getArticlesBYCate(29,12) as $article)
<li class="party-ul-li">
<a href="{{ $article->link }}">
<span class="party-time">
<h3>{{ $article->created_at->format('d') }}</h3>
<p>{{ $article->created_at->format('Y-m') }}</p>
</span>
<h3 class="party-title nowrap">{{ $article->title }}</h3>
<p class="party-info nowrap-multi">{{ $article->description }}</p>
</a>
</li>
@endforeach
@endif
</ul> </ul>
</div> </div>
</div> </div>
<div class="part4box fr"> <div class="news-item spirit">
<div class="titbox"> <div class="mian-title">
<h2 class="ccsl">科研动态</h2> <b>{{ getOneCategory(16,'title') }}</b>
<a href="{{ route('category.show',9) }}">更多>></a> <span>/&nbsp;&nbsp;Spiritual civilization</span>
<a class="mian-title-more" href="{{ getOneCategory(16,'link') }}">更多<i class="fa fa-angle-right"></i></a>
</div> </div>
<div class="cons"> <ul class="spiritual-ul">
<div class="p4one"> @if (getArticlesBYCate(16,3)->isNotEmpty())
<div class="p4oneL"> @foreach (getArticlesBYCate(16,3) as $article)
<a href="{{ route('article.show',$kydt->first()) }}"><img src="{{ $kydt->first()->get_one_cover() }}" /></a> <li class="spiritual-ul-li">
</div> <a href="{{ $article->link }}">
<div class="p4oneR"> <h3 class="spiritual-title nowrap">{{ $article->title }}</h3>
<a href="detail.html" class="ccsl">{{ $kydt->first()->title }}</a> <p class="spiritual-info nowrap-multi">
<span>{{ $kydt->first()->created_at->format('Y-m-d') }}</span> {{ $article->description }}
<div class="clear"></div>
<div class="sub">{{ $kydt->first()->description }}</div>
</div>
</div>
<ul>
@foreach ($kydt as $new)
<li>
<p>&gt;</p>
<a href="{{ route('article.show',$new) }}" class="ccsl">{{ $new->title }}</a>
<span>{{ $new->created_at->format('y-m-d') }}</span>
</li>
@endforeach
</ul>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
<div class="part3">
<div class="titbox">
<p class="ccsl">院所介绍</p>
<span class="ccsl">About us</span>
</div>
<div class="part3box">
<div class="p3L">
<a href="{{ route('article.show',$info) }}"><img src="{{ $info->get_one_cover() }}" /></a>
</div>
<div class="p3R">
<div class="con">
<p style="text-indent:2em">
{{ $info->description }}
</p> </p>
</div>
<a href="{{ route('article.show',$info) }}" class="more">查看详情</a>
</div>
</div>
<div class="clear"></div>
<div class="part1">
<span></span>
<div class="con">
<a href=""></a>
<a href=""></a>
<a href=""></a>
<a href=""></a>
</div>
</div>
<div class="clear"></div>
<div class="part2">
<div class="main">
<div class="titbox">
{{-- <a href="{{ route('category.show',3) }}"> --}}
<p class="ccsl">领导班子</p>
<em class="ccsl"></em>
{{-- </a> --}}
</div>
<ul class="imgcenter">
@foreach ($ldbz as $new)
<li>
<a href="{{ route('article.show',$new) }}">
<img src="{{ $new->get_one_cover() }}" />
<p class="ccsl">{{ $new->title }}</p>
</a> </a>
</li> </li>
@endforeach @endforeach
@endif
</ul> </ul>
<div class="titbox">
{{-- <a href="{{ route('category.show',10) }}"> --}}
<p class="ccsl">科研成果</p>
{{-- </a> --}}
</div> </div>
<ul> </div>
@foreach ($kycg as $new) <!-- 广告条 -->
<li> <div class="index-ad">
<a href="{{ route('article.show',$new) }}"> <a href="{{ getOneAdvertByCate(31,'url') }}">
<img src="{{ $new->get_one_cover() }}" /> <img src="{{ getOneAdvertByCate(31,'cover_path') }}">
<p class="ccsl">{{ $new->title }}</p> </a>
</div>
<!-- 新闻列表 -->
<div class="news">
<!-- tabs -->
<div class="news-item party">
<div class="tabs-title" id="newsTab">
<span class="tabs-item show">创新团队</span>
<span class="tabs-item">梯队人才</span>
<span class="tabs-item">专家智库</span>
<span class="tabs-item">项目推广</span>
<span class="tabs-item">成果专利</span>
<a class="mian-title-more" href="">更多<i class="fa fa-angle-right"></i></a>
</div>
<div class="tabs-content-wrapper" id="newsTabContent">
<!-- 创新团队 -->
<ul class="party-ul tabs-content active">
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>09</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">创新团队</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
</ul>
<!-- 梯队人才 -->
<ul class="party-ul tabs-content">
<li class="party-ul-li">
<a href="#">
<span class="party-time party-cover" style="background-image:url(lib/img/banner_02.jpg)">
</span>
<h3 class="party-title nowrap">梯队人才</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
</ul>
<!-- 专家智库 -->
<ul class="party-ul tabs-content">
<li class="party-ul-li">
<a href="#">
<span class="party-time party-cover" style="background-image:url(lib/img/banner_02.jpg)">
</span>
<h3 class="party-title nowrap">专家智库</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
</ul>
<!-- 项目推广 -->
<ul class="party-ul tabs-content">
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>02</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">项目推广</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
</ul>
<!-- 成果专利 -->
<ul class="party-ul tabs-content">
<li class="party-ul-li">
<a href="#">
<span class="party-time">
<h3>03</h3>
<p>2020-05</p>
</span>
<h3 class="party-title nowrap">成果专利</h3>
<p class="party-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a> </a>
</li> </li>
@endforeach
</ul> </ul>
</div> </div>
</div> </div>
<div class="clear"></div> <!-- 项目推广 -->
<div class="news-item spirit">
<div class="titbox"> <div class="mian-title">
{{-- <a href="{{ route('category.show',4) }}"> --}} <b>媒体报道</b>
<p class="ccsl">人才团队介绍</p> <span>/&nbsp;&nbsp;Project promotion</span>
{{-- </a> --}} <a class="mian-title-more" href="">更多<i class="fa fa-angle-right"></i></a>
</div> </div>
<div id="marquee1" class="marqueeleft"> <ul class="spiritual-ul">
<div style="width: 8000px;"> <li class="spiritual-ul-li">
<ul id="marquee1_1"> <a href="#">
@foreach ($rctd as $new) <h3 class="spiritual-title nowrap">省科学院大庆分院召开“学树典型表彰先进”全体党员大会</h3>
<li><a href="{{ route('article.show',$new) }}"><img src="{{ $new->get_one_cover() }}" style="height:128px;"></a> </li> <p class="spiritual-info nowrap-multi">新华社北京7月25日电
@endforeach 为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="spiritual-ul-li">
<a href="#">
<h3 class="spiritual-title nowrap">省科学院大庆分院召开“学树典型表彰先进”全体党员大会</h3>
<p class="spiritual-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="spiritual-ul-li">
<a href="#">
<h3 class="spiritual-title nowrap">省科学院大庆分院召开“学树典型表彰先进”全体党员大会</h3>
<p class="spiritual-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
<li class="spiritual-ul-li">
<a href="#">
<h3 class="spiritual-title nowrap">省科学院大庆分院召开“学树典型表彰先进”全体党员大会</h3>
<p class="spiritual-info nowrap-multi">新华社北京7月25日电
为引领推动我国印刷业高质量发展由国家新闻出版署主办的2019中国印刷业创新大会25日在京开幕。</p>
</a>
</li>
</ul> </ul>
<ul id="marquee1_2"></ul>
</div> </div>
</div> </div>
<script type="text/javascript"></script>
</div> </div>
<div class="clear"></div> <!-- end mian -->
<div class="linkbox">
<div class="linkL">
<p class="p1">友情链接</p>
<p class="p2">Links</p>
</div>
<div class="linkR">
@foreach ($links as $element)
<a href="{{ $element->url }}"> {{ $element->title }}</a>
@endforeach
</div>
</div>
@endsection @endsection
@section('script') @push('script')
<script type="text/javascript"> <script type="text/javascript">
//js无缝滚动代码 // swiperBanner
function marquee(i, direction) { var swiperBanner = new Swiper("#swiperBanner", {
var obj = document.getElementById("marquee" + i); autoplay: 5000,
console.log(obj); loop: true,
var obj1 = document.getElementById("marquee" + i + "_1"); slidesPerView: 'auto',
var obj2 = document.getElementById("marquee" + i + "_2"); pagination: ".swiper-pagination",
if (direction == "up") { paginationClickable: true,
if (obj2.offsetTop - obj.scrollTop <= 0) { autoplayDisableOnInteraction: false
obj.scrollTop -= (obj1.offsetHeight + 20); })
} else {
var tmp = obj.scrollTop;
obj.scrollTop++;
if (obj.scrollTop == tmp) {
obj.scrollTop = 1;
}
}
} else {
if (obj2.offsetWidth - obj.scrollLeft <= 0) {
obj.scrollLeft -= obj1.offsetWidth;
} else {
obj.scrollLeft++;
}
} // 新闻列表
$(function () {
$('#newsTab .tabs-item').hover(function () {
$(this).addClass("show").siblings().removeClass("show")
$("#newsTabContent .tabs-content").eq($(this).index()).addClass("active").siblings().removeClass("active")
})
});
} // 国内国际资讯
$(function () {
function marqueeStart(i, direction) { $('#information .tabs-item').hover(function () {
console.log(i); $(this).addClass("show").siblings().removeClass("show")
$("#informationContent .tabs-content").eq($(this).index()).addClass("active").siblings().removeClass("active")
var obj = document.getElementById("marquee" + i); })
var obj1 = document.getElementById("marquee" + i + "_1"); });
var obj2 = document.getElementById("marquee" + i + "_2");
obj2.innerHTML = obj1.innerHTML;
var marqueeVar = window.setInterval("marquee(" + i + ", '" + direction + "')", 20);
obj.onmouseover = function () {
window.clearInterval(marqueeVar);
}
obj.onmouseout = function () {
marqueeVar = window.setInterval("marquee(" + i + ", '" + direction + "')", 20);
}
}
marqueeStart(1, "left");
</script> </script>
@endsection @endpush

View File

@@ -1,52 +1,83 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta charset="utf-8">
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<title>{{ config('app.name', '') }}</title> <title>{{ config('app.name', '') }}</title>
<link rel="stylesheet" href="{{ asset('assets/index/css/style.css') }}?{{ time() }}" type="text/css"/> <meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="{{ asset('assets/index/js/jquery-1.8.2.min.js') }}"/></script> <link rel="icon" href="{{ asset('assets/index/img/favicon.ico') }}" mce_href="favicon.ico" type="image/x-icon">
<script type="text/javascript" src="{{ asset('assets/index/js/banner.js') }}"/></script> <link rel="stylesheet" type="text/css" href="{{ asset('assets/index/css/font-awesome.min.css') }}"/>
<link rel="stylesheet" type="text/css" href="{{ asset('assets/index/css/swiper.min.css') }}"/>
<link rel="stylesheet" type="text/css" href="{{ asset('assets/index/css/style.css') }}"/>
</head> </head>
<body> <body>
<!-- tool -->
<div class="clear"></div> <div class="tool">
<div class="logo"> <div class="container">
<a href="/"><img src="/assets/index/images/logo.jpg" /></a> <a href="#"><i class="fa fa-star"></i>加入收藏</a>
<a href="#"><i class="fa fa-globe"></i>院所网站</a>
</div> </div>
<div class="clear"></div> </div>
<div class="nav"> <!-- end tool -->
<div class="main"> <!-- header -->
<ul> <div class="container header">
<li @if (!isset($category)) class="on" @endif><a href="/">首页</a></li> <a href="/">
<img src="/assets/index/img/logo.png" class="header-logo">
</a>
<nav>
<a href="/" @if (!isset($parent)) class="show" @endif>网站首页</a>
@foreach ($all_categorys as $cate) @foreach ($all_categorys as $cate)
<li @if (isset($category) && $cate->id==$category->id) class="on" @endif > <a href="{{ route('category.show',$cate) }}" @if (isset($parent) && $cate->id==$parent->id) class="show" @endif>{{ $cate->title }}</a>
<a href="{{ route('category.show',$cate) }}">{{ $cate->title }}</a>
</li>
@endforeach @endforeach
</ul> </nav>
</div>
<!-- end header -->
<!-- 欢迎语 -->
<div class="hello">
<div class="container hello-text">
今天是 {{ now()->isoFormat('Y年m月d日 a h:mm:ss') }} {{ now()->isoFormat('dddd') }}
</div> </div>
</div> </div>
<!-- end 欢迎语 -->
@section('content') @section('content')
@show @show
<script src="{{ asset('assets/index/js/jquery.min.js') }}" type="text/javascript" charset="utf-8"></script>
<script src="{{ asset('assets/index/js/swiper.min.js') }}" type="text/javascript" charset="utf-8"></script>
<!-- 友情连接 -->
<div class="clear"></div> <div class="container href">
<div class="mian-title">
<b>友情连接</b>
<span>/&nbsp;&nbsp;Links</span>
</div>
<div class="href-content">
@if ($links->isNotEmpty())
@foreach ($links as $link)
<a href="{{ $link->url }}">{{ $link->title}}</a>
@endforeach
@endif
</div>
</div>
<!-- end 友情连接 -->
<!-- footer -->
<div class="footer"> <div class="footer">
<div class="main"> <p>黑龙江省科学院大庆分院 版权所有 (C)2012 All Right Reserved Power by DedeCms</p>
<div class="foot"> <p>
<div>黑龙江省科学院大庆分院 版权所有 <br> <span>地址:黑龙江省大庆市高新区博学大街45号</span>
黑ICP备1000001号<br> <span>备案号:黑ICP备1000001号</span>
地址大庆高新区博学大街45号 邮箱hkydqyb@126.com<br> </p>
电话086-459-8998866  传真086-459-8998866 邮编163319 <br> <p>
<span>邮箱hkydqyb@126.com</span>
<span>电话086-459-8998866</span>
<span>传真086-459-8998866</span>
<span>邮编163319</span>
</p>
<img src="/assets/index/img/blue.png">
</div> </div>
</div> <!-- end footer -->
</div>
</div> @stack('script')
@yield('script')
</body> </body>
</html> </html>

View File

@@ -1,6 +1,6 @@
@if ($paginator->hasPages()) @if ($paginator->hasPages())
<div class="pagebox"> <div class="pages">
{{-- Previous Page Link --}} {{-- Previous Page Link --}}
@if ($paginator->onFirstPage()) @if ($paginator->onFirstPage())
<a href="#" style="pointer-events: none;">上一页</a> <a href="#" style="pointer-events: none;">上一页</a>
@@ -14,7 +14,7 @@
@if (is_array($element)) @if (is_array($element))
@foreach ($element as $page => $url) @foreach ($element as $page => $url)
@if ($page == $paginator->currentPage()) @if ($page == $paginator->currentPage())
<a href="{{ $url }}" class="on">{{ $page }}</a> <a href="{{ $url }}" class="show">{{ $page }}</a>
@else @else
<a href="{{ $url }}">{{ $page }}</a> <a href="{{ $url }}">{{ $page }}</a>
@endif @endif
@@ -26,7 +26,7 @@
@if ($paginator->hasMorePages()) @if ($paginator->hasMorePages())
<a href="{{ $paginator->nextPageUrl() }}">下一页</a> <a href="{{ $paginator->nextPageUrl() }}">下一页</a>
@else @else
<a href="#" style="pointer-events: none;">下一页</a> <a href="#" style="pointer-events: none;" disabled="">下一页</a>
@endif @endif
</div> </div>
@endif @endif