@extends('storefront.layout', ['title' => (config('app.name', 'Tstore')) . ' · ' . $package->name]) @php $typeLabel = $package->type === 'plugin' ? '插件' : '主题'; $listRoute = $package->type === 'plugin' ? 'storefront.plugins' : 'storefront.themes'; $latestVersion = collect($detail['versions'])->firstWhere('is_latest', true) ?: collect($detail['versions'])->firstWhere('is_stable', true) ?: ($detail['versions'][0] ?? null); @endphp @section('hero')
{{ $typeLabel }}
@if($detail['icon_url']) {{ $detail['name'] }} @else
{{ $package->type === 'plugin' ? 'P' : 'T' }}
@endif

{{ $detail['name'] }}

{{ $detail['summary'] ?: '这个' . $typeLabel . '当前还没有摘要,详情页会继续保留版本、兼容性和截图信息。' }}

@foreach($package->categories as $category) {{ $category->name }} @endforeach @if($detail['is_featured']) 推荐 @endif {{ $detail['author'] ?: '未知作者' }}
返回{{ $typeLabel }}目录 @if($detail['homepage']) 访问主页 @endif
{{ strtoupper($detail['type']) }}扩展类型
{{ $detail['download_count'] }}累计下载
{{ count($detail['versions']) }}版本记录
{{ $latestVersion['version'] ?? '-' }}当前主版本
@endsection @section('content') @php $screenshots = $detail['screenshots']; $featuredScreenshot = $screenshots[0] ?? null; $secondaryScreenshots = array_slice($screenshots, 1); @endphp
Preview

预览截图

@if($featuredScreenshot)
{{ $featuredScreenshot['caption'] ?: $detail['name'] }}
{{ $featuredScreenshot['caption'] ?: $detail['name'] . ' 主预览图' }} 第一张截图作为主视觉展示,后台可继续追加更多截图并调整排序。
@if(count($secondaryScreenshots))
@foreach($secondaryScreenshots as $shot)
{{ $shot['caption'] ?: $detail['name'] }}
{{ $shot['caption'] ?: $detail['name'] . ' 截图' }}
@endforeach
@endif
@else
当前还没有预览截图。
@endif
@endsection