初始化

This commit is contained in:
2026-08-08 18:27:38 +08:00
parent efc150c937
commit 060eb79c09
336 changed files with 24613 additions and 15 deletions
+49
View File
@@ -0,0 +1,49 @@
@extends('layouts.app')
@section('title', '术语库 - 深圳市云创芯电子有限公司')
@section('content')
<section class="px-4 py-12 sm:px-6 lg:px-8 lg:py-16">
<div class="max-w-8xl mx-auto">
<div class="mb-8">
<h1 class="text-2xl font-bold tracking-tight text-fg sm:text-3xl">术语库</h1>
<p class="mt-2 text-sm text-muted">PD / PHY / 快充协议关键术语速查。</p>
</div>
<form method="GET" class="flex flex-wrap items-end gap-3">
<div class="min-w-[220px] flex-1">
<label class="mb-1.5 block text-sm font-medium text-fg">搜索</label>
<div class="relative">
<span class="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted">
<x-icon name="search" :size="18" />
</span>
<input type="text" name="q" value="{{ $q }}" placeholder="搜索术语、定义..." class="w-full rounded-lg border border-line bg-surface py-2.5 pl-10 pr-3 text-sm text-fg placeholder:text-muted focus:border-primary focus:outline-none focus:shadow-[0_0_0_3px_var(--color-primary-soft)]">
</div>
</div>
<button type="submit" class="inline-flex items-center justify-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-primary-hover">
<x-icon name="search" :size="18" /> 查询
</button>
</form>
<div class="mt-8 space-y-4">
@forelse ($terms as $term)
<a href="{{ route('glossary.show', $term->slug) }}" class="group flex items-center justify-between gap-4 rounded-lg border border-line bg-surface p-5 shadow-soft transition hover:border-primary hover:shadow-card">
<div>
<h3 class="text-lg font-semibold text-fg transition group-hover:text-primary">{{ $term->term }}</h3>
<p class="mt-1 line-clamp-2 text-sm text-muted">{{ Str::limit($term->definition, 90) }}</p>
</div>
<span class="shrink-0 text-muted transition group-hover:text-primary">
<x-icon name="arrow" :size="20" />
</span>
</a>
@empty
<p class="text-sm text-muted">没有匹配的术语。</p>
@endforelse
</div>
<div class="mt-8">
{{ $terms->links('pagination::bootstrap-5') }}
</div>
</div>
</section>
@endsection
+36
View File
@@ -0,0 +1,36 @@
@extends('layouts.app')
@section('title', $glossaryTerm->term . ' - 云创芯术语库')
@section('content')
<section class="px-4 py-12 sm:px-6 lg:px-8 lg:py-16">
<div class="mx-auto max-w-3xl">
<nav class="mb-6 flex items-center gap-1.5 text-sm text-muted">
<a href="{{ url('/') }}" class="hover:text-primary">首页</a>
<span>/</span>
<a href="{{ route('glossary.index') }}" class="hover:text-primary">术语库</a>
<span>/</span>
<span class="text-fg">{{ $glossaryTerm->term }}</span>
</nav>
<article class="rounded-lg border border-line bg-surface p-6 shadow-soft sm:p-8">
<h1 class="text-2xl font-bold tracking-tight text-fg sm:text-3xl">{{ $glossaryTerm->term }}</h1>
@if ($glossaryTerm->category)
<p class="mt-2 text-sm text-muted">分类:{{ $glossaryTerm->category }}</p>
@endif
<div class="prose mt-5 text-fg">
{!! nl2br(e($glossaryTerm->definition)) !!}
</div>
@if ($glossaryTerm->aliases)
<p class="mt-4 text-sm text-muted">别名:{{ $glossaryTerm->aliases }}</p>
@endif
</article>
<div class="mt-6">
<a href="{{ route('glossary.index') }}" class="inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:text-primary-hover">
<x-icon name="arrow" :size="16" class="rotate-180" /> 返回术语库
</a>
</div>
</div>
</section>
@endsection