init
This commit is contained in:
51
resources/views/public/news/show.blade.php
Normal file
51
resources/views/public/news/show.blade.php
Normal file
@@ -0,0 +1,51 @@
|
||||
@extends('layouts.site')
|
||||
|
||||
@section('page_class', 'page-news')
|
||||
@section('title', $item->seo_title ?: $item->title.' - AI资讯')
|
||||
@section('meta_description', $item->seo_description ?: $item->excerpt)
|
||||
@section('canonical', $item->canonical_url ?: route('news.show', $item->slug))
|
||||
|
||||
@section('head')
|
||||
<script type="application/ld+json">
|
||||
{!! json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'Article',
|
||||
'headline' => $item->title,
|
||||
'description' => $item->excerpt,
|
||||
'datePublished' => $item->published_at?->toIso8601String(),
|
||||
'dateModified' => $item->updated_at?->toIso8601String(),
|
||||
'mainEntityOfPage' => route('news.show', $item->slug),
|
||||
], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT) !!}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<section class="module-hero">
|
||||
<div class="position-relative">
|
||||
<span class="hero-chip mb-3"><i class="bi bi-newspaper"></i> AI 资讯</span>
|
||||
<h1 class="h2 fw-bold mb-2">{{ $item->h1 ?: $item->title }}</h1>
|
||||
<p class="hero-subtext">发布时间:{{ $item->published_at?->format('Y-m-d H:i') }} · 来源可信度:{{ $item->source_level?->label() ?? '未知' }}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if($showRiskNotice)
|
||||
<div class="alert alert-warning" role="alert">免责声明:高风险领域内容仅供学习参考,不构成专业建议。</div>
|
||||
@endif
|
||||
|
||||
<article class="surface-card p-3 p-lg-4 mb-3">
|
||||
<p class="lead">{{ $item->excerpt }}</p>
|
||||
<div class="md-content">{!! $bodyHtml !!}</div>
|
||||
</article>
|
||||
|
||||
<div class="surface-card p-3 p-lg-4">
|
||||
<div class="d-flex flex-wrap gap-2 align-items-center">
|
||||
<span class="chip"><i class="bi bi-link-45deg"></i>{{ $item->source_name ?: '未提供来源名称' }}</span>
|
||||
@if($item->source_url)
|
||||
<a class="btn btn-sm btn-outline-primary" href="{{ $item->source_url }}" target="_blank" rel="nofollow noopener">查看原文</a>
|
||||
@endif
|
||||
@if($item->is_stale)
|
||||
<span class="chip"><i class="bi bi-exclamation-triangle"></i>该资讯可能已过期</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user