feat: add landing page and docs website (#537)
* feat: add landing page and docs website package Add packages/website — a Vue 3 + Naive UI static site with landing page and documentation, sharing the Pure Ink monochrome design with the main app. Features: particle network hero animation, screenshot carousel, feature grid, install guide tabs, GitHub star history, scroll reveal animations, and Chinese/English bilingual support. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: add favicon to website package Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: use dynamic theme param for star history chart Switch from CSS media query to JS-based dark mode detection so the star-history SVG matches the current theme toggle state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: resolve TypeScript strict mode errors in website components - Remove unused isDark import in HeroSection - Add null check for canvas parent element - Rename unused img loop variable in ScreenshotsSection - Remove unused NIcon import in SiteHeader Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: resolve TS narrowing errors in canvas resize closure Use canvasRef.value directly inside resize() with local null check instead of relying on outer closure narrowing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const { t, tm, rt } = useI18n()
|
||||
const route = useRoute()
|
||||
|
||||
const pageKey = computed(() => (route.meta.page as string) || 'gettingStarted')
|
||||
const pageTitle = computed(() => t(`docs.${pageKey.value}.title`))
|
||||
const pageIntro = computed(() => t(`docs.${pageKey.value}.intro`))
|
||||
|
||||
interface DocSection {
|
||||
title: string
|
||||
content: string
|
||||
rows?: string[][]
|
||||
}
|
||||
|
||||
const sections = computed<DocSection[]>(() => {
|
||||
const key = pageKey.value
|
||||
const meta = tm(`docs.${key}`) as Record<string, any>
|
||||
if (!meta) return []
|
||||
|
||||
const result: DocSection[] = []
|
||||
const sectionKeys = Object.keys(meta).filter(
|
||||
(k) => k !== 'title' && k !== 'intro' && typeof meta[k] === 'object' && meta[k] !== null,
|
||||
)
|
||||
|
||||
for (const sk of sectionKeys) {
|
||||
const section = meta[sk] as Record<string, any>
|
||||
result.push({
|
||||
title: rt(section.title || ''),
|
||||
content: rt(section.content || ''),
|
||||
rows: Array.isArray(section.rows) ? section.rows : undefined,
|
||||
})
|
||||
}
|
||||
|
||||
return result
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="doc-content">
|
||||
<h1 class="doc-title">{{ pageTitle }}</h1>
|
||||
<p v-if="pageIntro" class="doc-intro">{{ pageIntro }}</p>
|
||||
|
||||
<div v-for="(section, i) in sections" :key="i" class="doc-section">
|
||||
<h2 class="doc-section-title">{{ section.title }}</h2>
|
||||
<p v-if="section.content" class="doc-section-text">{{ section.content }}</p>
|
||||
|
||||
<table v-if="section.rows?.length" class="doc-table">
|
||||
<tbody>
|
||||
<tr v-for="(row, ri) in section.rows" :key="ri">
|
||||
<td class="doc-table-key"><code>{{ row[0] }}</code></td>
|
||||
<td>{{ row[1] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.doc-content {
|
||||
max-width: 720px;
|
||||
width: 100%;
|
||||
padding: 40px 32px 80px;
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
padding: 24px 16px 60px;
|
||||
}
|
||||
}
|
||||
|
||||
.doc-title {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 16px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.doc-intro {
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.doc-section {
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
.doc-section-title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 12px;
|
||||
color: var(--text-primary);
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid var(--border-light);
|
||||
}
|
||||
|
||||
.doc-section-text {
|
||||
font-size: 15px;
|
||||
line-height: 1.7;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.doc-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 12px;
|
||||
|
||||
tr {
|
||||
border-bottom: 1px solid var(--border-light);
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
.doc-table-key {
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
font-weight: 500;
|
||||
|
||||
code {
|
||||
background: var(--bg-secondary);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,85 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
const { t } = useI18n()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const pages = [
|
||||
{ key: 'gettingStarted', name: 'docs.getting-started' },
|
||||
{ key: 'configuration', name: 'docs.configuration' },
|
||||
{ key: 'features', name: 'docs.features' },
|
||||
{ key: 'platforms', name: 'docs.platforms' },
|
||||
{ key: 'api', name: 'docs.api' },
|
||||
]
|
||||
|
||||
function isActive(name: string) {
|
||||
return route.name === name
|
||||
}
|
||||
|
||||
function navigate(name: string) {
|
||||
router.push({ name })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside class="doc-sidebar">
|
||||
<nav class="sidebar-nav">
|
||||
<a
|
||||
v-for="p in pages"
|
||||
:key="p.key"
|
||||
class="sidebar-link"
|
||||
:class="{ active: isActive(p.name) }"
|
||||
@click.prevent="navigate(p.name)"
|
||||
>
|
||||
{{ t(`docs.sidebar.${p.key}`) }}
|
||||
</a>
|
||||
</nav>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.doc-sidebar {
|
||||
width: 240px;
|
||||
flex-shrink: 0;
|
||||
border-right: 1px solid var(--border-color);
|
||||
padding: 24px 0;
|
||||
position: sticky;
|
||||
top: 60px;
|
||||
height: calc(100vh - 60px);
|
||||
overflow-y: auto;
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.sidebar-link {
|
||||
display: block;
|
||||
padding: 8px 12px;
|
||||
border-radius: $radius-sm;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: var(--text-primary);
|
||||
background: var(--bg-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,110 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useScrollReveal } from '@/composables/useScrollReveal'
|
||||
|
||||
const { t } = useI18n()
|
||||
useScrollReveal()
|
||||
|
||||
const features = [
|
||||
{ key: 'streaming', icon: 'M13 2L3 14h9l-1 8 10-12h-9l1-8z' },
|
||||
{ key: 'platforms', icon: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z' },
|
||||
{ key: 'multiModel', icon: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 14l-4-4h8l-4 4z' },
|
||||
{ key: 'groupChat', icon: 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm14 10v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75' },
|
||||
{ key: 'kanban', icon: 'M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z' },
|
||||
{ key: 'analytics', icon: 'M18 20V10M12 20V4M6 20v-6' },
|
||||
{ key: 'profiles', icon: 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z' },
|
||||
{ key: 'files', icon: 'M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z' },
|
||||
{ key: 'terminal', icon: 'M4 17l6-6-6-6M12 19h8' },
|
||||
{ key: 'quickInstall', icon: 'M13 2L3 14h9l-1 8 10-12h-9l1-8z' },
|
||||
{ key: 'i18n', icon: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 17.93a8 8 0 0 1 0-15.86M12 2a15 15 0 0 1 4 10 15 15 0 0 1-4 10M2 12h20' },
|
||||
{ key: 'theme', icon: 'M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z' },
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="section">
|
||||
<h2 class="section-title reveal">{{ t('features.title') }}</h2>
|
||||
<p class="section-desc reveal">{{ t('features.desc') }}</p>
|
||||
<div class="features-grid">
|
||||
<div
|
||||
v-for="(f, i) in features"
|
||||
:key="f.key"
|
||||
class="feature-card reveal"
|
||||
:class="[`reveal-delay-${(i % 4) + 1}`]"
|
||||
>
|
||||
<div class="feature-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path :d="f.icon" />
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="feature-title">{{ t(`features.${f.key}.title`) }}</h3>
|
||||
<p class="feature-desc">{{ t(`features.${f.key}.desc`) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 20px;
|
||||
|
||||
@media (max-width: 900px) {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
padding: 28px 24px;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-md;
|
||||
transition: all $transition-normal;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--text-muted);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: $radius-sm;
|
||||
margin-bottom: 16px;
|
||||
color: var(--accent-primary);
|
||||
transition: background $transition-normal;
|
||||
|
||||
.feature-card:hover & {
|
||||
background: var(--border-color);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.feature-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.feature-desc {
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,293 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
const copied = ref(false)
|
||||
const canvasRef = ref<HTMLCanvasElement>()
|
||||
|
||||
const installCmd = 'npm install -g hermes-web-ui'
|
||||
|
||||
async function copyCmd() {
|
||||
try {
|
||||
await navigator.clipboard.writeText(installCmd)
|
||||
copied.value = true
|
||||
setTimeout(() => { copied.value = false }, 2000)
|
||||
} catch {}
|
||||
}
|
||||
|
||||
// ─── Particle network animation ──────────────────────────
|
||||
|
||||
interface Particle {
|
||||
x: number
|
||||
y: number
|
||||
vx: number
|
||||
vy: number
|
||||
r: number
|
||||
}
|
||||
|
||||
let animId = 0
|
||||
let particles: Particle[] = []
|
||||
|
||||
function initCanvas() {
|
||||
const canvas = canvasRef.value
|
||||
if (!canvas) return
|
||||
|
||||
const ctx = canvas.getContext('2d')!
|
||||
const dpr = window.devicePixelRatio || 1
|
||||
|
||||
function resize() {
|
||||
const el = canvasRef.value
|
||||
if (!el || !el.parentElement) return
|
||||
const rect = el.parentElement.getBoundingClientRect()
|
||||
el.width = rect.width * dpr
|
||||
el.height = rect.height * dpr
|
||||
el.style.width = rect.width + 'px'
|
||||
el.style.height = rect.height + 'px'
|
||||
ctx.setTransform(dpr, 0, 0, dpr, 0, 0)
|
||||
}
|
||||
|
||||
resize()
|
||||
|
||||
const count = Math.min(60, Math.floor((canvas.width / dpr) / 18))
|
||||
const w = canvas.width / dpr
|
||||
const h = canvas.height / dpr
|
||||
|
||||
particles = Array.from({ length: count }, () => ({
|
||||
x: Math.random() * w,
|
||||
y: Math.random() * h,
|
||||
vx: (Math.random() - 0.5) * 0.4,
|
||||
vy: (Math.random() - 0.5) * 0.4,
|
||||
r: Math.random() * 1.5 + 0.5,
|
||||
}))
|
||||
|
||||
const maxDist = 120
|
||||
|
||||
function draw() {
|
||||
const dark = document.documentElement.classList.contains('dark')
|
||||
const dotColor = dark ? 'rgba(224,224,224,' : 'rgba(51,51,51,'
|
||||
const lineColor = dark ? 'rgba(224,224,224,' : 'rgba(51,51,51,'
|
||||
|
||||
ctx.clearRect(0, 0, w, h)
|
||||
|
||||
// Update & draw particles
|
||||
for (const p of particles) {
|
||||
p.x += p.vx
|
||||
p.y += p.vy
|
||||
if (p.x < 0 || p.x > w) p.vx *= -1
|
||||
if (p.y < 0 || p.y > h) p.vy *= -1
|
||||
|
||||
ctx.beginPath()
|
||||
ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2)
|
||||
ctx.fillStyle = dotColor + '0.6)'
|
||||
ctx.fill()
|
||||
}
|
||||
|
||||
// Draw connections
|
||||
for (let i = 0; i < particles.length; i++) {
|
||||
for (let j = i + 1; j < particles.length; j++) {
|
||||
const dx = particles[i].x - particles[j].x
|
||||
const dy = particles[i].y - particles[j].y
|
||||
const dist = Math.sqrt(dx * dx + dy * dy)
|
||||
if (dist < maxDist) {
|
||||
const alpha = (1 - dist / maxDist) * 0.15
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(particles[i].x, particles[i].y)
|
||||
ctx.lineTo(particles[j].x, particles[j].y)
|
||||
ctx.strokeStyle = lineColor + alpha + ')'
|
||||
ctx.lineWidth = 0.5
|
||||
ctx.stroke()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
animId = requestAnimationFrame(draw)
|
||||
}
|
||||
|
||||
draw()
|
||||
|
||||
const onResize = () => {
|
||||
cancelAnimationFrame(animId)
|
||||
initCanvas()
|
||||
}
|
||||
window.addEventListener('resize', onResize)
|
||||
|
||||
onUnmounted(() => {
|
||||
cancelAnimationFrame(animId)
|
||||
window.removeEventListener('resize', onResize)
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
initCanvas()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="hero">
|
||||
<canvas ref="canvasRef" class="hero-canvas" />
|
||||
<div class="hero-inner">
|
||||
<h1 class="hero-title animate-fade-in-up">{{ t('hero.title') }}</h1>
|
||||
<p class="hero-subtitle animate-fade-in-up animate-delay-1">{{ t('hero.subtitle') }}</p>
|
||||
<div class="hero-actions animate-fade-in-up animate-delay-2">
|
||||
<button class="btn-primary" @click="router.push({ name: 'docs.getting-started' })">
|
||||
{{ t('hero.cta') }}
|
||||
</button>
|
||||
<a
|
||||
class="btn-outline"
|
||||
href="https://github.com/EKKOLearnAI/hermes-web-ui"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" class="btn-icon">
|
||||
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
||||
</svg>
|
||||
{{ t('hero.viewGithub') }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="install-box animate-fade-in animate-delay-3">
|
||||
<code>{{ installCmd }}</code>
|
||||
<button class="copy-btn" @click="copyCmd">
|
||||
{{ copied ? 'Copied!' : 'Copy' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.hero {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 120px 24px 80px;
|
||||
text-align: center;
|
||||
background: var(--bg-primary);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
padding: 80px 16px 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-canvas {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hero-inner {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
font-size: 48px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 20px;
|
||||
color: var(--text-primary);
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-subtitle {
|
||||
font-size: 18px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 36px;
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 36px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
padding: 12px 28px;
|
||||
background: var(--accent-primary);
|
||||
color: var(--text-on-accent);
|
||||
border: none;
|
||||
border-radius: $radius-md;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background $transition-fast, transform $transition-fast;
|
||||
|
||||
&:hover {
|
||||
background: var(--accent-hover);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 28px;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-md;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--text-muted);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.install-box {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-md;
|
||||
padding: 12px 20px;
|
||||
|
||||
code {
|
||||
font-size: 14px;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
padding: 4px 12px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-sm;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,138 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { ref } from 'vue'
|
||||
import { useScrollReveal } from '@/composables/useScrollReveal'
|
||||
|
||||
const { t } = useI18n()
|
||||
useScrollReveal()
|
||||
const activeTab = ref<'npm' | 'docker' | 'source'>('npm')
|
||||
|
||||
function copyText(text: string) {
|
||||
navigator.clipboard.writeText(text).catch(() => {})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="install-panel">
|
||||
<h2 class="panel-title reveal">{{ t('install.title') }}</h2>
|
||||
<p class="panel-desc reveal">{{ t('install.desc') }}</p>
|
||||
|
||||
<div class="install-tabs reveal">
|
||||
<button
|
||||
v-for="tab in (['npm', 'docker', 'source'] as const)"
|
||||
:key="tab"
|
||||
class="tab-btn"
|
||||
:class="{ active: activeTab === tab }"
|
||||
@click="activeTab = tab"
|
||||
>
|
||||
{{ t(`install.${tab}.title`) }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="install-content reveal reveal-delay-1">
|
||||
<template v-if="activeTab === 'npm'">
|
||||
<div class="code-block" @click="copyText(t('install.npm.cmd1'))">
|
||||
<code>{{ t('install.npm.cmd1') }}</code>
|
||||
</div>
|
||||
<div class="code-block" @click="copyText(t('install.npm.cmd2'))">
|
||||
<code>{{ t('install.npm.cmd2') }}</code>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="activeTab === 'docker'">
|
||||
<div class="code-block" @click="copyText(t('install.docker.cmd'))">
|
||||
<code>{{ t('install.docker.cmd') }}</code>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="code-block" @click="copyText(t('install.source.cmd1'))">
|
||||
<code>{{ t('install.source.cmd1') }}</code>
|
||||
</div>
|
||||
<div class="code-block" @click="copyText(t('install.source.cmd2'))">
|
||||
<code>{{ t('install.source.cmd2') }}</code>
|
||||
</div>
|
||||
</template>
|
||||
<p class="prereq">{{ t('install.prereq') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.install-panel {
|
||||
padding: 40px 32px;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-lg;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.panel-desc {
|
||||
color: var(--text-secondary);
|
||||
font-size: 15px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.install-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 20px;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: $radius-md;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
flex: 1;
|
||||
padding: 8px 16px;
|
||||
border: none;
|
||||
border-radius: $radius-sm;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all $transition-fast;
|
||||
white-space: nowrap;
|
||||
|
||||
&.active {
|
||||
background: var(--bg-card);
|
||||
color: var(--text-primary);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
.install-content {
|
||||
// full width within panel
|
||||
}
|
||||
|
||||
.code-block {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-sm;
|
||||
padding: 14px 18px;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
transition: border-color $transition-fast;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 14px;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.prereq {
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const platforms = [
|
||||
{ key: 'telegram', icon: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69.01-.03.01-.14-.07-.2-.08-.06-.19-.04-.27-.02-.12.02-1.96 1.25-5.54 3.67-.52.36-1 .53-1.42.52-.47-.01-1.37-.26-2.03-.48-.82-.27-1.47-.42-1.42-.88.03-.24.37-.49 1.02-.75 3.99-1.74 6.65-2.89 7.99-3.44 3.81-1.58 4.6-1.86 5.12-1.87.11 0 .37.03.54.17.14.12.18.28.2.45-.01.06.01.24 0 .38z' },
|
||||
{ key: 'discord', icon: 'M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03z' },
|
||||
{ key: 'slack', icon: 'M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z' },
|
||||
{ key: 'whatsapp', icon: 'M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z' },
|
||||
{ key: 'matrix', icon: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 3a7 7 0 0 1 7 7h-2a5 5 0 0 0-5-5V5z' },
|
||||
{ key: 'feishu', icon: 'M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5' },
|
||||
{ key: 'wechat', icon: 'M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18z' },
|
||||
{ key: 'wecom', icon: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z' },
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="platforms-section">
|
||||
<div class="section-inner">
|
||||
<h2 class="section-title">{{ t('platforms.title') }}</h2>
|
||||
<p class="section-desc">{{ t('platforms.desc') }}</p>
|
||||
<div class="platforms-grid">
|
||||
<div v-for="p in platforms" :key="p.key" class="platform-item">
|
||||
<div class="platform-icon">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path :d="p.icon" />
|
||||
</svg>
|
||||
</div>
|
||||
<span class="platform-name">{{ t(`platforms.${p.key}`) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.platforms-section {
|
||||
background: var(--bg-secondary);
|
||||
border-top: 1px solid var(--border-color);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.section-inner {
|
||||
max-width: 1120px;
|
||||
margin: 0 auto;
|
||||
padding: 80px 24px;
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
padding: 48px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.platforms-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.platform-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.platform-icon {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-md;
|
||||
color: var(--text-primary);
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.platform-name {
|
||||
font-size: 13px;
|
||||
color: var(--text-secondary);
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,252 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
import { useScrollReveal } from '@/composables/useScrollReveal'
|
||||
|
||||
useScrollReveal()
|
||||
|
||||
const images = [
|
||||
{ src: '/image1.png', alt: 'AI Chat with Image Generation' },
|
||||
{ src: '/image2.png', alt: 'Chat and File Browser' },
|
||||
{ src: '/image3.png', alt: 'Multi-panel Workspace' },
|
||||
{ src: '/image4.png', alt: 'Kanban Board' },
|
||||
]
|
||||
|
||||
const activeIndex = ref(0)
|
||||
let timer: ReturnType<typeof setInterval>
|
||||
|
||||
function next() {
|
||||
activeIndex.value = (activeIndex.value + 1) % images.length
|
||||
}
|
||||
|
||||
function prev() {
|
||||
activeIndex.value = (activeIndex.value - 1 + images.length) % images.length
|
||||
}
|
||||
|
||||
function setActive(i: number) {
|
||||
activeIndex.value = i
|
||||
resetTimer()
|
||||
}
|
||||
|
||||
function resetTimer() {
|
||||
clearInterval(timer)
|
||||
timer = setInterval(next, 5000)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
timer = setInterval(next, 5000)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="screenshots-section">
|
||||
<div class="screenshots-inner reveal">
|
||||
<!-- Browser frame mockup -->
|
||||
<div class="browser-frame">
|
||||
<div class="browser-bar">
|
||||
<div class="browser-dots">
|
||||
<span class="dot red" />
|
||||
<span class="dot yellow" />
|
||||
<span class="dot green" />
|
||||
</div>
|
||||
<div class="browser-url">
|
||||
<span>http://localhost:8648</span>
|
||||
</div>
|
||||
<div class="browser-spacer" />
|
||||
</div>
|
||||
<div class="browser-viewport">
|
||||
<transition name="slide" mode="out-in">
|
||||
<img
|
||||
:key="activeIndex"
|
||||
:src="images[activeIndex].src"
|
||||
:alt="images[activeIndex].alt"
|
||||
class="screenshot-img"
|
||||
/>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Navigation -->
|
||||
<div class="screenshot-nav">
|
||||
<button class="nav-arrow" @click="prev(); resetTimer()">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6" /></svg>
|
||||
</button>
|
||||
|
||||
<div class="screenshot-dots">
|
||||
<button
|
||||
v-for="(_img, i) in images"
|
||||
:key="i"
|
||||
class="dot-btn"
|
||||
:class="{ active: activeIndex === i }"
|
||||
@click="setActive(i)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button class="nav-arrow" @click="next(); resetTimer()">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.screenshots-section {
|
||||
padding: 0 24px;
|
||||
margin-top: 48px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.screenshots-inner {
|
||||
max-width: 920px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
// ─── Browser Frame ──────────────────────────
|
||||
|
||||
.browser-frame {
|
||||
border-radius: $radius-lg;
|
||||
border: 1px solid var(--border-color);
|
||||
overflow: hidden;
|
||||
background: var(--bg-secondary);
|
||||
box-shadow:
|
||||
0 4px 16px rgba(0, 0, 0, 0.06),
|
||||
0 20px 60px rgba(0, 0, 0, 0.08);
|
||||
transition: transform 0.4s ease, box-shadow 0.4s ease;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow:
|
||||
0 8px 24px rgba(0, 0, 0, 0.08),
|
||||
0 32px 80px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
.browser-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 14px;
|
||||
gap: 12px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
background: var(--bg-card);
|
||||
}
|
||||
|
||||
.browser-dots {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
|
||||
&.red { background: #ff5f57; }
|
||||
&.yellow { background: #febc2e; }
|
||||
&.green { background: #28c840; }
|
||||
}
|
||||
|
||||
.browser-url {
|
||||
flex: 1;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 4px;
|
||||
padding: 4px 12px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
font-family: $font-code;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.browser-spacer {
|
||||
width: 52px;
|
||||
}
|
||||
|
||||
.browser-viewport {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.screenshot-img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
// ─── Slide Transition ───────────────────────
|
||||
|
||||
.slide-enter-active,
|
||||
.slide-leave-active {
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.slide-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateX(24px);
|
||||
}
|
||||
|
||||
.slide-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(-24px);
|
||||
}
|
||||
|
||||
// ─── Navigation ─────────────────────────────
|
||||
|
||||
.screenshot-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.nav-arrow {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--border-color);
|
||||
background: var(--bg-card);
|
||||
color: var(--text-secondary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.screenshot-dots {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.dot-btn {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: var(--border-color);
|
||||
cursor: pointer;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&.active {
|
||||
background: var(--accent-primary);
|
||||
transform: scale(1.3);
|
||||
}
|
||||
|
||||
&:hover:not(.active) {
|
||||
background: var(--text-muted);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,166 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useScrollReveal } from '@/composables/useScrollReveal'
|
||||
import { useTheme } from '@/composables/useTheme'
|
||||
|
||||
const { t } = useI18n()
|
||||
const { isDark } = useTheme()
|
||||
useScrollReveal()
|
||||
|
||||
const stars = ref<number | null>(null)
|
||||
|
||||
const chartSrc = computed(() => {
|
||||
const base = 'https://api.star-history.com/svg?repos=EKKOLearnAI%2Fhermes-web-ui&type=Date'
|
||||
return isDark.value ? `${base}&theme=dark` : base
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const res = await fetch('https://api.github.com/repos/EKKOLearnAI/hermes-web-ui')
|
||||
const data = await res.json()
|
||||
stars.value = data.stargazers_count
|
||||
} catch {}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="star-panel">
|
||||
<h2 class="panel-title reveal">{{ t('starHistory.title') }}</h2>
|
||||
<p class="panel-desc reveal">{{ t('starHistory.desc') }}</p>
|
||||
|
||||
<div class="star-badges reveal reveal-delay-1">
|
||||
<a
|
||||
class="star-btn"
|
||||
href="https://github.com/EKKOLearnAI/hermes-web-ui"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" class="star-icon">
|
||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
|
||||
</svg>
|
||||
<span>Star</span>
|
||||
<span v-if="stars !== null" class="star-count">{{ stars.toLocaleString() }}</span>
|
||||
</a>
|
||||
|
||||
<img
|
||||
class="github-badge"
|
||||
src="https://img.shields.io/github/license/EKKOLearnAI/hermes-web-ui?style=flat-square"
|
||||
alt="License"
|
||||
/>
|
||||
<img
|
||||
class="github-badge"
|
||||
src="https://img.shields.io/github/v/release/EKKOLearnAI/hermes-web-ui?style=flat-square"
|
||||
alt="Version"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="star-chart reveal reveal-delay-2">
|
||||
<a
|
||||
href="https://www.star-history.com/?type=date&repos=EKKOLearnAI%2Fhermes-web-ui"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="chart-link"
|
||||
>
|
||||
<img
|
||||
:src="chartSrc"
|
||||
alt="Star History"
|
||||
class="chart-img"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.star-panel {
|
||||
padding: 40px 32px;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-lg;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.panel-desc {
|
||||
color: var(--text-secondary);
|
||||
font-size: 15px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.star-badges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.star-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-md;
|
||||
text-decoration: none;
|
||||
color: var(--text-primary);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.star-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: var(--text-muted);
|
||||
}
|
||||
|
||||
.star-count {
|
||||
padding: 1px 8px;
|
||||
background: var(--bg-secondary);
|
||||
border-left: 1px solid var(--border-color);
|
||||
border-radius: 0 $radius-sm $radius-sm 0;
|
||||
margin-left: 2px;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.github-badge {
|
||||
height: 22px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.star-chart {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.chart-link {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chart-img {
|
||||
width: 100%;
|
||||
border-radius: $radius-sm;
|
||||
transition: opacity $transition-fast;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,110 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<footer class="site-footer">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-left">
|
||||
<div class="footer-brand">
|
||||
<img src="/logo.png" alt="Hermes" class="footer-logo" />
|
||||
<span>Hermes Web UI</span>
|
||||
</div>
|
||||
<p class="footer-desc">{{ t('footer.description') }}</p>
|
||||
</div>
|
||||
<div class="footer-right">
|
||||
<p class="footer-meta">{{ t('footer.madeWith') }}</p>
|
||||
<p class="footer-meta">{{ t('footer.license') }}</p>
|
||||
<a
|
||||
class="footer-github"
|
||||
href="https://github.com/EKKOLearnAI/hermes-web-ui"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.site-footer {
|
||||
border-top: 1px solid var(--border-color);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
max-width: 1120px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 40px;
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.footer-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.footer-logo {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: $radius-sm;
|
||||
}
|
||||
|
||||
.footer-desc {
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.footer-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 6px;
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-meta {
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.footer-github {
|
||||
color: var(--text-muted);
|
||||
transition: color $transition-fast;
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,257 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useTheme } from '@/composables/useTheme'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
const router = useRouter()
|
||||
const { isDark, toggleTheme } = useTheme()
|
||||
const mobileMenuOpen = ref(false)
|
||||
|
||||
function switchLocale() {
|
||||
const next = locale.value === 'en' ? 'zh' : 'en'
|
||||
locale.value = next
|
||||
localStorage.setItem('hermes_website_locale', next)
|
||||
}
|
||||
|
||||
function navigateTo(name: string) {
|
||||
router.push({ name })
|
||||
mobileMenuOpen.value = false
|
||||
}
|
||||
|
||||
function goHome() {
|
||||
router.push({ name: 'landing' })
|
||||
mobileMenuOpen.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header class="site-header">
|
||||
<div class="header-inner">
|
||||
<div class="header-left" @click="goHome">
|
||||
<img src="/logo.png" alt="Hermes" class="logo-icon" />
|
||||
<span class="logo-text">Hermes Web UI</span>
|
||||
</div>
|
||||
|
||||
<nav class="header-nav">
|
||||
<a class="nav-link" @click.prevent="navigateTo('landing')">{{ t('nav.home') }}</a>
|
||||
<a class="nav-link" @click.prevent="navigateTo('docs.getting-started')">{{ t('nav.docs') }}</a>
|
||||
<a
|
||||
class="nav-link"
|
||||
href="https://github.com/EKKOLearnAI/hermes-web-ui"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
{{ t('nav.github') }}
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="external-icon">
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
||||
<polyline points="15 3 21 3 21 9" />
|
||||
<line x1="10" y1="14" x2="21" y2="3" />
|
||||
</svg>
|
||||
</a>
|
||||
<button class="icon-btn" @click="switchLocale" :title="locale === 'en' ? '中文' : 'English'">
|
||||
{{ locale === 'en' ? '中' : 'EN' }}
|
||||
</button>
|
||||
<button class="icon-btn" @click="toggleTheme" :title="isDark ? 'Light' : 'Dark'">
|
||||
<svg v-if="isDark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="5" />
|
||||
<line x1="12" y1="1" x2="12" y2="3" />
|
||||
<line x1="12" y1="21" x2="12" y2="23" />
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||
<line x1="1" y1="12" x2="3" y2="12" />
|
||||
<line x1="21" y1="12" x2="23" y2="12" />
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||
</svg>
|
||||
<svg v-else viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
|
||||
</svg>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<button class="mobile-toggle" @click="mobileMenuOpen = !mobileMenuOpen">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<line x1="3" y1="6" x2="21" y2="6" />
|
||||
<line x1="3" y1="12" x2="21" y2="12" />
|
||||
<line x1="3" y1="18" x2="21" y2="18" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="mobileMenuOpen" class="mobile-menu" @click="mobileMenuOpen = false">
|
||||
<div class="mobile-menu-inner" @click.stop>
|
||||
<a class="mobile-link" @click.prevent="navigateTo('landing')">{{ t('nav.home') }}</a>
|
||||
<a class="mobile-link" @click.prevent="navigateTo('docs.getting-started')">{{ t('nav.docs') }}</a>
|
||||
<a class="mobile-link" href="https://github.com/EKKOLearnAI/hermes-web-ui" target="_blank" rel="noopener">{{ t('nav.github') }}</a>
|
||||
<div class="mobile-actions">
|
||||
<button class="icon-btn" @click="switchLocale">{{ locale === 'en' ? '中文' : 'English' }}</button>
|
||||
<button class="icon-btn" @click="toggleTheme">{{ isDark ? 'Light Mode' : 'Dark Mode' }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: var(--bg-card);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
max-width: 1120px;
|
||||
margin: 0 auto;
|
||||
padding: 0 24px;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color: var(--text-primary);
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.logo-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: $radius-sm;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding: 6px 14px;
|
||||
border-radius: $radius-sm;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: all $transition-fast;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.external-icon {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.icon-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: $radius-sm;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
transition: all $transition-fast;
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
border-color: var(--text-muted);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-toggle {
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-menu {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
top: 60px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.mobile-menu-inner {
|
||||
background: var(--bg-card);
|
||||
padding: 16px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.mobile-link {
|
||||
padding: 12px 0;
|
||||
color: var(--text-secondary);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid var(--border-light);
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: $breakpoint-mobile) {
|
||||
.header-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-toggle {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user