初始化

This commit is contained in:
2026-08-08 18:27:38 +08:00
parent efc150c937
commit 060eb79c09
336 changed files with 24613 additions and 15 deletions
+43
View File
@@ -0,0 +1,43 @@
@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
+35
View File
@@ -0,0 +1,35 @@
@extends('layouts.app')
@php $siteName = App\Models\Setting::get('site_name', '深圳市云创芯电子有限公司'); @endphp
@section('title', $news->seoTitle() . ' - ' . $siteName)
@section('description', $news->seoDescription())
@section('content')
<section class="px-4 py-12 sm:px-6 lg:px-8 lg:py-16">
<div class="mx-auto max-w-3xl">
<nav class="mb-6 flex items-center gap-1.5 text-sm text-muted">
<a href="{{ url('/') }}" class="hover:text-primary">首页</a><span>/</span>
<a href="{{ route('news.index') }}" class="hover:text-primary">新闻动态</a><span>/</span>
<span class="text-fg">{{ $news->title }}</span>
</nav>
<div class="flex items-center gap-3">
<span class="badge badge-primary">{{ $news->categoryLabel() }}</span>
<span class="text-sm text-muted">{{ $news->published_at?->format('Y-m-d') }}</span>
</div>
<h1 class="mt-3 text-2xl font-bold tracking-tight text-fg sm:text-3xl">{{ $news->title }}</h1>
@if ($news->summary)<p class="lead mt-4 text-base text-muted">{{ $news->summary }}</p>@endif
@if ($news->body)
<div class="prose mt-6 text-fg">
@if (preg_match('/<[a-z][a-z0-9]*[\s>]/i', $news->body))
{!! $news->body !!}
@else
{!! nl2br(e($news->body)) !!}
@endif
</div>
@endif
<div class="mt-6">
<a href="{{ route('news.index') }}" class="inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:text-primary-hover"><x-icon name="arrow" :size="16" class="rotate-180" /> 返回新闻列表</a>
</div>
</div>
</section>
@endsection