634 lines
17 KiB
Text
634 lines
17 KiB
Text
---
|
|
import MainLayout from '../layouts/MainLayout.astro';
|
|
|
|
const categories = [
|
|
{ id: 'all', name: 'All Results', icon: '🔍', count: 156 },
|
|
{ id: 'docs', name: 'Documentation', icon: '📚', count: 42 },
|
|
{ id: 'products', name: 'Products', icon: '🚀', count: 28 },
|
|
{ id: 'community', name: 'Community', icon: '👥', count: 34 },
|
|
{ id: 'blog', name: 'Blog Posts', icon: '📝', count: 52 },
|
|
];
|
|
|
|
const popularSearches = [
|
|
'Getting Started',
|
|
'GameForge',
|
|
'Passport SSO',
|
|
'Asset API',
|
|
'Multiplayer',
|
|
'Authentication',
|
|
];
|
|
|
|
const featuredResults = [
|
|
{
|
|
title: 'Introduction to AeThex',
|
|
description: 'Learn the fundamentals of the AeThex ecosystem and how to get started building.',
|
|
category: 'Docs',
|
|
categoryColor: '#6cf',
|
|
url: '/docs/introduction'
|
|
},
|
|
{
|
|
title: 'GameForge Quick Start',
|
|
description: 'Build and deploy your first game in under 10 minutes with our terminal-inspired toolkit.',
|
|
category: 'Products',
|
|
categoryColor: '#0f0',
|
|
url: '/gameforge'
|
|
},
|
|
{
|
|
title: 'Identity API Reference',
|
|
description: 'Complete documentation for user authentication, sessions, and profile management.',
|
|
category: 'Docs',
|
|
categoryColor: '#6cf',
|
|
url: '/docs/identity-api'
|
|
},
|
|
{
|
|
title: 'Community Guidelines',
|
|
description: 'How we work together as a community. Code of conduct and contribution guidelines.',
|
|
category: 'Community',
|
|
categoryColor: '#ffc700',
|
|
url: '/community'
|
|
},
|
|
];
|
|
|
|
const stats = [
|
|
{ value: '1,200+', label: 'Docs Pages' },
|
|
{ value: '50+', label: 'Tutorials' },
|
|
{ value: '15', label: 'SDKs' },
|
|
{ value: '24/7', label: 'Support' },
|
|
];
|
|
---
|
|
<MainLayout title="Universal Search - AeThex">
|
|
<!-- Hero -->
|
|
<section class="search-hero">
|
|
<div class="hero-bg"></div>
|
|
<div class="hero-grid"></div>
|
|
<div class="hero-content">
|
|
<span class="hero-badge">🔍 Unified Search</span>
|
|
<h1 class="hero-title">Find <span class="gradient-text">Anything</span></h1>
|
|
<p class="hero-desc">Search across all documentation, products, community resources, and more in one place.</p>
|
|
|
|
<!-- Search Box -->
|
|
<div class="search-box">
|
|
<div class="search-input-wrapper">
|
|
<span class="search-icon">⌘</span>
|
|
<input type="text" id="search-input" placeholder="Search documentation, APIs, tutorials..." autocomplete="off" />
|
|
<kbd class="search-kbd">K</kbd>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Popular Searches -->
|
|
<div class="popular-searches">
|
|
<span class="popular-label">Popular:</span>
|
|
{popularSearches.map(term => (
|
|
<button class="popular-tag">{term}</button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Stats -->
|
|
<section class="stats-bar">
|
|
{stats.map(stat => (
|
|
<div class="stat-item">
|
|
<span class="stat-value">{stat.value}</span>
|
|
<span class="stat-label">{stat.label}</span>
|
|
</div>
|
|
))}
|
|
</section>
|
|
|
|
<!-- Main Content -->
|
|
<section class="search-content">
|
|
<div class="content-container">
|
|
<!-- Sidebar -->
|
|
<aside class="search-sidebar">
|
|
<h3 class="sidebar-title">> Categories</h3>
|
|
<div class="category-list">
|
|
{categories.map((cat, i) => (
|
|
<button class={`category-btn ${i === 0 ? 'active' : ''}`}>
|
|
<span class="cat-icon">{cat.icon}</span>
|
|
<span class="cat-name">{cat.name}</span>
|
|
<span class="cat-count">{cat.count}</span>
|
|
</button>
|
|
))}
|
|
</div>
|
|
|
|
<h3 class="sidebar-title">> Quick Links</h3>
|
|
<div class="quick-links">
|
|
<a href="/docs" class="quick-link">📚 Documentation</a>
|
|
<a href="/docs/quickstart" class="quick-link">⚡ Quickstart</a>
|
|
<a href="/products" class="quick-link">🚀 Products</a>
|
|
<a href="/community" class="quick-link">👥 Community</a>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Results -->
|
|
<main class="results-main">
|
|
<div class="results-header">
|
|
<h2>Featured Results</h2>
|
|
<span class="results-count">Showing top results</span>
|
|
</div>
|
|
|
|
<div class="results-grid">
|
|
{featuredResults.map(result => (
|
|
<a href={result.url} class="result-card">
|
|
<div class="result-meta">
|
|
<span class="result-category" style={`--cat-color: ${result.categoryColor}`}>{result.category}</span>
|
|
</div>
|
|
<h3 class="result-title">{result.title}</h3>
|
|
<p class="result-desc">{result.description}</p>
|
|
<span class="result-link">View Details →</span>
|
|
</a>
|
|
))}
|
|
</div>
|
|
|
|
<div class="results-tip">
|
|
<span class="tip-icon">💡</span>
|
|
<p>Use keyboard shortcuts: <kbd>⌘</kbd> + <kbd>K</kbd> to search from anywhere, <kbd>↑</kbd> <kbd>↓</kbd> to navigate results</p>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Browse Sections -->
|
|
<section class="browse-section">
|
|
<div class="section-header">
|
|
<span class="section-eyebrow">> BROWSE_BY_TOPIC</span>
|
|
<h2 class="section-title">Explore by Category</h2>
|
|
<p class="section-subtitle">Dive into specific areas of the AeThex ecosystem</p>
|
|
</div>
|
|
<div class="browse-grid">
|
|
<a href="/docs" class="browse-card">
|
|
<span class="browse-icon">📚</span>
|
|
<h3>Documentation</h3>
|
|
<p>API references, guides, and tutorials</p>
|
|
</a>
|
|
<a href="/products" class="browse-card">
|
|
<span class="browse-icon">🚀</span>
|
|
<h3>Products</h3>
|
|
<p>GameForge, Passport, and more</p>
|
|
</a>
|
|
<a href="/community" class="browse-card">
|
|
<span class="browse-icon">👥</span>
|
|
<h3>Community</h3>
|
|
<p>Forums, Discord, and events</p>
|
|
</a>
|
|
<a href="/blog" class="browse-card">
|
|
<span class="browse-icon">📝</span>
|
|
<h3>Blog</h3>
|
|
<p>News, updates, and tutorials</p>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CTA -->
|
|
<section class="search-cta">
|
|
<h2>Can't Find What You're Looking For?</h2>
|
|
<p>Our team is here to help. Reach out through our community channels or contact us directly.</p>
|
|
<div class="cta-buttons">
|
|
<a href="/community" class="cta-btn primary">Join Community</a>
|
|
<a href="/contact" class="cta-btn secondary">Contact Us</a>
|
|
</div>
|
|
</section>
|
|
|
|
<style>
|
|
:root {
|
|
--search-accent: #6cf;
|
|
--search-dark: #0a0d14;
|
|
}
|
|
|
|
/* Hero */
|
|
.search-hero {
|
|
position: relative;
|
|
min-height: 60vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 120px 20px 80px;
|
|
overflow: hidden;
|
|
}
|
|
.hero-bg {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: linear-gradient(180deg, #0a0d14 0%, #101520 50%, #0a0d14 100%);
|
|
}
|
|
.hero-grid {
|
|
position: absolute;
|
|
inset: 0;
|
|
background-image:
|
|
linear-gradient(rgba(102, 204, 255, 0.03) 1px, transparent 1px),
|
|
linear-gradient(90deg, rgba(102, 204, 255, 0.03) 1px, transparent 1px);
|
|
background-size: 50px 50px;
|
|
mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
|
|
}
|
|
.hero-content {
|
|
position: relative;
|
|
z-index: 1;
|
|
text-align: center;
|
|
max-width: 800px;
|
|
width: 100%;
|
|
}
|
|
.hero-badge {
|
|
display: inline-block;
|
|
background: rgba(102, 204, 255, 0.1);
|
|
border: 1px solid rgba(102, 204, 255, 0.3);
|
|
color: var(--search-accent);
|
|
padding: 8px 20px;
|
|
border-radius: 24px;
|
|
font-size: 0.85em;
|
|
letter-spacing: 1px;
|
|
margin-bottom: 24px;
|
|
}
|
|
.hero-title {
|
|
font-size: 4em;
|
|
font-weight: 900;
|
|
color: #fff;
|
|
margin: 0 0 16px;
|
|
}
|
|
.gradient-text {
|
|
background: linear-gradient(135deg, #6cf 0%, #a855f7 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
.hero-desc {
|
|
font-size: 1.2em;
|
|
color: #888;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
/* Search Box */
|
|
.search-box {
|
|
max-width: 600px;
|
|
margin: 0 auto 24px;
|
|
}
|
|
.search-input-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
background: rgba(255,255,255,0.05);
|
|
border: 2px solid rgba(255,255,255,0.1);
|
|
border-radius: 16px;
|
|
padding: 4px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.search-input-wrapper:focus-within {
|
|
border-color: var(--search-accent);
|
|
background: rgba(102, 204, 255, 0.05);
|
|
box-shadow: 0 0 40px rgba(102, 204, 255, 0.1);
|
|
}
|
|
.search-icon {
|
|
padding: 0 16px;
|
|
color: #666;
|
|
font-size: 1.2em;
|
|
}
|
|
.search-input-wrapper input {
|
|
flex: 1;
|
|
background: transparent;
|
|
border: none;
|
|
color: #fff;
|
|
font-size: 1.1em;
|
|
padding: 16px 0;
|
|
outline: none;
|
|
}
|
|
.search-input-wrapper input::placeholder {
|
|
color: #555;
|
|
}
|
|
.search-kbd {
|
|
background: rgba(255,255,255,0.1);
|
|
color: #666;
|
|
padding: 6px 12px;
|
|
border-radius: 8px;
|
|
font-size: 0.8em;
|
|
margin-right: 12px;
|
|
font-family: 'Roboto Mono', monospace;
|
|
}
|
|
|
|
/* Popular Searches */
|
|
.popular-searches {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.popular-label {
|
|
color: #666;
|
|
font-size: 0.9em;
|
|
}
|
|
.popular-tag {
|
|
background: rgba(255,255,255,0.05);
|
|
border: 1px solid rgba(255,255,255,0.1);
|
|
color: #aaa;
|
|
padding: 8px 16px;
|
|
border-radius: 20px;
|
|
font-size: 0.85em;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.popular-tag:hover {
|
|
border-color: var(--search-accent);
|
|
color: var(--search-accent);
|
|
}
|
|
|
|
/* Stats */
|
|
.stats-bar {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 60px;
|
|
padding: 40px 20px;
|
|
background: rgba(255,255,255,0.02);
|
|
border-top: 1px solid rgba(255,255,255,0.05);
|
|
border-bottom: 1px solid rgba(255,255,255,0.05);
|
|
}
|
|
.stat-item { text-align: center; }
|
|
.stat-value { display: block; font-size: 2em; font-weight: 800; color: var(--search-accent); font-family: 'Roboto Mono', monospace; }
|
|
.stat-label { font-size: 0.85em; color: #666; text-transform: uppercase; letter-spacing: 1px; }
|
|
|
|
/* Main Content */
|
|
.search-content {
|
|
max-width: 1200px;
|
|
margin: 60px auto;
|
|
padding: 0 20px;
|
|
}
|
|
.content-container {
|
|
display: grid;
|
|
grid-template-columns: 280px 1fr;
|
|
gap: 40px;
|
|
}
|
|
|
|
/* Sidebar */
|
|
.search-sidebar {
|
|
position: sticky;
|
|
top: 100px;
|
|
height: fit-content;
|
|
}
|
|
.sidebar-title {
|
|
font-family: 'Roboto Mono', monospace;
|
|
font-size: 0.85em;
|
|
color: var(--search-accent);
|
|
letter-spacing: 1px;
|
|
margin: 0 0 16px;
|
|
}
|
|
.category-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-bottom: 32px;
|
|
}
|
|
.category-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: rgba(255,255,255,0.02);
|
|
border: 1px solid rgba(255,255,255,0.08);
|
|
padding: 12px 16px;
|
|
border-radius: 10px;
|
|
color: #888;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
text-align: left;
|
|
}
|
|
.category-btn:hover, .category-btn.active {
|
|
border-color: var(--search-accent);
|
|
color: #fff;
|
|
background: rgba(102, 204, 255, 0.05);
|
|
}
|
|
.cat-icon { font-size: 1.1em; }
|
|
.cat-name { flex: 1; font-size: 0.9em; }
|
|
.cat-count {
|
|
background: rgba(255,255,255,0.1);
|
|
padding: 2px 10px;
|
|
border-radius: 12px;
|
|
font-size: 0.8em;
|
|
}
|
|
.quick-links {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.quick-link {
|
|
color: #666;
|
|
text-decoration: none;
|
|
padding: 10px 0;
|
|
font-size: 0.9em;
|
|
border-bottom: 1px solid rgba(255,255,255,0.05);
|
|
transition: color 0.3s ease;
|
|
}
|
|
.quick-link:hover {
|
|
color: var(--search-accent);
|
|
}
|
|
|
|
/* Results */
|
|
.results-main { }
|
|
.results-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
.results-header h2 {
|
|
font-size: 1.5em;
|
|
color: #fff;
|
|
margin: 0;
|
|
}
|
|
.results-count {
|
|
color: #666;
|
|
font-size: 0.9em;
|
|
}
|
|
.results-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 20px;
|
|
margin-bottom: 32px;
|
|
}
|
|
.result-card {
|
|
background: rgba(255,255,255,0.02);
|
|
border: 1px solid rgba(255,255,255,0.08);
|
|
border-radius: 16px;
|
|
padding: 24px;
|
|
text-decoration: none;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.result-card:hover {
|
|
border-color: var(--search-accent);
|
|
background: rgba(102, 204, 255, 0.03);
|
|
transform: translateY(-4px);
|
|
}
|
|
.result-meta { margin-bottom: 12px; }
|
|
.result-category {
|
|
display: inline-block;
|
|
background: rgba(102, 204, 255, 0.1);
|
|
color: var(--cat-color);
|
|
padding: 4px 12px;
|
|
border-radius: 12px;
|
|
font-size: 0.75em;
|
|
font-weight: 600;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.result-title {
|
|
color: #fff;
|
|
font-size: 1.15em;
|
|
margin: 0 0 8px;
|
|
}
|
|
.result-desc {
|
|
color: #888;
|
|
font-size: 0.9em;
|
|
line-height: 1.6;
|
|
margin: 0 0 16px;
|
|
flex: 1;
|
|
}
|
|
.result-link {
|
|
color: var(--search-accent);
|
|
font-size: 0.85em;
|
|
font-weight: 600;
|
|
}
|
|
.results-tip {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: rgba(255,255,255,0.02);
|
|
border: 1px solid rgba(255,255,255,0.08);
|
|
border-radius: 12px;
|
|
padding: 16px 20px;
|
|
}
|
|
.tip-icon { font-size: 1.2em; }
|
|
.results-tip p {
|
|
color: #666;
|
|
margin: 0;
|
|
font-size: 0.9em;
|
|
}
|
|
.results-tip kbd {
|
|
background: rgba(255,255,255,0.1);
|
|
padding: 4px 8px;
|
|
border-radius: 6px;
|
|
font-size: 0.8em;
|
|
font-family: 'Roboto Mono', monospace;
|
|
}
|
|
|
|
/* Browse Section */
|
|
.browse-section {
|
|
max-width: 1000px;
|
|
margin: 80px auto;
|
|
padding: 0 20px;
|
|
}
|
|
.section-header {
|
|
text-align: center;
|
|
margin-bottom: 48px;
|
|
}
|
|
.section-eyebrow {
|
|
font-family: 'Roboto Mono', monospace;
|
|
font-size: 0.85em;
|
|
color: var(--search-accent);
|
|
letter-spacing: 2px;
|
|
margin-bottom: 12px;
|
|
display: block;
|
|
}
|
|
.section-title {
|
|
font-size: 2.5em;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
margin: 0 0 12px;
|
|
}
|
|
.section-subtitle {
|
|
font-size: 1.1em;
|
|
color: #888;
|
|
}
|
|
.browse-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 20px;
|
|
}
|
|
.browse-card {
|
|
background: rgba(255,255,255,0.02);
|
|
border: 1px solid rgba(255,255,255,0.08);
|
|
border-radius: 16px;
|
|
padding: 32px 24px;
|
|
text-decoration: none;
|
|
text-align: center;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.browse-card:hover {
|
|
border-color: var(--search-accent);
|
|
background: rgba(102, 204, 255, 0.03);
|
|
transform: translateY(-4px);
|
|
}
|
|
.browse-icon {
|
|
font-size: 2.5em;
|
|
display: block;
|
|
margin-bottom: 16px;
|
|
}
|
|
.browse-card h3 {
|
|
color: #fff;
|
|
font-size: 1.1em;
|
|
margin: 0 0 8px;
|
|
}
|
|
.browse-card p {
|
|
color: #666;
|
|
font-size: 0.85em;
|
|
margin: 0;
|
|
}
|
|
|
|
/* CTA */
|
|
.search-cta {
|
|
text-align: center;
|
|
padding: 80px 20px;
|
|
background: linear-gradient(180deg, transparent 0%, rgba(102, 204, 255, 0.03) 100%);
|
|
border-top: 1px solid rgba(255,255,255,0.05);
|
|
}
|
|
.search-cta h2 {
|
|
font-size: 2em;
|
|
color: #fff;
|
|
margin: 0 0 16px;
|
|
}
|
|
.search-cta p {
|
|
color: #888;
|
|
font-size: 1.1em;
|
|
margin: 0 0 32px;
|
|
}
|
|
.cta-buttons {
|
|
display: flex;
|
|
gap: 16px;
|
|
justify-content: center;
|
|
}
|
|
.cta-btn {
|
|
padding: 16px 32px;
|
|
border-radius: 10px;
|
|
font-weight: 700;
|
|
text-decoration: none;
|
|
font-size: 0.9em;
|
|
letter-spacing: 1px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
.cta-btn.primary {
|
|
background: var(--search-accent);
|
|
color: #000;
|
|
}
|
|
.cta-btn.primary:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 10px 40px rgba(102, 204, 255, 0.3);
|
|
}
|
|
.cta-btn.secondary {
|
|
background: transparent;
|
|
color: var(--search-accent);
|
|
border: 2px solid rgba(102, 204, 255, 0.3);
|
|
}
|
|
.cta-btn.secondary:hover {
|
|
border-color: var(--search-accent);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 900px) {
|
|
.hero-title { font-size: 2.5em; }
|
|
.content-container { grid-template-columns: 1fr; }
|
|
.search-sidebar { position: static; }
|
|
.results-grid { grid-template-columns: 1fr; }
|
|
.browse-grid { grid-template-columns: repeat(2, 1fr); }
|
|
.stats-bar { flex-wrap: wrap; gap: 30px; }
|
|
}
|
|
@media (max-width: 600px) {
|
|
.browse-grid { grid-template-columns: 1fr; }
|
|
.popular-searches { justify-content: center; }
|
|
}
|
|
</style>
|
|
</MainLayout>
|