feat(console/app): Style changes, view transitions, small improvements (#8481)
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 288px;
|
height: 288px;
|
||||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(0, 0, 0, 0) 100%);
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-component="header"] {
|
[data-component="header"] {
|
||||||
@@ -24,9 +24,6 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
/* [data-component="header-logo"] { */
|
|
||||||
/* } */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-component="content"] {
|
[data-component="content"] {
|
||||||
@@ -58,20 +55,20 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
font-size: 24px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
font-size: 15px;
|
font-size: 18px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
font-size: 18px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,24 +82,39 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
|
--hero-black-fill-from: hsl(0 0% 100%);
|
||||||
|
--hero-black-fill-to: hsl(0 0% 100% / 0%);
|
||||||
|
--hero-black-stroke-from: hsl(0 0% 100% / 60%);
|
||||||
|
--hero-black-stroke-to: hsl(0 0% 100% / 0%);
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 540px;
|
max-width: 590px;
|
||||||
height: auto;
|
height: auto;
|
||||||
filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
|
filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
|
||||||
|
mask-image: linear-gradient(to bottom, black, transparent);
|
||||||
|
stroke-width: 1.5;
|
||||||
|
|
||||||
|
[data-slot="black-fill"] {
|
||||||
|
fill: url(#hero-black-fill-gradient);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="black-stroke"] {
|
||||||
|
fill: url(#hero-black-stroke-gradient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="cta"] {
|
[data-slot="cta"] {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 32px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: -40px;
|
margin-top: -32px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
margin-top: -20px;
|
margin-top: -16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="heading"] {
|
[data-slot="heading"] {
|
||||||
@@ -111,12 +123,13 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 160%; /* 28.8px */
|
line-height: 160%;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="subheading"] {
|
[data-slot="subheading"] {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -129,6 +142,7 @@
|
|||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="button"] {
|
[data-slot="button"] {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -140,7 +154,7 @@
|
|||||||
background: rgba(255, 255, 255, 0.92);
|
background: rgba(255, 255, 255, 0.92);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: "JetBrains Mono Nerd Font";
|
font-family: var(--font-mono);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -154,14 +168,16 @@
|
|||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="back-soon"] {
|
[data-slot="back-soon"] {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 160%; /* 20.8px */
|
line-height: 160%;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="follow-us"] {
|
[data-slot="follow-us"] {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -172,7 +188,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.17);
|
border: 1px solid rgba(255, 255, 255, 0.17);
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
font-family: "JetBrains Mono Nerd Font";
|
font-family: var(--font-mono);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -185,84 +201,98 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 540px;
|
max-width: 680px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
@media (min-width: 768px) {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="pricing-card"] {
|
[data-slot="pricing-card"] {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
align-items: flex-start;
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.17);
|
border: 1px solid rgba(255, 255, 255, 0.17);
|
||||||
border-radius: 4px;
|
border-radius: 5px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: border-color 0.15s ease;
|
background: #000;
|
||||||
background: transparent;
|
|
||||||
cursor: pointer;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
transition: border-color 200ms ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover:not([data-selected="true"]) {
|
||||||
border-color: rgba(255, 255, 255, 0.35);
|
border-color: rgba(255, 255, 255, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="icon"] {
|
[data-slot="card-trigger"] {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="price"] {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-direction: column;
|
||||||
align-items: baseline;
|
align-items: flex-start;
|
||||||
gap: 8px;
|
width: 100%;
|
||||||
}
|
padding: 24px;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: inherit;
|
||||||
|
text-align: left;
|
||||||
|
transition: padding 200ms ease;
|
||||||
|
|
||||||
[data-slot="amount"] {
|
&:disabled {
|
||||||
color: rgba(255, 255, 255, 0.92);
|
cursor: default;
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="period"] {
|
|
||||||
color: rgba(255, 255, 255, 0.59);
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="multiplier"] {
|
|
||||||
color: rgba(255, 255, 255, 0.39);
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: "·";
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="selected-plan"] {
|
&[data-selected="true"] {
|
||||||
display: flex;
|
[data-slot="amount"] {
|
||||||
flex-direction: column;
|
font-size: 22px;
|
||||||
gap: 32px;
|
}
|
||||||
width: fit-content;
|
|
||||||
max-width: calc(100% - 40px);
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="selected-card"] {
|
[data-slot="terms"] {
|
||||||
display: flex;
|
animation: reveal 500ms cubic-bezier(0.25, 0, 0.5, 1) forwards;
|
||||||
flex-direction: column;
|
}
|
||||||
gap: 16px;
|
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.17);
|
|
||||||
border-radius: 4px;
|
|
||||||
width: fit-content;
|
|
||||||
|
|
||||||
[data-slot="icon"] {
|
[data-slot="actions"] {
|
||||||
|
[data-slot="continue"] {
|
||||||
|
animation-delay: 200ms;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-collapsed="true"] {
|
||||||
|
[data-slot="card-trigger"] {
|
||||||
|
padding: 20px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="plan-header"] {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="amount"] {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-selected="false"][data-collapsed="false"] {
|
||||||
|
[data-slot="amount"] {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="period"],
|
||||||
|
[data-slot="multiplier"] {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="plan-header"] {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
gap: 12px;
|
||||||
|
transition: gap 200ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="plan-icon"] {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="price"] {
|
[data-slot="price"] {
|
||||||
@@ -270,22 +300,31 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
line-height: 24px;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="amount"] {
|
[data-slot="amount"] {
|
||||||
color: rgba(255, 255, 255, 0.92);
|
color: rgba(255, 255, 255, 0.92);
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="period"] {
|
[data-slot="content"] {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="period"],
|
||||||
|
[data-slot="multiplier"] {
|
||||||
|
color: rgba(255, 255, 255, 0.59);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="billing"] {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="multiplier"] {
|
[data-slot="multiplier"] {
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "·";
|
content: "·";
|
||||||
@@ -295,27 +334,33 @@
|
|||||||
|
|
||||||
[data-slot="terms"] {
|
[data-slot="terms"] {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0 24px 24px 24px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: 100% 200%;
|
||||||
|
mask-position: 0% 320%;
|
||||||
|
}
|
||||||
|
|
||||||
li {
|
[data-slot="terms"] li {
|
||||||
color: rgba(255, 255, 255, 0.59);
|
color: rgba(255, 255, 255, 0.59);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.5;
|
line-height: 1.2;
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "▪";
|
content: "▪";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,41 +368,48 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
padding: 0 24px 24px 24px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
button,
|
[data-slot="actions"] button,
|
||||||
a {
|
[data-slot="actions"] a {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition-property: background-color, border-color;
|
||||||
|
transition-duration: 200ms;
|
||||||
|
transition-timing-function: cubic-bezier(0.25, 0, 0.5, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-slot="cancel"] {
|
||||||
|
border: 1px solid var(--border-base, rgba(255, 255, 255, 0.17));
|
||||||
|
background: var(--surface-raised-base, rgba(255, 255, 255, 0.06));
|
||||||
|
background-clip: border-box;
|
||||||
|
color: rgba(255, 255, 255, 0.92);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: var(--surface-raised-base, rgba(255, 255, 255, 0.08));
|
||||||
|
border-color: rgba(255, 255, 255, 0.25);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[data-slot="cancel"] {
|
[data-slot="continue"] {
|
||||||
background: transparent;
|
background: rgb(255, 255, 255);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.17);
|
color: rgb(0, 0, 0);
|
||||||
color: rgba(255, 255, 255, 0.92);
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: rgba(255, 255, 255, 0.35);
|
background: rgb(255, 255, 255, 0.9);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-slot="continue"] {
|
|
||||||
background: rgba(255, 255, 255, 0.17);
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.17);
|
|
||||||
color: rgba(255, 255, 255, 0.59);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: rgba(255, 255, 255, 0.25);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -368,8 +420,7 @@
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 160%; /* 20.8px */
|
line-height: 160%;
|
||||||
font-style: italic;
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
@@ -441,7 +492,7 @@
|
|||||||
|
|
||||||
[data-slot="multiplier"] {
|
[data-slot="multiplier"] {
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: "·";
|
content: "·";
|
||||||
@@ -689,7 +740,7 @@
|
|||||||
span,
|
span,
|
||||||
a {
|
a {
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
font-family: "JetBrains Mono Nerd Font";
|
font-family: var(--font-mono);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -699,7 +750,7 @@
|
|||||||
|
|
||||||
[data-slot="github-stars"] {
|
[data-slot="github-stars"] {
|
||||||
color: rgba(255, 255, 255, 0.25);
|
color: rgba(255, 255, 255, 0.25);
|
||||||
font-family: "JetBrains Mono Nerd Font";
|
font-family: var(--font-mono);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -714,9 +765,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-slot="anomaly-alt"] {
|
[data-slot="anomaly-alt"] {
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
font-family: "JetBrains Mono Nerd Font";
|
font-family: var(--font-mono);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -726,7 +778,7 @@
|
|||||||
|
|
||||||
a {
|
a {
|
||||||
color: rgba(255, 255, 255, 0.39);
|
color: rgba(255, 255, 255, 0.39);
|
||||||
font-family: "JetBrains Mono Nerd Font";
|
font-family: "JetBrains Mono Nerd Font", monospace;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -740,3 +792,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::view-transition-group(*) {
|
||||||
|
animation-duration: 200ms;
|
||||||
|
animation-timing-function: cubic-bezier(0.25, 0, 0.5, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes reveal {
|
||||||
|
100% {
|
||||||
|
mask-position: 0% 0%;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -14,28 +14,47 @@ export function PlanIcon(props: { plan: string }) {
|
|||||||
<Switch>
|
<Switch>
|
||||||
<Match when={props.plan === "20"}>
|
<Match when={props.plan === "20"}>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="4" y="4" width="16" height="16" rx="2" stroke="currentColor" stroke-width="1.5" />
|
<title>Black 20 plan</title>
|
||||||
|
<rect x="0.5" y="0.5" width="23" height="23" stroke="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={props.plan === "100"}>
|
<Match when={props.plan === "100"}>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="3" y="3" width="7" height="7" rx="1" stroke="currentColor" stroke-width="1.5" />
|
<title>Black 100 plan</title>
|
||||||
<rect x="14" y="3" width="7" height="7" rx="1" stroke="currentColor" stroke-width="1.5" />
|
<rect x="0.5" y="0.5" width="9" height="9" stroke="currentColor" />
|
||||||
<rect x="3" y="14" width="7" height="7" rx="1" stroke="currentColor" stroke-width="1.5" />
|
<rect x="0.5" y="14.5" width="9" height="9" stroke="currentColor" />
|
||||||
<rect x="14" y="14" width="7" height="7" rx="1" stroke="currentColor" stroke-width="1.5" />
|
<rect x="14.5" y="0.5" width="9" height="9" stroke="currentColor" />
|
||||||
|
<rect x="14.5" y="14.5" width="9" height="9" stroke="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={props.plan === "200"}>
|
<Match when={props.plan === "200"}>
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="2" y="2" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<title>Black 200 plan</title>
|
||||||
<rect x="10" y="2" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="0.5" y="0.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="18" y="2" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="0.5" y="5.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="2" y="10" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="0.5" y="10.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="10" y="10" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="0.5" y="15.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="18" y="10" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="0.5" y="20.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="2" y="18" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="5.5" y="0.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="10" y="18" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="5.5" y="5.5" width="3" height="3" stroke="currentColor" />
|
||||||
<rect x="18" y="18" width="4" height="4" rx="0.5" stroke="currentColor" stroke-width="1" />
|
<rect x="5.5" y="10.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="5.5" y="15.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="5.5" y="20.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="10.5" y="0.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="10.5" y="5.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="10.5" y="10.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="10.5" y="15.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="10.5" y="20.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="15.5" y="0.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="15.5" y="5.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="15.5" y="10.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="15.5" y="15.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="15.5" y="20.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="20.5" y="0.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="20.5" y="5.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="20.5" y="10.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="20.5" y="15.5" width="3" height="3" stroke="currentColor" />
|
||||||
|
<rect x="20.5" y="20.5" width="3" height="3" stroke="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
</Match>
|
</Match>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|||||||
@@ -1,79 +1,148 @@
|
|||||||
import { A, useSearchParams } from "@solidjs/router"
|
import { A, useSearchParams } from "@solidjs/router"
|
||||||
import { Title } from "@solidjs/meta"
|
import { Title } from "@solidjs/meta"
|
||||||
import { createMemo, createSignal, For, Match, Show, Switch } from "solid-js"
|
import { createMemo, createSignal, For, onMount, Show } from "solid-js"
|
||||||
import { PlanIcon, plans } from "./common"
|
import { PlanIcon, plans } from "./common"
|
||||||
|
|
||||||
export default function Black() {
|
export default function Black() {
|
||||||
const [params] = useSearchParams()
|
const [params] = useSearchParams()
|
||||||
const [selected, setSelected] = createSignal<string | null>((params.plan as string) || null)
|
const [selected, setSelected] = createSignal<string | null>((params.plan as string) || null)
|
||||||
const selectedPlan = createMemo(() => plans.find((p) => p.id === selected()))
|
const [mounted, setMounted] = createSignal(false)
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
requestAnimationFrame(() => setMounted(true))
|
||||||
|
})
|
||||||
|
|
||||||
|
const transition = (action: () => void) => {
|
||||||
|
if (mounted() && "startViewTransition" in document) {
|
||||||
|
;(document as any).startViewTransition(action)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
action()
|
||||||
|
}
|
||||||
|
|
||||||
|
const select = (planId: string) => {
|
||||||
|
if (selected() === planId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
transition(() => setSelected(planId))
|
||||||
|
}
|
||||||
|
|
||||||
|
const cancel = () => {
|
||||||
|
transition(() => setSelected(null))
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Title>opencode</Title>
|
<Title>opencode</Title>
|
||||||
<section data-slot="cta">
|
<section data-slot="cta">
|
||||||
<Switch>
|
<div data-slot="pricing">
|
||||||
<Match when={!selected()}>
|
<For each={plans}>
|
||||||
<div data-slot="pricing">
|
{(plan) => {
|
||||||
<For each={plans}>
|
const isSelected = createMemo(() => selected() === plan.id)
|
||||||
{(plan) => (
|
const isCollapsed = createMemo(() => selected() !== null && selected() !== plan.id)
|
||||||
<button type="button" onClick={() => setSelected(plan.id)} data-slot="pricing-card">
|
|
||||||
<div data-slot="icon">
|
return (
|
||||||
<PlanIcon plan={plan.id} />
|
<article
|
||||||
|
data-slot="pricing-card"
|
||||||
|
data-plan-id={plan.id}
|
||||||
|
data-selected={isSelected() ? "true" : "false"}
|
||||||
|
data-collapsed={isCollapsed() ? "true" : "false"}
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-slot="card-trigger"
|
||||||
|
onClick={() => select(plan.id)}
|
||||||
|
disabled={isSelected()}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
data-slot="plan-header"
|
||||||
|
style={{
|
||||||
|
"view-transition-name": `plan-header-${plan.id}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div data-slot="plan-icon">
|
||||||
|
<PlanIcon plan={plan.id} />
|
||||||
|
</div>
|
||||||
|
<p
|
||||||
|
data-slot="price"
|
||||||
|
style={{
|
||||||
|
"view-transition-name": `price-${plan.id}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
data-slot="amount"
|
||||||
|
style={{
|
||||||
|
"view-transition-name": `amount-${plan.id}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
${plan.id}
|
||||||
|
</span>
|
||||||
|
<Show when={!isSelected()}>
|
||||||
|
<span
|
||||||
|
data-slot="period"
|
||||||
|
style={{
|
||||||
|
"view-transition-name": `period-${plan.id}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
per month
|
||||||
|
</span>
|
||||||
|
</Show>
|
||||||
|
|
||||||
|
<Show when={isSelected()}>
|
||||||
|
<span
|
||||||
|
data-slot="billing"
|
||||||
|
style={{
|
||||||
|
"view-transition-name": `billing-${plan.id}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
per person billed monthly
|
||||||
|
</span>
|
||||||
|
</Show>
|
||||||
|
{plan.multiplier && (
|
||||||
|
<span
|
||||||
|
data-slot="multiplier"
|
||||||
|
style={{
|
||||||
|
"view-transition-name": `multiplier-${plan.id}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{plan.multiplier}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p data-slot="price">
|
|
||||||
<span data-slot="amount">${plan.id}</span> <span data-slot="period">per month</span>
|
|
||||||
<Show when={plan.multiplier}>
|
|
||||||
<span data-slot="multiplier">{plan.multiplier}</span>
|
|
||||||
</Show>
|
|
||||||
</p>
|
|
||||||
</button>
|
</button>
|
||||||
)}
|
|
||||||
</For>
|
<Show when={isSelected()}>
|
||||||
</div>
|
<div data-slot="content">
|
||||||
<p data-slot="fine-print">
|
<ul data-slot="terms">
|
||||||
Prices shown don't include applicable tax · <A href="/legal/terms-of-service">Terms of Service</A>
|
<li>Your subscription will not start immediately</li>
|
||||||
</p>
|
<li>You will be added to the waitlist and activated soon</li>
|
||||||
</Match>
|
<li>Your card will be only charged when your subscription is activated</li>
|
||||||
<Match when={selectedPlan()}>
|
<li>Usage limits apply, heavily automated use may reach limits sooner</li>
|
||||||
{(plan) => (
|
<li>Subscriptions for individuals, contact Enterprise for teams</li>
|
||||||
<div data-slot="selected-plan">
|
<li>Limits may be adjusted and plans may be discontinued in the future</li>
|
||||||
<div data-slot="selected-card">
|
<li>Cancel your subscription at anytime</li>
|
||||||
<div data-slot="icon">
|
</ul>
|
||||||
<PlanIcon plan={plan().id} />
|
<div data-slot="actions">
|
||||||
</div>
|
<button type="button" onClick={cancel} data-slot="cancel">
|
||||||
<p data-slot="price">
|
Cancel
|
||||||
<span data-slot="amount">${plan().id}</span>{" "}
|
</button>
|
||||||
<span data-slot="period">per person billed monthly</span>
|
<a href={`/black/subscribe/${plan.id}`} data-slot="continue">
|
||||||
<Show when={plan().multiplier}>
|
Continue
|
||||||
<span data-slot="multiplier">{plan().multiplier}</span>
|
</a>
|
||||||
</Show>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
<ul data-slot="terms">
|
</Show>
|
||||||
<li>Your subscription will not start immediately</li>
|
</article>
|
||||||
<li>You will be added to the waitlist and activated soon</li>
|
)
|
||||||
<li>Your card will be only charged when your subscription is activated</li>
|
}}
|
||||||
<li>Usage limits apply, heavily automated use may reach limits sooner</li>
|
</For>
|
||||||
<li>Subscriptions for individuals, contact Enterprise for teams</li>
|
</div>
|
||||||
<li>Limits may be adjusted and plans may be discontinued in the future</li>
|
<p data-slot="fine-print">
|
||||||
<li>Cancel your subscription at anytime</li>
|
Prices shown don't include applicable tax · <A href="/legal/terms-of-service">Terms of Service</A>
|
||||||
</ul>
|
</p>
|
||||||
<div data-slot="actions">
|
|
||||||
<button type="button" onClick={() => setSelected(null)} data-slot="cancel">
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
<a href={`/black/subscribe/${plan().id}`} data-slot="continue">
|
|
||||||
Continue
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p data-slot="fine-print">
|
|
||||||
Prices shown don't include applicable tax · <A href="/legal/terms-of-service">Terms of Service</A>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Match>
|
|
||||||
</Switch>
|
|
||||||
</section>
|
</section>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user