233 lines
7.3 KiB
PHP
233 lines
7.3 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', '首页')
|
|
|
|
@section('content')
|
|
|
|
{{-- 顶部广告 --}}
|
|
@if ($adverts->isNotEmpty())
|
|
<div class="clear"></div>
|
|
<div class="banner">
|
|
<div class="b-img">
|
|
@foreach ($adverts as $advert)
|
|
<img src="{{ $advert->cover_path }}" width="100%"/>
|
|
@endforeach
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="b-list"> </div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="part4">
|
|
<div class="main">
|
|
<div class="part4box">
|
|
<div class="titbox">
|
|
<h2 class="ccsl">分院动态</h2>
|
|
<a href="{{ route('category.show',6) }}">更多>></a>
|
|
</div>
|
|
<div class="cons">
|
|
<div class="p4one">
|
|
<div class="p4oneL">
|
|
<a href="{{ route('article.show',$fydt->first()) }}"><img src="{{ $fydt->first()->get_one_cover() }}" /></a>
|
|
</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="clear"></div>
|
|
<div class="sub">{{ $fydt->first()->description }}</div>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
@foreach ($fydt as $new)
|
|
<li>
|
|
<p>></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="part4box fr">
|
|
<div class="titbox">
|
|
<h2 class="ccsl">科研动态</h2>
|
|
<a href="{{ route('category.show',9) }}">更多>></a>
|
|
</div>
|
|
<div class="cons">
|
|
<div class="p4one">
|
|
<div class="p4oneL">
|
|
<a href="{{ route('article.show',$kydt->first()) }}"><img src="{{ $kydt->first()->get_one_cover() }}" /></a>
|
|
</div>
|
|
<div class="p4oneR">
|
|
<a href="detail.html" class="ccsl">{{ $kydt->first()->title }}</a>
|
|
<span>{{ $kydt->first()->created_at->format('Y-m-d') }}</span>
|
|
<div class="clear"></div>
|
|
<div class="sub">{{ $kydt->first()->description }}</div>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
@foreach ($kydt as $new)
|
|
<li>
|
|
<p>></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>
|
|
</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>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
|
|
<div class="titbox">
|
|
{{-- <a href="{{ route('category.show',10) }}"> --}}
|
|
<p class="ccsl">科研成果</p>
|
|
{{-- </a> --}}
|
|
</div>
|
|
<ul>
|
|
@foreach ($kycg as $new)
|
|
<li>
|
|
<a href="{{ route('article.show',$new) }}">
|
|
<img src="{{ $new->get_one_cover() }}" />
|
|
<p class="ccsl">{{ $new->title }}</p>
|
|
</a>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
|
|
<div class="titbox">
|
|
{{-- <a href="{{ route('category.show',4) }}"> --}}
|
|
<p class="ccsl">人才团队介绍</p>
|
|
{{-- </a> --}}
|
|
</div>
|
|
<div id="marquee1" class="marqueeleft">
|
|
<div style="width: 8000px;">
|
|
<ul id="marquee1_1">
|
|
@foreach ($rctd as $new)
|
|
<li><a href="{{ route('article.show',$new) }}"><img src="{{ $new->get_one_cover() }}" style="height:128px;"></a> </li>
|
|
@endforeach
|
|
</ul>
|
|
<ul id="marquee1_2"></ul>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript"></script>
|
|
</div>
|
|
<div class="clear"></div>
|
|
|
|
|
|
<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
|
|
|
|
@section('script')
|
|
<script type="text/javascript">
|
|
//js无缝滚动代码
|
|
function marquee(i, direction) {
|
|
var obj = document.getElementById("marquee" + i);
|
|
console.log(obj);
|
|
var obj1 = document.getElementById("marquee" + i + "_1");
|
|
var obj2 = document.getElementById("marquee" + i + "_2");
|
|
if (direction == "up") {
|
|
if (obj2.offsetTop - obj.scrollTop <= 0) {
|
|
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 marqueeStart(i, direction) {
|
|
console.log(i);
|
|
|
|
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>
|
|
@endsection
|