mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-24 08:33:26 +00:00
fix(www): redirect root to docs (#44276)
This commit is contained in:
parent
917051a881
commit
9a716609c6
3 changed files with 13 additions and 156 deletions
|
|
@ -1,26 +0,0 @@
|
|||
---
|
||||
import "../styles/site.css"
|
||||
|
||||
interface Props {
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
const title = Astro.props.title ?? "OpenCode"
|
||||
const description = Astro.props.description ?? "The open source AI coding agent."
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content={description} />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<link rel="icon" type="image/svg+xml" href={`${import.meta.env.BASE_URL}favicon.svg`} />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,27 +1,17 @@
|
|||
---
|
||||
import SiteLayout from "../layouts/SiteLayout.astro"
|
||||
|
||||
export const prerender = true
|
||||
const destination = `${import.meta.env.BASE_URL}docs`
|
||||
---
|
||||
|
||||
<SiteLayout>
|
||||
<header class="site-header">
|
||||
<a href={import.meta.env.BASE_URL} aria-label="OpenCode home">
|
||||
<img src={`${import.meta.env.BASE_URL}assets/logo-dark.svg`} alt="OpenCode" />
|
||||
</a>
|
||||
<nav aria-label="Primary">
|
||||
<a href={`${import.meta.env.BASE_URL}docs/`}>Docs</a>
|
||||
<a href="https://github.com/anomalyco/opencode">GitHub</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<p class="eyebrow">OpenCode 2</p>
|
||||
<h1>The open source AI coding agent.</h1>
|
||||
<p class="lede">Build with it in your terminal, connect over the API, or embed the complete agent stack.</p>
|
||||
<div class="actions">
|
||||
<a class="primary" href={`${import.meta.env.BASE_URL}docs/`}>Read the docs</a>
|
||||
<a href="https://github.com/anomalyco/opencode">View on GitHub</a>
|
||||
</div>
|
||||
<pre><code>curl -fsSL https://opencode.ai{import.meta.env.BASE_URL}install | bash</code></pre>
|
||||
</main>
|
||||
</SiteLayout>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content={`0; url=${destination}`} />
|
||||
<link rel="canonical" href={destination} />
|
||||
<title>OpenCode Docs</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href={destination}>Continue to the OpenCode docs</a>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,107 +0,0 @@
|
|||
:root {
|
||||
color-scheme: dark;
|
||||
background: #000;
|
||||
color: #ededed;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
display: flex;
|
||||
width: min(100% - 2rem, 72rem);
|
||||
height: 4rem;
|
||||
margin-inline: auto;
|
||||
border-bottom: 1px solid #303030;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.site-header img {
|
||||
display: block;
|
||||
width: 8rem;
|
||||
}
|
||||
|
||||
.site-header nav {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
main {
|
||||
width: min(100% - 2rem, 72rem);
|
||||
margin-inline: auto;
|
||||
padding-block: clamp(5rem, 14vw, 10rem);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 1.5rem;
|
||||
color: #929292;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1 {
|
||||
max-width: 12ch;
|
||||
margin: 0;
|
||||
font-size: clamp(3rem, 9vw, 7.5rem);
|
||||
line-height: 0.95;
|
||||
letter-spacing: -0.07em;
|
||||
}
|
||||
|
||||
.lede {
|
||||
max-width: 40rem;
|
||||
margin: 2rem 0 0;
|
||||
color: #b8b8b8;
|
||||
font-size: clamp(1rem, 2vw, 1.25rem);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
margin-top: 2.5rem;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.actions .primary {
|
||||
padding: 0.75rem 1rem;
|
||||
background: #ededed;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
pre {
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
margin: 5rem 0 0;
|
||||
padding: 1rem;
|
||||
border: 1px solid #303030;
|
||||
font: inherit;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 36rem) {
|
||||
.actions {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue