mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 10:18:46 +03:00
fix(console): polish Go plan cards and audience switch (#60345)
This commit is contained in:
committed by
GitHub
Unverified
parent
085d6f7b4b
commit
3c55eddd51
@@ -213,7 +213,7 @@ export const dict = {
|
||||
"go.plans.individuals": "الأفراد",
|
||||
"go.plans.teams": "الفرق",
|
||||
"go.plans.month": "شهريًا",
|
||||
"go.plans.memberMonth": "لكل عضو شهريًا",
|
||||
"go.plans.memberMonth": "لكل عضو\nشهريًا",
|
||||
"go.plans.plus.cta": "الاشتراك في Go Plus",
|
||||
"go.plans.plus.description": "تبلغ تكلفة Go Plus $40/شهر مع حدود استخدام أعلى.",
|
||||
"go.plans.teams.cta": "الاشتراك في Go Teams",
|
||||
|
||||
@@ -218,7 +218,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Indivíduos",
|
||||
"go.plans.teams": "Equipes",
|
||||
"go.plans.month": "por mês",
|
||||
"go.plans.memberMonth": "por membro por mês",
|
||||
"go.plans.memberMonth": "por membro\npor mês",
|
||||
"go.plans.plus.cta": "Assinar Go Plus",
|
||||
"go.plans.plus.description": "O Go Plus custa $40/mês e oferece limites maiores.",
|
||||
"go.plans.teams.cta": "Assinar Go Teams",
|
||||
|
||||
@@ -217,7 +217,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Enkeltpersoner",
|
||||
"go.plans.teams": "Teams",
|
||||
"go.plans.month": "om måneden",
|
||||
"go.plans.memberMonth": "pr. medlem om måneden",
|
||||
"go.plans.memberMonth": "pr. medlem\nom måneden",
|
||||
"go.plans.plus.cta": "Abonnér på Go Plus",
|
||||
"go.plans.plus.description": "Go Plus koster $40/måned og giver højere brugsgrænser.",
|
||||
"go.plans.teams.cta": "Abonnér på Go Teams",
|
||||
|
||||
@@ -219,7 +219,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Einzelpersonen",
|
||||
"go.plans.teams": "Teams",
|
||||
"go.plans.month": "pro Monat",
|
||||
"go.plans.memberMonth": "pro Mitglied und Monat",
|
||||
"go.plans.memberMonth": "pro Mitglied\nund Monat",
|
||||
"go.plans.plus.cta": "Go Plus abonnieren",
|
||||
"go.plans.plus.description": "Go Plus kostet $40/Monat und bietet höhere Nutzungslimits.",
|
||||
"go.plans.teams.cta": "Go Teams abonnieren",
|
||||
|
||||
@@ -215,7 +215,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Individuals",
|
||||
"go.plans.teams": "Teams",
|
||||
"go.plans.month": "per month",
|
||||
"go.plans.memberMonth": "per member per month",
|
||||
"go.plans.memberMonth": "per member\nper month",
|
||||
"go.plans.plus.cta": "Subscribe to Go Plus",
|
||||
"go.plans.plus.description": "Go Plus costs $40/month with higher limits.",
|
||||
"go.plans.teams.cta": "Subscribe to Go Teams",
|
||||
@@ -227,7 +227,7 @@ export const dict = {
|
||||
"go.plans.plus.feature2": "Higher limits and fewer interruptions",
|
||||
"go.plans.plus.feature3": "Built for larger, demanding projects",
|
||||
"go.plans.teams.feature1": "Every member gets their own Go limits",
|
||||
"go.plans.teams.feature2": "Generous monthly limits for every model",
|
||||
"go.plans.teams.feature2": "Generous monthly limits for each model",
|
||||
"go.plans.teams.feature3": "One bill for the whole workspace",
|
||||
"go.plans.teams.feature4": "Extra usage with per-member budgets",
|
||||
"go.plans.teams.feature5": "Model privacy and region controls",
|
||||
|
||||
@@ -219,7 +219,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Individual",
|
||||
"go.plans.teams": "Equipos",
|
||||
"go.plans.month": "al mes",
|
||||
"go.plans.memberMonth": "por miembro al mes",
|
||||
"go.plans.memberMonth": "por miembro\nal mes",
|
||||
"go.plans.plus.cta": "Suscribirse a Go Plus",
|
||||
"go.plans.plus.description": "Go Plus cuesta 40 $/mes y ofrece límites más altos.",
|
||||
"go.plans.teams.cta": "Suscribirse a Go Teams",
|
||||
|
||||
@@ -222,7 +222,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Individuels",
|
||||
"go.plans.teams": "Équipes",
|
||||
"go.plans.month": "par mois",
|
||||
"go.plans.memberMonth": "par membre et par mois",
|
||||
"go.plans.memberMonth": "par membre\net par mois",
|
||||
"go.plans.plus.cta": "S'abonner à Go Plus",
|
||||
"go.plans.plus.description": "Go Plus coûte 40 $/mois et offre des limites plus élevées.",
|
||||
"go.plans.teams.cta": "S'abonner à Go Teams",
|
||||
|
||||
@@ -217,7 +217,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Singoli",
|
||||
"go.plans.teams": "Team",
|
||||
"go.plans.month": "al mese",
|
||||
"go.plans.memberMonth": "per membro al mese",
|
||||
"go.plans.memberMonth": "per membro\nal mese",
|
||||
"go.plans.plus.cta": "Abbonati a Go Plus",
|
||||
"go.plans.plus.description": "Go Plus costa $40/mese e offre limiti più alti.",
|
||||
"go.plans.teams.cta": "Abbonati a Go Teams",
|
||||
|
||||
@@ -216,7 +216,7 @@ export const dict = {
|
||||
"go.plans.individuals": "個人",
|
||||
"go.plans.teams": "チーム",
|
||||
"go.plans.month": "/月",
|
||||
"go.plans.memberMonth": "/メンバー/月",
|
||||
"go.plans.memberMonth": "/メンバー\n/月",
|
||||
"go.plans.plus.cta": "Go Plus に登録",
|
||||
"go.plans.plus.description": "Go Plus は月額$40で、より高い利用枠を提供します。",
|
||||
"go.plans.teams.cta": "Go Teams に登録",
|
||||
|
||||
@@ -212,7 +212,7 @@ export const dict = {
|
||||
"go.plans.individuals": "개인",
|
||||
"go.plans.teams": "팀",
|
||||
"go.plans.month": "/월",
|
||||
"go.plans.memberMonth": "/멤버/월",
|
||||
"go.plans.memberMonth": "/멤버\n/월",
|
||||
"go.plans.plus.cta": "Go Plus 구독하기",
|
||||
"go.plans.plus.description": "Go Plus는 월 $40로 더 높은 사용 한도를 제공합니다.",
|
||||
"go.plans.teams.cta": "Go Teams 구독하기",
|
||||
|
||||
@@ -217,7 +217,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Enkeltpersoner",
|
||||
"go.plans.teams": "Team",
|
||||
"go.plans.month": "per måned",
|
||||
"go.plans.memberMonth": "per medlem per måned",
|
||||
"go.plans.memberMonth": "per medlem\nper måned",
|
||||
"go.plans.plus.cta": "Abonner på Go Plus",
|
||||
"go.plans.plus.description": "Go Plus koster $40/måned og gir høyere bruksgrenser.",
|
||||
"go.plans.teams.cta": "Abonner på Go Teams",
|
||||
|
||||
@@ -217,7 +217,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Dla osób indywidualnych",
|
||||
"go.plans.teams": "Dla zespołów",
|
||||
"go.plans.month": "miesięcznie",
|
||||
"go.plans.memberMonth": "za członka miesięcznie",
|
||||
"go.plans.memberMonth": "za członka\nmiesięcznie",
|
||||
"go.plans.plus.cta": "Subskrybuj Go Plus",
|
||||
"go.plans.plus.description": "Go Plus kosztuje $40/miesiąc i oferuje wyższe limity.",
|
||||
"go.plans.teams.cta": "Subskrybuj Go Teams",
|
||||
|
||||
@@ -220,7 +220,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Для одного",
|
||||
"go.plans.teams": "Для команд",
|
||||
"go.plans.month": "в месяц",
|
||||
"go.plans.memberMonth": "за участника в месяц",
|
||||
"go.plans.memberMonth": "за участника\nв месяц",
|
||||
"go.plans.plus.cta": "Подписаться на Go Plus",
|
||||
"go.plans.plus.description": "Go Plus стоит $40/месяц и предлагает более высокие лимиты.",
|
||||
"go.plans.teams.cta": "Подписаться на Go Teams",
|
||||
|
||||
@@ -215,7 +215,7 @@ export const dict = {
|
||||
"go.plans.individuals": "บุคคลทั่วไป",
|
||||
"go.plans.teams": "ทีม",
|
||||
"go.plans.month": "ต่อเดือน",
|
||||
"go.plans.memberMonth": "ต่อสมาชิกต่อเดือน",
|
||||
"go.plans.memberMonth": "ต่อสมาชิก\nต่อเดือน",
|
||||
"go.plans.plus.cta": "สมัคร Go Plus",
|
||||
"go.plans.plus.description": "Go Plus ราคา $40/เดือน พร้อมขีดจำกัดการใช้งานที่สูงขึ้น",
|
||||
"go.plans.teams.cta": "สมัคร Go Teams",
|
||||
|
||||
@@ -218,7 +218,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Bireysel",
|
||||
"go.plans.teams": "Ekipler",
|
||||
"go.plans.month": "aylık",
|
||||
"go.plans.memberMonth": "üye başına aylık",
|
||||
"go.plans.memberMonth": "üye başına\naylık",
|
||||
"go.plans.plus.cta": "Go Plus'a abone ol",
|
||||
"go.plans.plus.description": "Go Plus ayda 40$'dır ve daha yüksek limitler sunar.",
|
||||
"go.plans.teams.cta": "Go Teams'e abone ol",
|
||||
|
||||
@@ -216,7 +216,7 @@ export const dict = {
|
||||
"go.plans.individuals": "Для одного",
|
||||
"go.plans.teams": "Для команд",
|
||||
"go.plans.month": "на місяць",
|
||||
"go.plans.memberMonth": "за учасника на місяць",
|
||||
"go.plans.memberMonth": "за учасника\nна місяць",
|
||||
"go.plans.plus.cta": "Підписатися на Go Plus",
|
||||
"go.plans.plus.description": "Go Plus коштує $40/місяць і пропонує вищі ліміти.",
|
||||
"go.plans.teams.cta": "Підписатися на Go Teams",
|
||||
|
||||
@@ -205,7 +205,7 @@ export const dict = {
|
||||
"go.plans.individuals": "个人",
|
||||
"go.plans.teams": "团队",
|
||||
"go.plans.month": "每月",
|
||||
"go.plans.memberMonth": "每位成员每月",
|
||||
"go.plans.memberMonth": "每位成员\n每月",
|
||||
"go.plans.plus.cta": "订阅 Go Plus",
|
||||
"go.plans.plus.description": "Go Plus 每月 $40,提供更高的使用额度。",
|
||||
"go.plans.teams.cta": "订阅 Go Teams",
|
||||
|
||||
@@ -206,7 +206,7 @@ export const dict = {
|
||||
"go.plans.individuals": "個人",
|
||||
"go.plans.teams": "團隊",
|
||||
"go.plans.month": "每月",
|
||||
"go.plans.memberMonth": "每位成員每月",
|
||||
"go.plans.memberMonth": "每位成員\n每月",
|
||||
"go.plans.plus.cta": "訂閱 Go Plus",
|
||||
"go.plans.plus.description": "Go Plus 每月 $40,提供更高的使用額度。",
|
||||
"go.plans.teams.cta": "訂閱 Go Teams",
|
||||
|
||||
@@ -1113,21 +1113,44 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
/* Both audiences share one grid cell, so the cards are as tall as the tallest set and switching never shifts the
|
||||
page below. */
|
||||
[data-slot="plans-stack"] {
|
||||
display: grid;
|
||||
|
||||
> [data-slot="plans"] {
|
||||
grid-area: 1 / 1;
|
||||
}
|
||||
}
|
||||
|
||||
[data-slot="plans"] {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 24px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
transition:
|
||||
opacity 200ms cubic-bezier(0.23, 1, 0.32, 1),
|
||||
transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
|
||||
|
||||
&[data-audience="teams"] {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
&[aria-hidden="true"] {
|
||||
opacity: 0;
|
||||
transform: translateY(8px) scale(0.98);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
[data-slot="plan"][data-plan="go-teams"] ul {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px 24px;
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
transition: opacity 200ms ease;
|
||||
|
||||
&[aria-hidden="true"] {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Go Teams is one card as wide as each individual plan, centred. */
|
||||
&[data-audience="teams"] {
|
||||
grid-template-columns: minmax(0, calc((100% - 24px) / 2));
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
[data-slot="plan"] {
|
||||
@@ -1149,21 +1172,26 @@ body {
|
||||
[data-slot="name"] {
|
||||
font-weight: 500;
|
||||
color: var(--color-text);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
[data-slot="price"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
font-size: 64px;
|
||||
font-weight: 500;
|
||||
line-height: 1.25;
|
||||
color: var(--color-text-strong);
|
||||
|
||||
/* Set high beside the figures: the tops of its tall letters level with theirs (12px at 64px, 8px at 48px).
|
||||
Go Teams breaks it onto two lines where the translation has a line break. */
|
||||
span {
|
||||
margin-top: 12px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
color: var(--color-text);
|
||||
white-space: pre-line;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1176,13 +1204,15 @@ body {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* Markers sit on the first line of a feature that wraps: 16px icons centred in its 24px line. */
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
|
||||
svg {
|
||||
flex: none;
|
||||
margin-top: 4px;
|
||||
color: var(--color-icon);
|
||||
}
|
||||
}
|
||||
@@ -1209,31 +1239,63 @@ body {
|
||||
background: var(--color-background-strong-hover);
|
||||
}
|
||||
|
||||
/* Go subscribes with an outline button, its label set like the plan's features. */
|
||||
[data-plan="go"] a {
|
||||
border: 1px solid var(--color-border-weak);
|
||||
font-weight: inherit;
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
[data-plan="go"] a:hover {
|
||||
background: transparent;
|
||||
border-color: var(--color-border);
|
||||
color: var(--color-text-strong);
|
||||
}
|
||||
|
||||
a:focus-visible {
|
||||
outline: 2px solid var(--color-text-strong);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Stacked on phones the sets differ a lot in height, so the hidden one leaves the layout and the shown one fades
|
||||
in on its own. */
|
||||
@media (max-width: 42rem) {
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
[data-slot="plan"][data-plan="go-teams"] ul {
|
||||
&[aria-hidden="true"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
opacity: 0;
|
||||
transform: translateY(8px) scale(0.98);
|
||||
}
|
||||
|
||||
&[data-audience="teams"] {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
[data-slot="price"] {
|
||||
font-size: 48px;
|
||||
|
||||
span {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The limits band takes the plan cards' muted background rather than the chart's own lighter one. */
|
||||
[data-component="comparison"] {
|
||||
--go-console-bg: var(--color-background-weak);
|
||||
background: var(--go-console-bg);
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
[data-component="hero"] {
|
||||
padding-bottom: 2rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
|
||||
[data-slot="section-title"] {
|
||||
|
||||
@@ -180,33 +180,46 @@ export default function Home() {
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
<div data-slot="plans" data-audience={audience()}>
|
||||
<For each={plans.filter((plan) => plan.audience === audience())}>
|
||||
{(plan) => (
|
||||
<div data-slot="plan" data-plan={plan.id}>
|
||||
<div data-slot="plan-body">
|
||||
<p data-slot="name">{plan.name}</p>
|
||||
<p data-slot="price">
|
||||
{plan.price} <span>{i18n.t(plan.period)}</span>
|
||||
</p>
|
||||
<ul>
|
||||
<For each={plan.features}>
|
||||
{(feature) => (
|
||||
<li>
|
||||
<svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
{plan.marker === "square" ? (
|
||||
<path d="M11 5H5V11H11V5Z" fill="currentColor" />
|
||||
) : (
|
||||
<path d="M8 3.5V12.5M3.5 8H12.5" stroke="currentColor" />
|
||||
{/* Both audiences stay rendered in one grid cell so switching crossfades between them; the hidden one is
|
||||
inert and out of the accessibility tree. */}
|
||||
<div data-slot="plans-stack">
|
||||
<For each={audiences}>
|
||||
{(group) => (
|
||||
<div
|
||||
data-slot="plans"
|
||||
data-audience={group.id}
|
||||
aria-hidden={audience() !== group.id}
|
||||
inert={audience() !== group.id}
|
||||
>
|
||||
<For each={plans.filter((plan) => plan.audience === group.id)}>
|
||||
{(plan) => (
|
||||
<div data-slot="plan" data-plan={plan.id}>
|
||||
<div data-slot="plan-body">
|
||||
<p data-slot="name">{plan.name}</p>
|
||||
<p data-slot="price">
|
||||
{plan.price} <span>{i18n.t(plan.period)}</span>
|
||||
</p>
|
||||
<ul>
|
||||
<For each={plan.features}>
|
||||
{(feature) => (
|
||||
<li>
|
||||
<svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
{plan.marker === "square" ? (
|
||||
<path d="M11 5H5V11H11V5Z" fill="currentColor" />
|
||||
) : (
|
||||
<path d="M8 3.5V12.5M3.5 8H12.5" stroke="currentColor" />
|
||||
)}
|
||||
</svg>
|
||||
{i18n.t(feature)}
|
||||
</li>
|
||||
)}
|
||||
</svg>
|
||||
{i18n.t(feature)}
|
||||
</li>
|
||||
)}
|
||||
</For>
|
||||
</ul>
|
||||
</div>
|
||||
<a href={subscribeUrl}>{i18n.t(plan.cta)}</a>
|
||||
</For>
|
||||
</ul>
|
||||
</div>
|
||||
<a href={subscribeUrl}>{i18n.t(plan.cta)}</a>
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
|
||||
Reference in New Issue
Block a user