Files
ai-web/resources/views/layouts/site.blade.php
jiangdong.cheng aa16c9f8c2
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
init
2026-02-11 17:28:36 +08:00

588 lines
18 KiB
PHP

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title', 'AIWeb - AI 工具与模型导航')</title>
<meta name="description" content="@yield('meta_description', '发现优质 AI 工具、模型、资讯与教程。')">
@hasSection('canonical')
<link rel="canonical" href="@yield('canonical')">
@endif
<meta name="theme-color" content="#eef3fb" id="themeColorMeta">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<style>
:root {
color-scheme: light;
--bg-page: #eef3fb;
--bg-surface: #ffffff;
--bg-soft: #f7f9ff;
--text-main: #121c2f;
--text-muted: #5f6f8b;
--brand: #3d5cff;
--brand-strong: #2b46e4;
--brand-soft: #e8edff;
--line: #d9e2f2;
--line-strong: #c8d6f0;
--radius-xl: 18px;
--radius-lg: 14px;
--radius-md: 10px;
--shadow-sm: 0 8px 20px rgba(29, 53, 116, .07);
--shadow-md: 0 14px 30px rgba(29, 53, 116, .12);
}
html,
body {
min-height: 100%;
}
body {
margin: 0;
font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
color: var(--text-main);
background:
radial-gradient(circle at 12% -10%, #f8f3ff 0, rgba(248, 243, 255, 0) 45%),
radial-gradient(circle at 86% -12%, #e9f4ff 0, rgba(233, 244, 255, 0) 38%),
var(--bg-page);
}
a {
color: var(--brand-strong);
text-decoration: none;
}
.skip-link {
position: absolute;
left: 1rem;
top: -3rem;
z-index: 1200;
border-radius: .65rem;
background: var(--brand);
color: #fff;
padding: .45rem .7rem;
text-decoration: none;
font-size: .86rem;
font-weight: 600;
transition: top .15s ease;
}
.skip-link:focus {
top: .7rem;
}
.site-header {
position: sticky;
top: 0;
z-index: 1080;
border-bottom: 1px solid var(--line);
background: rgba(255, 255, 255, .88);
backdrop-filter: blur(10px);
}
.brand-link {
display: inline-flex;
align-items: center;
gap: .6rem;
color: var(--text-main);
font-family: "Outfit", sans-serif;
font-size: 1.18rem;
font-weight: 700;
letter-spacing: .02em;
}
.brand-mark {
width: 2rem;
height: 2rem;
border-radius: .62rem;
display: inline-flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 700;
font-size: .8rem;
background: linear-gradient(135deg, #6d7cff, #4f64ff 48%, #2d49e6);
box-shadow: 0 8px 18px rgba(61, 92, 255, .35);
}
.site-nav {
display: flex;
gap: .2rem;
align-items: center;
}
.site-nav-link {
color: var(--text-muted);
font-weight: 500;
padding: .44rem .75rem;
border-radius: .65rem;
transition: .18s ease;
}
.site-nav-link:hover,
.site-nav-link.active {
color: var(--text-main);
background: var(--brand-soft);
}
.admin-entry {
border: 1px solid var(--line);
border-radius: .65rem;
color: var(--text-main);
padding: .36rem .66rem;
background: #fff;
font-size: .9rem;
}
.mobile-nav {
border-top: 1px solid var(--line);
background: rgba(255, 255, 255, .95);
}
.mobile-nav .site-nav-link {
border-radius: .55rem;
padding: .52rem .62rem;
}
.page-main {
padding: 1rem 0 1.2rem;
}
.module-hero {
position: relative;
overflow: hidden;
border-radius: var(--radius-xl);
border: 1px solid var(--line-strong);
background: linear-gradient(140deg, #f2f6ff, #ebf2ff 58%, #f6f3ff);
box-shadow: var(--shadow-md);
padding: 1.2rem 1.15rem;
margin-bottom: 1rem;
}
.module-hero::after {
content: "";
position: absolute;
right: -56px;
top: -66px;
width: 220px;
height: 220px;
border-radius: 999px;
background: radial-gradient(circle, rgba(255, 255, 255, .75), rgba(255, 255, 255, .2));
pointer-events: none;
}
.module-hero .position-relative {
z-index: 2;
}
.module-hero h1,
.module-hero h2,
.module-hero h3 {
color: var(--text-main);
margin-bottom: .45rem;
font-family: "Outfit", "Noto Sans SC", sans-serif;
}
.module-hero p,
.hero-subtext {
color: var(--text-muted) !important;
margin: 0;
}
.hero-chip,
.module-hero .chip {
display: inline-flex;
align-items: center;
gap: .28rem;
border-radius: 999px;
border: 1px solid var(--line-strong);
background: rgba(255, 255, 255, .78);
color: var(--brand-strong);
padding: .2rem .64rem;
font-size: .78rem;
font-weight: 600;
}
.portal-grid,
.module-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 300px;
gap: 1rem;
}
.portal-card,
.surface-card,
.block-card {
background: var(--bg-surface);
border: 1px solid var(--line);
border-radius: var(--radius-xl);
box-shadow: var(--shadow-sm);
}
.entry-item {
border: 1px solid var(--line);
border-radius: var(--radius-lg);
padding: .9rem;
background: #fff;
transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.entry-item:hover {
transform: translateY(-2px);
border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
box-shadow: 0 12px 25px rgba(36, 65, 138, .12);
}
.hero-soft {
border: 1px solid var(--line);
border-radius: var(--radius-xl);
background: linear-gradient(135deg, #f4f7ff, #edf3ff 55%, #f8f5ff);
padding: 1.1rem;
box-shadow: var(--shadow-sm);
}
.search-shell {
display: flex;
align-items: center;
gap: .45rem;
border: 1px solid var(--line-strong);
border-radius: 999px;
background: #fff;
padding: .42rem;
}
.search-shell input {
border: 0;
box-shadow: none;
background: transparent;
color: var(--text-main);
}
.search-shell .btn {
border-radius: 999px;
}
.chip {
display: inline-flex;
align-items: center;
gap: .28rem;
border-radius: 999px;
border: 1px solid var(--line);
background: var(--bg-soft);
color: var(--text-muted);
padding: .18rem .6rem;
font-size: .78rem;
}
.portal-tag {
display: inline-flex;
align-items: center;
margin-right: .35rem;
margin-bottom: .35rem;
border-radius: 999px;
border: 1px solid var(--line-strong);
background: #fff;
color: var(--brand-strong);
padding: .2rem .6rem;
font-size: .78rem;
}
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.text-muted-soft {
color: var(--text-muted) !important;
}
.section-title {
font-family: "Outfit", "Noto Sans SC", sans-serif;
font-size: 1.05rem;
font-weight: 700;
color: var(--text-main);
}
.tiny-link {
font-size: .8rem;
color: var(--brand-strong);
text-decoration: none;
}
.list-tight {
display: grid;
gap: .55rem;
}
.list-tight article {
border: 1px solid var(--line);
border-radius: var(--radius-md);
padding: .6rem .7rem;
background: #fff;
}
.metric-bar {
height: 6px;
border-radius: 999px;
overflow: hidden;
background: #e5ebf8;
}
.metric-fill {
height: 100%;
border-radius: 999px;
}
.md-content {
color: var(--text-main);
line-height: 1.86;
font-size: 1rem;
}
.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
font-family: "Outfit", "Noto Sans SC", sans-serif;
margin-top: 1.45em;
margin-bottom: .65em;
color: var(--text-main);
}
.md-content p {
margin-bottom: 1em;
color: #1f2d44;
}
.md-content ul,
.md-content ol {
margin-bottom: 1em;
padding-left: 1.45rem;
}
.md-content a {
color: var(--brand-strong);
text-decoration: underline;
text-underline-offset: 2px;
}
.md-content pre {
border: 1px solid var(--line);
border-radius: .78rem;
background: #f4f7ff;
color: #12213b;
padding: .82rem;
overflow-x: auto;
}
.md-content code {
border-radius: .45rem;
background: #edf2ff;
color: #223fbe;
padding: .15rem .4rem;
font-size: .9em;
}
.md-content pre code {
background: transparent;
color: inherit;
padding: 0;
}
.md-content img {
max-width: 100%;
height: auto;
border-radius: .85rem;
border: 1px solid var(--line);
margin: .45rem 0;
box-shadow: var(--shadow-sm);
}
.md-content blockquote {
margin: 1rem 0;
border-left: 3px solid var(--brand);
background: #f7f9ff;
color: #2a3e63;
padding: .68rem .86rem;
border-radius: .5rem;
}
.footer-shell {
border-top: 1px solid var(--line);
color: var(--text-muted);
background: rgba(255, 255, 255, .75);
font-size: .92rem;
}
:where(a, button, input, textarea, select, [role="button"]):focus-visible {
outline: 2px solid color-mix(in srgb, var(--brand) 62%, transparent);
outline-offset: 2px;
}
.form-control,
.form-select {
border-color: var(--line);
background: #fff;
color: var(--text-main);
}
.form-control::placeholder {
color: #8b98af;
}
.form-control:focus,
.form-select:focus {
border-color: color-mix(in srgb, var(--brand) 58%, transparent);
box-shadow: 0 0 0 .18rem rgba(61, 92, 255, .16);
}
.table {
--bs-table-bg: transparent;
--bs-table-color: var(--text-main);
--bs-table-border-color: var(--line);
}
.pagination {
--bs-pagination-bg: #fff;
--bs-pagination-color: var(--text-main);
--bs-pagination-border-color: var(--line);
--bs-pagination-hover-bg: var(--brand-soft);
--bs-pagination-hover-color: var(--text-main);
--bs-pagination-hover-border-color: var(--line-strong);
--bs-pagination-active-bg: var(--brand);
--bs-pagination-active-border-color: var(--brand);
}
.page-tools .module-hero {
background: linear-gradient(120deg, #edf4ff, #e2eeff);
}
.page-models .module-hero {
background: linear-gradient(120deg, #f2ecff, #ede7ff);
}
.page-news .module-hero {
background: linear-gradient(120deg, #eafaf6, #e1f7f0);
}
.page-guides .module-hero {
background: linear-gradient(120deg, #fff2e8, #ffede0);
}
.page-home .module-hero {
background: linear-gradient(120deg, #edf4ff, #e9f0ff, #f0efff);
}
@media (max-width: 991.98px) {
.portal-grid,
.module-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 767.98px) {
.site-nav-link {
padding: .45rem .62rem;
}
}
@media (max-width: 575.98px) {
.module-hero,
.portal-card,
.surface-card,
.block-card {
border-radius: 14px;
}
.module-hero {
padding: 1rem .95rem;
}
.brand-link {
font-size: 1.03rem;
}
.brand-mark {
width: 1.82rem;
height: 1.82rem;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: .01ms !important;
animation-iteration-count: 1 !important;
transition-duration: .01ms !important;
scroll-behavior: auto !important;
}
}
</style>
@yield('head')
</head>
<body class="@yield('page_class', 'page-home')">
<a class="skip-link" href="#main-content">跳到主内容</a>
<header class="site-header">
<div class="container py-2 d-flex align-items-center justify-content-between gap-2">
<a class="brand-link" href="{{ route('home') }}">
<span class="brand-mark">AI</span>
<span>AIWeb</span>
</a>
<nav class="site-nav d-none d-md-flex">
<a class="site-nav-link @if(request()->routeIs('home')) active @endif" href="{{ route('home') }}" @if(request()->routeIs('home')) aria-current="page" @endif>首页</a>
<a class="site-nav-link @if(request()->routeIs('tools.*')) active @endif" href="{{ route('tools.index') }}" @if(request()->routeIs('tools.*')) aria-current="page" @endif>工具导航</a>
<a class="site-nav-link @if(request()->routeIs('models.*')) active @endif" href="{{ route('models.index') }}" @if(request()->routeIs('models.*')) aria-current="page" @endif>模型推荐</a>
<a class="site-nav-link @if(request()->routeIs('news.*')) active @endif" href="{{ route('news.index') }}" @if(request()->routeIs('news.*')) aria-current="page" @endif>资讯文章</a>
<a class="site-nav-link @if(request()->routeIs('guides.*')) active @endif" href="{{ route('guides.index') }}" @if(request()->routeIs('guides.*')) aria-current="page" @endif>教程学习</a>
</nav>
<div class="d-flex align-items-center gap-2">
<a class="admin-entry d-none d-md-inline-flex" href="{{ route('admin.dashboard') }}">后台管理</a>
<button class="navbar-toggler d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#mobileNav" aria-controls="mobileNav" aria-expanded="false" aria-label="切换导航">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="collapse d-md-none mobile-nav" id="mobileNav">
<div class="container py-2 d-flex flex-column gap-1">
<a class="site-nav-link @if(request()->routeIs('home')) active @endif" href="{{ route('home') }}" @if(request()->routeIs('home')) aria-current="page" @endif>首页</a>
<a class="site-nav-link @if(request()->routeIs('tools.*')) active @endif" href="{{ route('tools.index') }}" @if(request()->routeIs('tools.*')) aria-current="page" @endif>工具导航</a>
<a class="site-nav-link @if(request()->routeIs('models.*')) active @endif" href="{{ route('models.index') }}" @if(request()->routeIs('models.*')) aria-current="page" @endif>模型推荐</a>
<a class="site-nav-link @if(request()->routeIs('news.*')) active @endif" href="{{ route('news.index') }}" @if(request()->routeIs('news.*')) aria-current="page" @endif>资讯文章</a>
<a class="site-nav-link @if(request()->routeIs('guides.*')) active @endif" href="{{ route('guides.index') }}" @if(request()->routeIs('guides.*')) aria-current="page" @endif>教程学习</a>
<a class="site-nav-link" href="{{ route('admin.dashboard') }}">后台管理</a>
</div>
</div>
</header>
<main id="main-content" class="page-main" tabindex="-1">
<div class="container">
@yield('content')
</div>
</main>
<footer class="footer-shell py-4 mt-3">
<div class="container d-flex flex-column flex-lg-row justify-content-between gap-2">
<div>© {{ date('Y') }} AIWeb · AI聚合导航 · 模型推荐 · 教程学习</div>
<div>
<a class="text-decoration-none me-3" href="{{ route('seo.sitemap') }}">Sitemap</a>
<a class="text-decoration-none" href="{{ route('seo.robots') }}">Robots</a>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
@yield('scripts')
</body>
</html>