Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d35dd8c887 | ||
|
|
44b887a9a0 |
+21
-31
@@ -53,34 +53,28 @@ export default async function DocsIndexPage() {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* Search bar */}
|
{/* Search bar */}
|
||||||
<div className="mt-8 relative max-w-2xl">
|
<div className="mt-8">
|
||||||
<svg
|
<Link
|
||||||
className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-[#62666d]"
|
href="/search"
|
||||||
fill="none"
|
className="relative flex items-center max-w-2xl group"
|
||||||
stroke="currentColor"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
>
|
>
|
||||||
<path
|
<svg
|
||||||
strokeLinecap="round"
|
className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-[#62666d] group-focus-within:text-[#5e6ad2] transition-colors"
|
||||||
strokeLinejoin="round"
|
fill="none"
|
||||||
strokeWidth={2}
|
stroke="currentColor"
|
||||||
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
viewBox="0 0 24 24"
|
||||||
/>
|
>
|
||||||
</svg>
|
<path
|
||||||
<input
|
strokeLinecap="round"
|
||||||
type="text"
|
strokeLinejoin="round"
|
||||||
placeholder="Search documents, tags, authors..."
|
strokeWidth={2}
|
||||||
readOnly
|
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
||||||
className="w-full pl-10 pr-4 py-3 bg-[#191a1b] border border-[#1f2022] rounded-lg text-[#e2e4e7] placeholder-[#62666d] focus:outline-none focus:border-[#5e6ad2] focus:ring-1 focus:ring-[#5e6ad2]/30 transition-colors"
|
/>
|
||||||
onKeyDown={(e) => {
|
</svg>
|
||||||
if (e.key === "Enter" && e.currentTarget.value) {
|
<span className="w-full pl-10 pr-4 py-3 bg-[#191a1b] border border-[#1f2022] rounded-lg text-[#62666d] group-hover:border-[#5e6ad2]/40 transition-colors">
|
||||||
window.location.href = `/search?q=${encodeURIComponent(e.currentTarget.value)}`;
|
Search documents, tags, authors...
|
||||||
}
|
</span>
|
||||||
}}
|
</Link>
|
||||||
/>
|
|
||||||
<kbd className="absolute right-3 top-1/2 -translate-y-1/2 text-xs text-[#62666d] bg-[#0f1011] border border-[#1f2022] rounded px-1.5 py-0.5">
|
|
||||||
↵
|
|
||||||
</kbd>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Recent strip */}
|
{/* Recent strip */}
|
||||||
@@ -160,10 +154,6 @@ export default async function DocsIndexPage() {
|
|||||||
<h3 className="font-medium text-[#f7f8f8] group-hover:text-[#7170ff] transition-colors line-clamp-1 mb-2">
|
<h3 className="font-medium text-[#f7f8f8] group-hover:text-[#7170ff] transition-colors line-clamp-1 mb-2">
|
||||||
{d.title}
|
{d.title}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-xs text-[#8a8f98] mb-3 line-clamp-2">
|
|
||||||
{d.author && `by ${d.author} · `}
|
|
||||||
{d.tags.slice(0, 2).map((t) => `#${t}`).join(" ") || "—"}
|
|
||||||
</p>
|
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{d.tags.slice(0, 4).map((t) => (
|
{d.tags.slice(0, 4).map((t) => (
|
||||||
<span
|
<span
|
||||||
|
|||||||
Reference in new issue
Block a user