调整导航
This commit is contained in:
@@ -56,9 +56,6 @@ class IndexController extends AdminController
|
||||
$form->text('working', '工龄');
|
||||
$form->text('job', '岗位');
|
||||
})
|
||||
->when('in', [56], function (Form $form) {
|
||||
$form->text('url', '跳转地址');
|
||||
})
|
||||
->rules('required|min:1', [
|
||||
'required' => '必须选择所属分类',
|
||||
'min' => '必须选择所属分类',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Advert;
|
||||
use App\Models\Category;
|
||||
use App\Models\Article;
|
||||
use App\Models\Patent;
|
||||
@@ -97,3 +98,14 @@ function getPatent($take, $type = '')
|
||||
->get();
|
||||
|
||||
}
|
||||
|
||||
//获取一个图片
|
||||
function getOneAdvert($category_id, $value = '')
|
||||
{
|
||||
$info = Advert::where('category_id', $category_id)->first();
|
||||
if ($value) {
|
||||
return $info->{$value};
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
55
resources/views/category/person.blade.php
Normal file
55
resources/views/category/person.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', $category->title)
|
||||
|
||||
@section('content')
|
||||
<!-- content -->
|
||||
<div class="container mian">
|
||||
<!-- content-nav -->
|
||||
<nav class="mian-nav">
|
||||
@if($parent->cover_path)
|
||||
<img class="mian-nav-cover" src="{{ $parent->cover_path }}" alt="导航封面">
|
||||
@endif
|
||||
<ul class="mian-nav-ul">
|
||||
@if ($parent->children->isNotEmpty())
|
||||
@foreach ($parent->children as $children)
|
||||
<li class="show">
|
||||
<a href="{{ $children->link }}">{{ $children->title }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- content-content -->
|
||||
<div class="mian-content">
|
||||
<div class="mian-content-header">
|
||||
<a href="#">首页</a>
|
||||
<i class="fa fa-caret-right"></i>
|
||||
<a href="{{ $category->link }}">{{ $category->title }}</a>
|
||||
</div>
|
||||
<!-- 文章列表 -->
|
||||
<ul class="results-news-ul">
|
||||
@if ($articles->isNotEmpty())
|
||||
@foreach ($articles as $article)
|
||||
<li>
|
||||
<a class="nowrap" href="{{ $article->link }}">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
{{ $article->title }}
|
||||
<span>{{ $article->created_at->format('Y-m-d') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
<!-- 分页 -->
|
||||
<div class="pages">
|
||||
@if ($articles->isNotEmpty())
|
||||
{{ $articles->links('layouts.pagination') }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end content -->
|
||||
@endsection
|
||||
@@ -81,7 +81,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<!-- 历史沿革 -->
|
||||
<div class="sub-title">
|
||||
<div class="sub-title" id="lsyg">
|
||||
<b><i class="fa fa-clock-o"></i>{{ getOneCategory(50,'title') }}</b>
|
||||
</div>
|
||||
<div class="org-history">
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>@section('title'){{ config('app.name', '') }}@show</title>
|
||||
<meta content="黑龙江省科学院智能制造研究所" name="Keywords">
|
||||
<meta content="黑龙江省科学院智能制造研究所" name="description">
|
||||
<link rel="icon" href="{{ asset('assets/index/img/favicon.ico') }}" mce_href="favicon.ico" type="image/x-icon">
|
||||
<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') }}"/>
|
||||
@@ -73,10 +75,10 @@
|
||||
@endif
|
||||
<!-- footer -->
|
||||
<footer class="footer">
|
||||
<p>版权所有黑龙江省科学院 黑ICP备2020005648号-1</p>
|
||||
<p>版权所有:黑龙江省科学院智能制造研究所 <a target="_blank" href="https://beian.miit.gov.cn/" style="color: white">黑ICP备2020005648号-1</a></p>
|
||||
<p>地址:黑龙江省哈尔滨市南岗区汉水路165号 邮政编码:150090</p>
|
||||
<p>电话:86-451-82305698 eMail:webmaster@haai.com.cn</p>
|
||||
<p>© CopyRight 2002-2012,The Instiute of Automation heilongjiang academy of sciences All rights reserved.</p>
|
||||
<p>电话:0451-82300045 eMail:webmaster@haai.com.cn</p>
|
||||
<p>© CopyRight 2020-2030,Heilongjiang Academy of Sciences Intelligent Manufacturing Research Institute.</p>
|
||||
<img src="{{ asset('assets/index/img/blue.png') }}" alt="事业单位">
|
||||
</footer>
|
||||
<!-- end footer -->
|
||||
|
||||
@@ -216,27 +216,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{-- 人才队伍--}}
|
||||
<li class="nav-ul-li @if (isset($parent) && $parent->id==config('haai.category.rcdw')) show @endif">
|
||||
<a href="{{ getOneCategory(config('haai.category.rcdw'),'link') }}">{{ getOneCategory(config('haai.category.rcdw'),'title') }}</a>
|
||||
<div class="nav-layer hide">
|
||||
<div class="nav-layer-item nav-talent-left">
|
||||
<!-- 高级职称专家 -->
|
||||
<div class="nav-layer-title">
|
||||
<span>{{ getOneCategory(29,'title') }}</span>
|
||||
{{-- <div class="nav-layer-title">--}}
|
||||
{{-- <span>{{ getOneCategory(29,'title') }}</span>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- <ul class="nav-talent-ul">--}}
|
||||
{{-- @if (getArticlesBYCate(29,14)->isNotEmpty())--}}
|
||||
{{-- @foreach (getArticlesBYCate(29,14) as $article)--}}
|
||||
{{-- <li>--}}
|
||||
{{-- <a href="{{ $article->link }}">--}}
|
||||
{{-- <span class="nav-talent-cover" style="background-image: url({{ $article->cover_path }});"></span>--}}
|
||||
{{-- <h3 class="nowrap nav-talent-name">{{ $article->title }}</h3>--}}
|
||||
{{-- <p class="nowrap nav-talent-job">{{ $article->job }}</p>--}}
|
||||
{{-- </a>--}}
|
||||
{{-- </li>--}}
|
||||
{{-- @endforeach--}}
|
||||
{{-- @endif--}}
|
||||
{{-- </ul>--}}
|
||||
<div style="text-align:center">
|
||||
<img src="{{ getOneAdvert(61,'cover_path') }}" style="width:100%;margin-top:17px" alt="">
|
||||
</div>
|
||||
<ul class="nav-talent-ul">
|
||||
@if (getArticlesBYCate(29,14)->isNotEmpty())
|
||||
@foreach (getArticlesBYCate(29,14) as $article)
|
||||
<li>
|
||||
<a href="{{ $article->link }}">
|
||||
<span class="nav-talent-cover" style="background-image: url({{ $article->cover_path }});"></span>
|
||||
<h3 class="nowrap nav-talent-name">{{ $article->title }}</h3>
|
||||
<p class="nowrap nav-talent-job">{{ $article->job }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-layer-item nav-talent-right">
|
||||
<!-- 省级领军人才梯队 -->
|
||||
|
||||
Reference in New Issue
Block a user