Files
cloud-chip.cn/resources/views/news/index.blade.php
T
2026-08-08 18:27:38 +08:00

44 lines
2.3 KiB
PHP

@extends('layouts.app')
@section('title', '新闻动态 - 深圳市云创芯电子有限公司')
@section('content')
<section class="hero-aurora">
<div class="hero-grid"></div>
<div class="relative max-w-8xl mx-auto px-4 sm:px-6 lg:px-8 py-16 lg:py-24">
<p class="eyebrow">NEWS</p>
<h1 class="mt-3 text-3xl font-bold tracking-tight text-fg sm:text-4xl lg:text-5xl gradient-text">新闻动态</h1>
<p class="mt-4 max-w-2xl text-base text-muted">行业资讯、公司动态与展会活动,第一时间了解深圳市云创芯电子有限公司与 TypeC 快速充电生态。</p>
</div>
</section>
<section class="px-4 sm:px-6 lg:px-8 py-12 lg:py-16">
<div class="max-w-8xl mx-auto">
<div class="filter-bar mb-8">
<a href="{{ url('/news') }}" class="btn btn-sm @if(!$category) btn-primary @endif">全部</a>
@foreach (App\Models\News::CATEGORIES as $k => $v)
<a href="{{ url('/news?category=' . $k) }}" class="btn btn-sm @if($category === $k) btn-primary @endif">{{ $v }}</a>
@endforeach
</div>
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
@forelse ($news as $n)
<a href="{{ route('news.show', $n->slug) }}" class="group glow-card rounded-xl border border-line bg-surface p-6 transition">
<div class="flex items-center justify-between">
<span class="badge badge-primary">{{ $n->categoryLabel() }}</span>
<span class="text-xs text-muted">{{ $n->published_at?->format('Y-m-d') }}</span>
</div>
<h3 class="mt-4 text-lg font-semibold text-fg transition group-hover:text-primary">{{ $n->title }}</h3>
<p class="mt-2 line-clamp-3 text-sm text-muted">{{ $n->summary }}</p>
<span class="mt-4 inline-flex items-center gap-1 text-sm font-medium text-primary">阅读全文 <x-icon name="arrow" :size="16" /></span>
</a>
@empty
<p class="text-sm text-muted">暂无新闻。</p>
@endforelse
</div>
<div class="mt-8">{{ $news->links('pagination::bootstrap-5') }}</div>
</div>
</section>
@endsection