Skip to content

Commit 801e5f2

Browse files
committed
feat(landing): match Go pricing demo UI
1 parent a826b43 commit 801e5f2

5 files changed

Lines changed: 1709 additions & 87 deletions

File tree

apps/landing-page/app/_components/go-banner.astro

Lines changed: 68 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -24,117 +24,121 @@ const apiOrigin =
2424
data-window-start="2026-08-20T20:00:00+08:00"
2525
data-window-end="2026-09-03T20:00:00+08:00"
2626
data-api-origin={apiOrigin}
27+
aria-label={copy.ariaLabel}
2728
hidden
2829
>
29-
<a class="go-banner__link" href={pricingHref} data-go-banner-cta aria-label={copy.ariaLabel}>
30+
<div class="go-banner__inner">
3031
<span class="go-banner__badge">{copy.badge}</span>
31-
<strong class="go-banner__headline">{copy.headline}</strong>
32-
<span class="go-banner__divider" aria-hidden="true"></span>
33-
<span class="go-banner__detail">{copy.detail}</span>
34-
<span class="go-banner__cta" aria-hidden="true">→</span>
35-
</a>
36-
<button class="go-banner__close" type="button" data-go-banner-close aria-label={copy.closeLabel}>×</button>
32+
<a class="go-banner__link" href={pricingHref} data-go-banner-cta>
33+
<span class="go-banner__headline">{copy.headline}</span>
34+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6" /></svg>
35+
</a>
36+
</div>
37+
<button class="go-banner__close" type="button" data-go-banner-close aria-label={copy.closeLabel}>
38+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18" /></svg>
39+
</button>
3740
</aside>
3841

3942
<style>
4043
.go-banner {
41-
position: fixed;
44+
position: sticky;
4245
z-index: 72;
43-
inset: 0 0 auto;
44-
min-height: 44px;
45-
border-bottom: 1px solid color-mix(in srgb, #68f22e 36%, var(--line, #d9d9d9));
46-
color: var(--ink, #262626);
47-
background: color-mix(in srgb, #68f22e 8%, #fff);
48-
box-shadow: 0 6px 24px rgb(38 38 38 / 6%);
49-
font-size: 13px;
50-
line-height: 1.25;
46+
top: 0;
47+
display: flex;
48+
align-items: center;
49+
justify-content: center;
50+
min-height: 48px;
51+
padding: 7px 70px;
52+
color: #20241d;
53+
background: #e6efd5;
54+
border: 0;
5155
}
5256
.go-banner[hidden] { display: none !important; }
57+
.go-banner__inner {
58+
display: flex;
59+
align-items: center;
60+
justify-content: center;
61+
gap: 16px;
62+
min-width: 0;
63+
}
5364
.go-banner__link {
5465
display: flex;
5566
align-items: center;
5667
justify-content: center;
57-
gap: 12px;
58-
min-height: 44px;
59-
padding: 8px 64px 8px 24px;
60-
color: inherit;
68+
gap: 7px;
69+
min-width: 0;
70+
padding: 4px 0;
71+
color: #292d27;
72+
font-size: 13px;
73+
font-weight: 600;
74+
line-height: 1.35;
6175
text-decoration: none;
6276
}
6377
.go-banner__badge {
6478
flex: 0 0 auto;
65-
padding: 4px 9px;
79+
padding: 5px 9px;
6680
border-radius: 999px;
67-
color: #102b05;
68-
background: #68f22e;
69-
font-size: 11px;
81+
color: #173111;
82+
background: #78ea57;
83+
font-size: 8px;
7084
font-weight: 800;
85+
line-height: 1;
86+
letter-spacing: .045em;
7187
white-space: nowrap;
7288
}
73-
.go-banner__link strong { font-weight: 720; }
74-
.go-banner__divider {
75-
flex: 0 0 1px;
76-
align-self: stretch;
77-
max-height: 18px;
78-
margin-block: auto;
79-
background: color-mix(in srgb, var(--ink, #262626) 22%, transparent);
89+
.go-banner__headline {
90+
overflow: hidden;
91+
text-overflow: ellipsis;
92+
white-space: nowrap;
8093
}
81-
.go-banner__detail { color: var(--ink-mute, #666); }
82-
.go-banner__cta {
83-
display: inline-grid;
84-
place-items: center;
85-
flex: 0 0 auto;
86-
width: 25px;
87-
height: 25px;
88-
border-radius: 999px;
89-
color: #fff;
90-
background: var(--ink, #262626);
94+
.go-banner__link svg {
95+
flex: none;
9196
transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
9297
}
93-
.go-banner__link:hover .go-banner__cta { transform: translateX(2px); }
98+
.go-banner__link:hover svg { transform: translateX(3px); }
9499
.go-banner__link:focus-visible {
95-
outline: 2px solid var(--ink, #262626);
96-
outline-offset: -3px;
100+
outline: 2px solid #11120f;
101+
outline-offset: 3px;
97102
}
98103
.go-banner__close {
99104
position: absolute;
100105
top: 50%;
101-
right: 14px;
106+
right: 3.2vw;
102107
display: grid;
103108
place-items: center;
104109
width: 28px;
105110
height: 28px;
106111
padding: 0;
107112
border: 0;
108-
border-radius: 50%;
109-
color: var(--ink, #262626);
113+
border: 1px solid transparent;
114+
color: #11120f;
110115
background: transparent;
111-
font-size: 19px;
112116
cursor: pointer;
113-
opacity: .72;
114117
transform: translateY(-50%);
115118
}
116-
.go-banner__close:hover { background: rgb(38 38 38 / 7%); opacity: 1; }
117-
.go-banner__close:focus-visible { outline: 2px solid var(--ink, #262626); outline-offset: 2px; }
118-
:global(html.go-banner-active) { --home-campaign-banner-height: 44px; }
119+
.go-banner__close:hover { color: #11120f; }
120+
.go-banner__close:focus-visible { outline: 3px solid rgb(17 18 15 / 28%); outline-offset: 1px; }
121+
:global(html.go-banner-active) { --home-campaign-banner-height: 48px; }
119122
:global(html.go-banner-active .home-campaign-banner) { display: none !important; }
120-
:global(html.go-banner-active .site-chrome) { top: 44px; }
123+
:global(html.go-banner-active .site-chrome) { top: 48px; }
121124
@media (max-width: 760px) {
122-
.go-banner { min-height: 52px; }
123-
.go-banner__link {
125+
.go-banner {
126+
justify-content: flex-start;
127+
min-height: 48px;
128+
padding: 8px 48px 8px 14px;
129+
}
130+
.go-banner__inner {
124131
justify-content: flex-start;
125132
gap: 8px;
126-
min-height: 52px;
127-
padding: 7px 48px 7px 12px;
128133
}
129-
.go-banner__headline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
130-
.go-banner__detail,
131-
.go-banner__divider { display: none; }
132-
:global(html.go-banner-active) { --home-campaign-banner-height: 52px; }
133-
:global(html.go-banner-active .site-chrome) { top: 52px; }
134-
:global(html.go-banner-active .hero) { padding-top: calc(92px + 52px); }
134+
.go-banner__link { justify-content: flex-start; font-size: 10px; overflow: hidden; }
135+
.go-banner__close { right: 10px; }
136+
:global(html.go-banner-active) { --home-campaign-banner-height: 48px; }
137+
:global(html.go-banner-active .site-chrome) { top: 48px; }
138+
:global(html.go-banner-active .hero) { padding-top: calc(92px + 48px); }
135139
}
136140
@media (prefers-reduced-motion: reduce) {
137-
.go-banner__cta { transition: none; }
141+
.go-banner__link svg { transition: none; }
138142
}
139143
</style>
140144

0 commit comments

Comments
 (0)