mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
wip: hero and nav updates
This commit is contained in:
parent
380d2c466e
commit
1b4975ba54
8 changed files with 83 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ const fetchSvgContent = async (svgPath: string): Promise<string> => {
|
|||
}
|
||||
}
|
||||
|
||||
export function Header(props: { zen?: boolean }) {
|
||||
export function Header(props: { zen?: boolean; hideGetStarted?: boolean }) {
|
||||
const navigate = useNavigate()
|
||||
const githubData = createAsync(() => github())
|
||||
const starCount = createMemo(() =>
|
||||
|
|
@ -169,6 +169,13 @@ export function Header(props: { zen?: boolean }) {
|
|||
</Match>
|
||||
</Switch>
|
||||
</li>
|
||||
<Show when={!props.hideGetStarted}>
|
||||
<li>
|
||||
<A href="/download" data-slot="cta-button">
|
||||
Get started
|
||||
</A>
|
||||
</li>
|
||||
</Show>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav data-component="nav-mobile">
|
||||
|
|
@ -243,6 +250,13 @@ export function Header(props: { zen?: boolean }) {
|
|||
</Match>
|
||||
</Switch>
|
||||
</li>
|
||||
<Show when={!props.hideGetStarted}>
|
||||
<li>
|
||||
<A href="/download" data-slot="cta-button">
|
||||
Get started
|
||||
</A>
|
||||
</li>
|
||||
</Show>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 48px;
|
||||
li {
|
||||
display: inline-block;
|
||||
|
|
@ -98,6 +99,18 @@
|
|||
text-underline-offset: 2px;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
[data-slot="cta-button"] {
|
||||
background: var(--color-background-strong);
|
||||
color: var(--color-text-inverted);
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
}
|
||||
[data-slot="cta-button"]:hover {
|
||||
background: var(--color-background-strong-hover);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 48px;
|
||||
li {
|
||||
display: inline-block;
|
||||
|
|
@ -98,6 +99,18 @@
|
|||
text-underline-offset: 2px;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
[data-slot="cta-button"] {
|
||||
background: var(--color-background-strong);
|
||||
color: var(--color-text-inverted);
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
}
|
||||
[data-slot="cta-button"]:hover {
|
||||
background: var(--color-background-strong-hover);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default function Download() {
|
|||
<Link rel="canonical" href={`${config.baseUrl}/download`} />
|
||||
<Meta name="description" content="Download OpenCode for macOS, Windows, and Linux" />
|
||||
<div data-component="container">
|
||||
<Header />
|
||||
<Header hideGetStarted />
|
||||
|
||||
<div data-component="content">
|
||||
<section data-component="download-hero">
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 48px;
|
||||
li {
|
||||
display: inline-block;
|
||||
|
|
@ -98,6 +99,18 @@
|
|||
text-underline-offset: 2px;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
[data-slot="cta-button"] {
|
||||
background: var(--color-background-strong);
|
||||
color: var(--color-text-inverted);
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
}
|
||||
[data-slot="cta-button"]:hover {
|
||||
background: var(--color-background-strong-hover);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ body {
|
|||
ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 48px;
|
||||
li {
|
||||
display: inline-block;
|
||||
|
|
@ -239,6 +240,18 @@ body {
|
|||
text-underline-offset: var(--space-1);
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
[data-slot="cta-button"] {
|
||||
background: var(--color-background-strong);
|
||||
color: var(--color-text-inverted);
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
}
|
||||
[data-slot="cta-button"]:hover {
|
||||
background: var(--color-background-strong-hover);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -436,7 +449,7 @@ body {
|
|||
cursor: pointer;
|
||||
align-items: center;
|
||||
color: var(--color-text);
|
||||
gap: var(--space-1);
|
||||
gap: 16px;
|
||||
color: var(--color-text);
|
||||
padding: 8px 16px 8px 8px;
|
||||
border-radius: 4px;
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ body {
|
|||
ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 48px;
|
||||
li {
|
||||
display: inline-block;
|
||||
|
|
@ -161,6 +162,18 @@ body {
|
|||
text-underline-offset: var(--space-1);
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
[data-slot="cta-button"] {
|
||||
background: var(--color-background-strong);
|
||||
color: var(--color-text-inverted);
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
}
|
||||
[data-slot="cta-button"]:hover {
|
||||
background: var(--color-background-strong-hover);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default function Home() {
|
|||
<Meta name="opencode:auth" content={loggedin() ? "true" : "false"} />
|
||||
|
||||
<div data-component="container">
|
||||
<Header zen />
|
||||
<Header zen hideGetStarted />
|
||||
|
||||
<div data-component="content">
|
||||
<section data-component="hero">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue