init
This commit is contained in:
289
resources/views/layouts/admin.blade.php
Normal file
289
resources/views/layouts/admin.blade.php
Normal file
@@ -0,0 +1,289 @@
|
||||
<!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 管理后台')</title>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta21/dist/css/tabler.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 { --brand: #3b82f6; }
|
||||
body { font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f6fb; }
|
||||
.brand-mark {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, #2563eb, #7c3aed);
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
letter-spacing: .4px;
|
||||
}
|
||||
.sidebar-caption {
|
||||
font-size: .72rem;
|
||||
letter-spacing: .06em;
|
||||
text-transform: uppercase;
|
||||
color: #94a3b8;
|
||||
margin: .75rem 1rem .35rem;
|
||||
}
|
||||
.card-compact .card-body { padding: 1rem 1.1rem; }
|
||||
.kpi-number { font-size: 1.75rem; font-weight: 700; }
|
||||
.logout-btn {
|
||||
border: 1px solid #cbd5e1;
|
||||
border-radius: .65rem;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
font-size: .85rem;
|
||||
padding: .38rem .7rem;
|
||||
}
|
||||
.md-editor-dropzone {
|
||||
border: 1px dashed #cbd5e1;
|
||||
border-radius: .6rem;
|
||||
transition: .2s ease;
|
||||
}
|
||||
.md-editor-dropzone.dragover {
|
||||
border-color: #3b82f6;
|
||||
background: #eff6ff;
|
||||
}
|
||||
</style>
|
||||
@yield('head')
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<aside class="navbar navbar-vertical navbar-expand-lg" data-bs-theme="dark">
|
||||
<div class="container-fluid">
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-menu" aria-controls="sidebar-menu" aria-expanded="false" aria-label="切换导航">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<h1 class="navbar-brand navbar-brand-autodark d-flex align-items-center gap-2">
|
||||
<span class="brand-mark">AI</span>
|
||||
<span>AIWeb Admin</span>
|
||||
</h1>
|
||||
<div class="navbar-nav flex-row d-lg-none">
|
||||
<a class="nav-link px-0" href="{{ route('home') }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="sidebar-menu">
|
||||
<ul class="navbar-nav pt-lg-3">
|
||||
<li class="sidebar-caption">总览</li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.dashboard')) active @endif" href="{{ route('admin.dashboard') }}"><span class="nav-link-icon"><i class="bi bi-grid"></i></span><span class="nav-link-title">控制台</span></a></li>
|
||||
<li class="sidebar-caption">内容管理</li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.tools.*')) active @endif" href="{{ route('admin.tools.index') }}"><span class="nav-link-icon"><i class="bi bi-box-seam"></i></span><span class="nav-link-title">AI 工具</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.models.*')) active @endif" href="{{ route('admin.models.index') }}"><span class="nav-link-icon"><i class="bi bi-cpu"></i></span><span class="nav-link-title">AI 模型</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.articles.*')) active @endif" href="{{ route('admin.articles.index') }}"><span class="nav-link-icon"><i class="bi bi-newspaper"></i></span><span class="nav-link-title">AI 资讯</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.guides.*')) active @endif" href="{{ route('admin.guides.index') }}"><span class="nav-link-icon"><i class="bi bi-journal-code"></i></span><span class="nav-link-title">AI 教程</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.categories.*')) active @endif" href="{{ route('admin.categories.index') }}"><span class="nav-link-icon"><i class="bi bi-diagram-3"></i></span><span class="nav-link-title">分类维护</span></a></li>
|
||||
<li class="sidebar-caption">治理与来源</li>
|
||||
<li class="nav-item"><a class="nav-link @if(request()->routeIs('admin.sources.*')) active @endif" href="{{ route('admin.sources.index') }}"><span class="nav-link-icon"><i class="bi bi-shield-check"></i></span><span class="nav-link-title">来源白名单</span></a></li>
|
||||
<li class="sidebar-caption">站点</li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('home') }}" target="_blank"><span class="nav-link-icon"><i class="bi bi-globe2"></i></span><span class="nav-link-title">打开前台</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div class="page-wrapper">
|
||||
<header class="navbar navbar-expand-md d-none d-lg-flex d-print-none">
|
||||
<div class="container-xl">
|
||||
<div class="navbar-nav flex-row order-md-last d-flex align-items-center gap-2">
|
||||
<div class="text-muted small">当前账号:{{ session('admin_username', 'admin') }}</div>
|
||||
<form method="post" action="{{ route('admin.logout') }}" class="mb-0">
|
||||
@csrf
|
||||
<button class="logout-btn" type="submit"><i class="bi bi-box-arrow-right me-1"></i>退出</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="navbar-menu">
|
||||
<div>
|
||||
<h2 class="page-title mb-0">@yield('title', '管理后台')</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
@if(session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
<i class="bi bi-check-circle me-1"></i>{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($errors->any())
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<div class="fw-semibold mb-1">提交失败,请检查以下问题:</div>
|
||||
<ul class="mb-0">
|
||||
@foreach($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta21/dist/js/tabler.min.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
const uploadEndpoint = '{{ route('admin.uploads.markdown-image') }}';
|
||||
const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || '';
|
||||
|
||||
const insertTextAtCursor = (textarea, text) => {
|
||||
const start = textarea.selectionStart ?? textarea.value.length;
|
||||
const end = textarea.selectionEnd ?? textarea.value.length;
|
||||
textarea.value = textarea.value.substring(0, start) + text + textarea.value.substring(end);
|
||||
const nextPos = start + text.length;
|
||||
textarea.selectionStart = nextPos;
|
||||
textarea.selectionEnd = nextPos;
|
||||
textarea.focus();
|
||||
};
|
||||
|
||||
const setButtonLoading = (button, loading) => {
|
||||
if (!button) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
button.dataset.originHtml = button.innerHTML;
|
||||
button.disabled = true;
|
||||
button.innerHTML = '<span class="spinner-border spinner-border-sm me-1"></span>上传中';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
button.disabled = false;
|
||||
if (button.dataset.originHtml) {
|
||||
button.innerHTML = button.dataset.originHtml;
|
||||
}
|
||||
};
|
||||
|
||||
const uploadImage = async (file) => {
|
||||
const formData = new FormData();
|
||||
formData.append('image', file);
|
||||
|
||||
const response = await fetch(uploadEndpoint, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
},
|
||||
body: formData,
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('upload-failed');
|
||||
}
|
||||
|
||||
const payload = await response.json();
|
||||
if (!payload || payload.success !== true || !payload.url) {
|
||||
throw new Error('upload-failed');
|
||||
}
|
||||
|
||||
return payload;
|
||||
};
|
||||
|
||||
const buildMarkdownImageText = (payload, fileName = 'image') => {
|
||||
if (typeof payload.markdown === 'string' && payload.markdown.trim() !== '') {
|
||||
return `\n${payload.markdown.trim()}\n`;
|
||||
}
|
||||
|
||||
const alt = fileName.replace(/\.[^.]+$/, '');
|
||||
return `\n\n`;
|
||||
};
|
||||
|
||||
const attachUploadButton = (button) => {
|
||||
button.addEventListener('click', function () {
|
||||
const selector = button.getAttribute('data-target');
|
||||
const textarea = selector ? document.querySelector(selector) : null;
|
||||
if (!textarea) {
|
||||
return;
|
||||
}
|
||||
|
||||
const input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.accept = 'image/*';
|
||||
input.onchange = async () => {
|
||||
const file = input.files?.[0];
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
|
||||
setButtonLoading(button, true);
|
||||
try {
|
||||
const payload = await uploadImage(file);
|
||||
insertTextAtCursor(textarea, buildMarkdownImageText(payload, file.name || 'image'));
|
||||
} catch (_) {
|
||||
alert('图片上传失败,请稍后重试');
|
||||
} finally {
|
||||
setButtonLoading(button, false);
|
||||
}
|
||||
};
|
||||
input.click();
|
||||
});
|
||||
};
|
||||
|
||||
const attachEditorDragPaste = (textarea) => {
|
||||
textarea.classList.add('md-editor-dropzone');
|
||||
|
||||
textarea.addEventListener('dragover', (event) => {
|
||||
event.preventDefault();
|
||||
textarea.classList.add('dragover');
|
||||
});
|
||||
|
||||
textarea.addEventListener('dragleave', () => {
|
||||
textarea.classList.remove('dragover');
|
||||
});
|
||||
|
||||
textarea.addEventListener('drop', async (event) => {
|
||||
event.preventDefault();
|
||||
textarea.classList.remove('dragover');
|
||||
|
||||
const files = Array.from(event.dataTransfer?.files || []).filter((file) => file.type.startsWith('image/'));
|
||||
if (files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
for (const file of files) {
|
||||
const payload = await uploadImage(file);
|
||||
insertTextAtCursor(textarea, buildMarkdownImageText(payload, file.name || 'image'));
|
||||
}
|
||||
} catch (_) {
|
||||
alert('拖拽上传失败,请稍后重试');
|
||||
}
|
||||
});
|
||||
|
||||
textarea.addEventListener('paste', async (event) => {
|
||||
const files = Array.from(event.clipboardData?.files || []).filter((file) => file.type.startsWith('image/'));
|
||||
if (files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
try {
|
||||
for (const file of files) {
|
||||
const payload = await uploadImage(file);
|
||||
insertTextAtCursor(textarea, buildMarkdownImageText(payload, file.name || 'image'));
|
||||
}
|
||||
} catch (_) {
|
||||
alert('粘贴上传失败,请稍后重试');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
document.querySelectorAll('.js-md-upload-btn').forEach(attachUploadButton);
|
||||
document.querySelectorAll('textarea.js-md-editor').forEach(attachEditorDragPaste);
|
||||
}());
|
||||
</script>
|
||||
@yield('scripts')
|
||||
</body>
|
||||
</html>
|
||||
587
resources/views/layouts/site.blade.php
Normal file
587
resources/views/layouts/site.blade.php
Normal file
@@ -0,0 +1,587 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user