调整
This commit is contained in:
@@ -21,6 +21,13 @@ class PictureController extends AdminController
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->like('title', '文章标题');
|
||||
});
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->like('category.id', '所属分类')
|
||||
->select(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)
|
||||
->whereIn('type', [Category::TYPE_PICTURE]);
|
||||
}, '所有分类'));
|
||||
});
|
||||
|
||||
$filter->disableIdFilter();
|
||||
});
|
||||
|
||||
@@ -17,7 +17,12 @@ class IndexController extends Controller
|
||||
public function index()
|
||||
{
|
||||
//随手拍
|
||||
$ssp = ArticlePicture::orderBy('sort', 'desc')->where('category_id', 6)->take(3)->get();
|
||||
$ssp = ArticlePicture::latest()
|
||||
->where('category_id', 6)
|
||||
->where('pictures', '<>', '[]')
|
||||
->take(4)
|
||||
->get();
|
||||
|
||||
//最新资讯
|
||||
$all_articles = Article::latest()
|
||||
->whereNotIn('category_id', [20, 21, 22])
|
||||
|
||||
@@ -230,8 +230,8 @@ ul.listul li .newsr .more{color:#ff6600;display: inline-block;margin-top: 20px;}
|
||||
.idxShoot-title-name{flex: 1; display: flex;}
|
||||
.idxShoot-title a {color: #999999; font-size: 15px;}
|
||||
|
||||
.idxShoot-swiper{ position: relative; margin-right: 10px;}
|
||||
.gallery-top {padding-top: 86%;width: 100%;}
|
||||
.idxShoot-swiper{ position: relative; margin-right: 10px; width: 590px;}
|
||||
.gallery-top {padding-top: 86%;width: 590px;}
|
||||
.gallery-top .swiper-wrapper{position: absolute; top: 0; left: 0; height: calc(75% - 10px); margin-bottom: 20px;}
|
||||
.gallery-top .swiper-slide{background-size: cover}
|
||||
.gallery-thumbs{position: absolute; width: 100%; height: 25%; bottom: 0; left: 0;}
|
||||
@@ -239,8 +239,9 @@ ul.listul li .newsr .more{color:#ff6600;display: inline-block;margin-top: 20px;}
|
||||
.gallery-thumbs .swiper-slide-active {border: 3px solid #b9202f; height: calc(100% - 6px)}
|
||||
|
||||
|
||||
|
||||
.idxNews-ul{box-shadow: 0 0 10px rgba(0,0,0,.2); overflow: hidden; margin-left: 10px; padding: 15px 15px 0; box-sizing: border-box;}
|
||||
.idxNews-ul li{height: 42px; transition: .5s; border-bottom: 1px solid #ececec;margin-bottom: 18px; overflow: hidden;}
|
||||
.idxNews-ul li{transition: .5s; border-bottom: 1px solid #ececec;margin-bottom: 18px; overflow: hidden;}
|
||||
.idxNews-ul li:last-child {margin-bottom: 0; border: none;}
|
||||
.idxNews-ul li:first-child .idxNews-ul-title::after { background-image: url(../images/idx/idxNew_img_active.png); }
|
||||
.idxNews-ul li:first-child { height: 115px }
|
||||
@@ -274,7 +275,7 @@ ul.listul li .newsr .more{color:#ff6600;display: inline-block;margin-top: 20px;}
|
||||
display: block;}
|
||||
.idxHealthUl>li:nth-child(2) .idxHealthUl-img {bottom: 0; top: auto;}
|
||||
.idxHealthUl>li:nth-child(2) .idxHealthUl-text {top: 0;}
|
||||
.idxHealthUl>li:nth-child(2) .idxHealthUl-title {margin: 0 0 10px;}
|
||||
/* .idxHealthUl>li:nth-child(2) .idxHealthUl-title {margin: 0 0 10px;} */
|
||||
|
||||
.idxPoster{background-size: cover; background-repeat: no-repeat; background-position: center; width: 100%; height: 200px;}
|
||||
.recomdUl{display: flex; margin: 0 -5px;}
|
||||
|
||||
BIN
public/assets/index/images/idxIcon_brief.jpg
Normal file
BIN
public/assets/index/images/idxIcon_brief.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 308 KiB |
14
public/assets/index/js/swiper-bundle.min.js
vendored
Normal file
14
public/assets/index/js/swiper-bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -2,6 +2,64 @@
|
||||
|
||||
@section('title', '首页')
|
||||
|
||||
@section('css')
|
||||
<style>
|
||||
.gallery-thumbs .swiper-slide {
|
||||
border: 3px solid #fff;
|
||||
height: calc(100% - 6px);
|
||||
}
|
||||
|
||||
.gallery-thumbs .swiper-slide-thumb-active {
|
||||
border: 3px solid #b9202f;
|
||||
height: calc(100% - 6px);
|
||||
}
|
||||
|
||||
.idxShoot {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.idxSurveyCont-right::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.idxNews-ul-title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.idxSurveyContImg {
|
||||
width: 100px;
|
||||
height: 80px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.idxSurveyCont-left {
|
||||
width: calc(100% - 120px);
|
||||
margin-right: 0;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
|
||||
.idxNews-ul-title a {
|
||||
width: 70%
|
||||
}
|
||||
|
||||
.idxNews-ul li:first-child p {
|
||||
height: 60px;
|
||||
white-space: normal;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2
|
||||
}
|
||||
|
||||
.idxHealthUl-text a {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
</style>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<!-- 随手拍+最新资讯 -->
|
||||
@@ -18,7 +76,8 @@
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($ssp as $element)
|
||||
@foreach ($element->pictures as $picture)
|
||||
<div class="swiper-slide" style="background-image:url({{ Storage::disk('public')->url($picture ) }})"></div>
|
||||
<div class="swiper-slide"
|
||||
style="background-image:url({{ Storage::disk('public')->url($picture ) }})"></div>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -28,7 +87,8 @@
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($ssp as $element)
|
||||
@foreach ($element->pictures as $picture)
|
||||
<div class="swiper-slide" style="background-image:url({{ Storage::disk('public')->url($picture ) }})"></div>
|
||||
<div class="swiper-slide"
|
||||
style="background-image:url({{ Storage::disk('public')->url($picture ) }})"></div>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -46,10 +106,11 @@
|
||||
<li>
|
||||
<div class="idxNews-ul-title">
|
||||
<a href="{{ route('article.show', $article) }}">
|
||||
<p class="ce-nowrap-multi" style="margin-right:10px">{{ $article->title }}</p></a>
|
||||
<p class="ce-nowrap"
|
||||
style="margin-right:10px;height: 43px;">{{ $article->title }}</p></a>
|
||||
<span>{{ $article->created_at }}</span>
|
||||
</div>
|
||||
<div class="ce-nowrap-multi idxNews-ul-text">
|
||||
<div class="ce-nowrap idxNews-ul-text">
|
||||
{{ $article->description }}
|
||||
</div>
|
||||
</li>
|
||||
@@ -69,15 +130,19 @@
|
||||
<a href="@if ($danwei) {{ route('article.show', $danwei) }} @endif">更多 ></a>
|
||||
</div>
|
||||
<div class="idxSurveyCont">
|
||||
<div class="idxSurveyCont-left">
|
||||
@if ($danwei) {{ $danwei->description }} @endif
|
||||
{{-- <img class="idxSurveyContImg" src=" @if ($danwei) {{ $danwei->cover_path }} @endif">--}}
|
||||
{{-- <div class="idxSurveyCont-left">--}}
|
||||
{{-- @if ($danwei) {{ $danwei->description }} @endif--}}
|
||||
|
||||
</div>
|
||||
<div class="idxSurveyCont-right">
|
||||
<div class="idxSurveyCont-right-img">
|
||||
<img src=" @if ($danwei) {{ $danwei->cover_path }} @endif">
|
||||
</div>
|
||||
</div>
|
||||
{{-- </div>--}}
|
||||
{{-- <div class="idxSurveyCont-right">--}}
|
||||
{{-- <div class="idxSurveyCont-right-img">--}}
|
||||
|
||||
{{-- </div>--}}
|
||||
{{-- </div> --}}
|
||||
@if($danwei)
|
||||
<img style="width: 100%" src="{{ $danwei->cover_path }} ">
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,13 +155,13 @@
|
||||
</div>
|
||||
<ul class="idxHealthUl">
|
||||
@foreach ($ysbj as $article)
|
||||
<li>
|
||||
<li style="box-shadow: 0 0 20px rgba(0,0,0,.2);">
|
||||
<div class="ce-img idxHealthUl-img">
|
||||
<span style="background-image: url( {{ $article->cover_path }} );"></span>
|
||||
</div>
|
||||
<div class="idxHealthUl-text">
|
||||
<div class="idxHealthUl-text" style="text-align: center; width: 100%;">
|
||||
<div class="idxHealthUl-title">{{ $article->title }}</div>
|
||||
<div class="idxHealthUl-tips">
|
||||
<div class="idxHealthUl-tips" style="text-align: center;margin: 0;">
|
||||
{{ $article->description }}
|
||||
</div>
|
||||
<a href="{{ route('article.show', $article) }}">
|
||||
@@ -134,11 +199,11 @@
|
||||
@if ($dcyfx->isNotEmpty())
|
||||
|
||||
<div class="recomdUl-top">
|
||||
<div class="ce-img recomdUl-top-img">
|
||||
<div class="ce-img recomdUl-top-img" style="height: 90px;">
|
||||
<span style="background-image: url({{ $dcyfx->first()->cover_path }});"></span>
|
||||
</div>
|
||||
<div class="recomdUl-top-text">
|
||||
<p class="ce-nowrap">
|
||||
<p class="ce-nowrap-multi">
|
||||
<a href="{{ route('article.show', $dcyfx->first()) }}"> {{ $dcyfx->first()->title }}</a>
|
||||
</p>
|
||||
<span class="ce-nowrap-multi">{{ $dcyfx->first()->description }}</span>
|
||||
@@ -147,7 +212,7 @@
|
||||
<ul class="recomdUl-list">
|
||||
@foreach ($dcyfx as $article)
|
||||
@if ($loop->iteration>1)
|
||||
<li class="ce-nowrap">
|
||||
<li class="ce-nowrap-multi">
|
||||
<a href="{{ route('article.show', $article) }}">
|
||||
{{ $article->title }}
|
||||
</a>
|
||||
@@ -168,11 +233,11 @@
|
||||
@if ($yyjcyj->isNotEmpty())
|
||||
|
||||
<div class="recomdUl-top">
|
||||
<div class="ce-img recomdUl-top-img">
|
||||
<div class="ce-img recomdUl-top-img" style="height: 90px;">
|
||||
<span style="background-image: url({{ $yyjcyj->first()->cover_path }});"></span>
|
||||
</div>
|
||||
<div class="recomdUl-top-text">
|
||||
<p class="ce-nowrap">
|
||||
<p class="ce-nowrap-multi">
|
||||
<a href="{{ route('article.show', $yyjcyj->first()) }}"> {{ $yyjcyj->first()->title }}</a>
|
||||
</p>
|
||||
<span class="ce-nowrap-multi">{{ $yyjcyj->first()->description }}</span>
|
||||
@@ -181,7 +246,7 @@
|
||||
<ul class="recomdUl-list">
|
||||
@foreach ($yyjcyj as $article)
|
||||
@if ($loop->iteration>1)
|
||||
<li class="ce-nowrap">
|
||||
<li class="ce-nowrap-multi">
|
||||
<a href="{{ route('article.show', $article) }}">
|
||||
{{ $article->title }}
|
||||
</a>
|
||||
@@ -203,11 +268,11 @@
|
||||
@if ($jsyt->isNotEmpty())
|
||||
|
||||
<div class="recomdUl-top">
|
||||
<div class="ce-img recomdUl-top-img">
|
||||
<div class="ce-img recomdUl-top-img" style="height: 90px;">
|
||||
<span style="background-image: url({{ $jsyt->first()->cover_path }});"></span>
|
||||
</div>
|
||||
<div class="recomdUl-top-text">
|
||||
<p class="ce-nowrap">
|
||||
<p class="ce-nowrap-multi">
|
||||
<a href="{{ route('article.show', $jsyt->first()) }}"> {{ $jsyt->first()->title }}</a>
|
||||
</p>
|
||||
<span class="ce-nowrap-multi">{{ $jsyt->first()->description }}</span>
|
||||
@@ -216,7 +281,7 @@
|
||||
<ul class="recomdUl-list">
|
||||
@foreach ($jsyt as $article)
|
||||
@if ($loop->iteration>1)
|
||||
<li class="ce-nowrap">
|
||||
<li class="ce-nowrap-multi">
|
||||
<a href="{{ route('article.show', $article) }}">
|
||||
{{ $article->title }}
|
||||
</a>
|
||||
@@ -285,7 +350,8 @@
|
||||
</div>
|
||||
<div class="idxWeekly-ul">
|
||||
@foreach ($qikan_advert as $advert)
|
||||
<div class="idxWeekly-back" style="background-image: url({{ $advert->one_picture_path }});"></div>
|
||||
<div class="idxWeekly-back"
|
||||
style="background-image: url({{ $advert->one_picture_path }});"></div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@@ -296,20 +362,42 @@
|
||||
|
||||
|
||||
@push('script')
|
||||
<script type="text/javascript" src="{{ asset('assets/index/js/swiper-bundle.min.js') }}"></script>
|
||||
<script>
|
||||
var galleryTop = new Swiper('.gallery-top', {
|
||||
spaceBetween: 10,
|
||||
loop: true
|
||||
});
|
||||
var galleryThumbs = new Swiper('.gallery-thumbs', {
|
||||
spaceBetween: 10,
|
||||
slidesPerView: 3,
|
||||
touchRatio: 0.2,
|
||||
loop: true,
|
||||
slideToClickedSlide: true
|
||||
freeMode: true,
|
||||
loopedSlides: 3, //looped slides should be the same
|
||||
watchSlidesVisibility: true,
|
||||
watchSlidesProgress: true,
|
||||
});
|
||||
galleryTop.params.control = galleryThumbs;
|
||||
galleryThumbs.params.control = galleryTop;
|
||||
var galleryTop = new Swiper('.gallery-top', {
|
||||
spaceBetween: 10,
|
||||
loop: true,
|
||||
loopedSlides: 3, //looped slides should be the same
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
thumbs: {
|
||||
swiper: galleryThumbs,
|
||||
},
|
||||
});
|
||||
// var galleryTop = new Swiper('.gallery-top', {
|
||||
// spaceBetween: 10,
|
||||
// loop: true
|
||||
// });
|
||||
// var galleryThumbs = new Swiper('.gallery-thumbs', {
|
||||
// spaceBetween: 10,
|
||||
// slidesPerView: 3,
|
||||
// touchRatio: 0.3,
|
||||
// loop: true,
|
||||
// slideToClickedSlide: true
|
||||
// });
|
||||
// galleryTop.params.control = galleryThumbs;
|
||||
// galleryThumbs.params.control = galleryTop;
|
||||
|
||||
|
||||
// 期刊
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
<span>编委会</span>
|
||||
<ul class="idxFooter-ul">
|
||||
<li>
|
||||
主 任:
|
||||
主 任:
|
||||
@if($manage_users->isNotEmpty()){{ $manage_users->first()->title }} @endif
|
||||
</li>
|
||||
<li>
|
||||
副主任:
|
||||
副 主 任 :
|
||||
@if($manage_users->isNotEmpty())
|
||||
@foreach ($manage_users as $users)
|
||||
@if ($loop->iteration>1)
|
||||
@@ -99,6 +99,14 @@
|
||||
@endforeach
|
||||
@endif
|
||||
</li>
|
||||
<li>
|
||||
主 编:
|
||||
@if($manage_users->isNotEmpty()){{ $manage_users->first()->title }} @endif
|
||||
</li>
|
||||
<li>
|
||||
执行主编:
|
||||
曹彦
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="idxFooter-name">
|
||||
|
||||
Reference in New Issue
Block a user