This commit is contained in:
cjd
2026-02-05 22:22:10 +08:00
parent fef9fe0c31
commit bf3a2e6971
273 changed files with 30605 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<footer class="footer">
<div class="footer-inner">
<span>© {{ date('Y') }} {{ $siteTitle }}</span>
@if($siteFooter)
<span class="footer-text">{{ $siteFooter }}</span>
@endif
@if($icpNumber)
<span class="footer-text">{{ $icpNumber }}</span>
@endif
@if(!empty($socialLinks))
<span class="footer-links">
@foreach($socialLinks as $link)
<a href="{{ $link['url'] }}" target="_blank" rel="noopener">{{ $link['name'] }}</a>
@endforeach
</span>
@endif
</div>
</footer>

View File

@@ -0,0 +1,22 @@
<header class="topbar">
<div class="brand">
<a href="{{ route('home') }}" class="brand-link">
@if($siteLogo)
<img src="{{ $siteLogo }}" alt="{{ $siteTitle }}" class="brand-logo">
@else
<span class="brand-text">{{ $siteTitle }}</span>
@endif
</a>
</div>
<nav class="topnav">
<a href="{{ route('home') }}">首页</a>
<a href="{{ route('categories.index') }}">分类</a>
<a href="{{ route('articles.index') }}">文章</a>
<a href="{{ route('about') }}">关于</a>
</nav>
<div class="topbar-actions">
<button type="button" class="theme-toggle" id="theme-toggle" aria-label="切换主题">
<span class="theme-icon"></span>
</button>
</div>
</header>

View File

@@ -0,0 +1,31 @@
@if ($paginator->hasPages())
<nav class="pagination">
@if ($paginator->onFirstPage())
<span class="page disabled">上一页</span>
@else
<a class="page" href="{{ $paginator->previousPageUrl() }}">上一页</a>
@endif
@foreach ($elements as $element)
@if (is_string($element))
<span class="page disabled">{{ $element }}</span>
@endif
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<span class="page active">{{ $page }}</span>
@else
<a class="page" href="{{ $url }}">{{ $page }}</a>
@endif
@endforeach
@endif
@endforeach
@if ($paginator->hasMorePages())
<a class="page" href="{{ $paginator->nextPageUrl() }}">下一页</a>
@else
<span class="page disabled">下一页</span>
@endif
</nav>
@endif

View File

@@ -0,0 +1,22 @@
@php
use Illuminate\Support\Facades\Storage;
@endphp
<div class="product-card">
<a href="{{ route('products.show', $product->slug) }}" class="product-card-link">
<div class="product-card-media">
@if($product->cover)
<img src="{{ Storage::url($product->cover) }}" alt="{{ $product->name }}">
@else
<div class="product-card-placeholder">{{ mb_substr($product->name, 0, 2) }}</div>
@endif
@if(\App\Models\SiteSetting::value('show_sponsor_label', '1') === '1' && $product->is_sponsored)
<span class="sponsor-badge">推广</span>
@endif
</div>
<div class="product-card-body">
<div class="product-card-title">{{ $product->name }}</div>
<div class="product-card-summary">{{ $product->summary }}</div>
</div>
</a>
</div>

View File

@@ -0,0 +1,28 @@
<div class="sidebar-block">
<div class="sidebar-title">产品分类</div>
<div class="category-list">
@foreach($sidebarCategories as $category)
<details class="category-group" @if($loop->first) open @endif>
<summary>
<span>
@if($category->icon)
<span class="icon">{{ $category->icon }}</span>
@endif
{{ $category->name }}
</span>
<span class="count">{{ $category->products_count }}</span>
</summary>
<ul>
@foreach($category->children as $child)
<li>
<a href="{{ route('categories.show', $child->slug) }}">
{{ $child->name }}
<span class="count">{{ $child->products_count }}</span>
</a>
</li>
@endforeach
</ul>
</details>
@endforeach
</div>
</div>