fix: dark mode improvements for signup (#12965)

* dark mode improvements

* small changes

* readded producthunt badges

* only show social proof on cal.com
This commit is contained in:
Peer Richelsen authored and GitHub committed 2023-12-29 18:08:36 +00:00
1 parent bdc36acdf5
commit 16d1adf990
3 files changed
+111 -43

No files matched your search

+82 -43
View File
@@ -19,7 +19,14 @@ import { isSAMLLoginEnabled } from "@calcom/features/ee/sso/lib/saml";
import { useFlagMap } from "@calcom/features/flags/context/provider";
import { getFeatureFlagMap } from "@calcom/features/flags/server/utils";
import { classNames } from "@calcom/lib";
import { APP_NAME, IS_CALCOM, IS_SELF_HOSTED, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants";
import {
APP_NAME,
URL_PROTOCOL_REGEX,
IS_CALCOM,
IS_SELF_HOSTED,
WEBAPP_URL,
WEBSITE_URL,
} from "@calcom/lib/constants";
import { fetchUsername } from "@calcom/lib/fetchUsername";
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useDebounce } from "@calcom/lib/hooks/useDebounce";
@@ -253,7 +260,7 @@ export default function Signup({
<div className="bg-muted 2xl:border-subtle grid w-full max-w-[1440px] grid-cols-1 grid-rows-1 overflow-hidden lg:grid-cols-2 2xl:rounded-[20px] 2xl:border 2xl:py-6">
<HeadSeo title={t("sign_up")} description={t("sign_up")} />
{/* Left side */}
<div className="flex w-full flex-col px-4 pt-6 sm:px-16 md:px-20 2xl:px-28">
<div className="ml-auto mr-auto mt-0 flex w-full max-w-xl flex-col px-4 pt-6 sm:px-16 md:px-20 lg:mt-12 2xl:px-28">
{/* Header */}
{errors.apiError && (
<Alert severity="error" message={errors.apiError?.message} data-testid="signup-error-message" />
@@ -273,7 +280,7 @@ export default function Signup({
)}
</div>
{/* Form Container */}
<div className="mt-10">
<div className="mt-12">
<Form
className="flex flex-col gap-4"
form={formMethods}
@@ -301,8 +308,8 @@ export default function Signup({
setPremium={(value) => setPremiumUsername(value)}
addOnLeading={
orgSlug
? `${getOrgFullOrigin(orgSlug, { protocol: true })}/`
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/`
? `${getOrgFullOrigin(orgSlug, { protocol: true }).replace(URL_PROTOCOL_REGEX, "")}/`
: `${process.env.NEXT_PUBLIC_WEBSITE_URL.replace(URL_PROTOCOL_REGEX, "")}/`
}
/>
) : null}
@@ -461,54 +468,86 @@ export default function Signup({
</div>
</div>
</div>
<div
className="border-subtle hidden w-full flex-col justify-between rounded-l-2xl border py-12 pl-12 lg:flex"
style={{
background:
"radial-gradient(162.05% 170% at 109.58% 35%, rgba(102, 117, 147, 0.7) 0%, rgba(212, 212, 213, 0.4) 100%) ",
}}>
<div className="border-muted mx-auto mt-24 w-full max-w-2xl flex-col justify-between rounded-l-2xl bg-[radial-gradient(162.05%_170%_at_109.58%_35%,_rgba(102,_117,_147,_0.7)_0%,_rgba(212,_212,_213,_0.4)_100%)] pl-4 dark:bg-none lg:mt-0 lg:flex lg:max-w-full lg:border lg:py-12 lg:pl-12">
{IS_CALCOM && (
<div className="mb-12 mr-12 grid h-full w-full grid-cols-4 gap-4 ">
<div className="">
<img src="/product-cards/trustpilot.svg" className="h-[54px] w-full" alt="#" />
<>
<div className="-mt-4 mb-6 mr-12 grid w-full grid-cols-3 gap-3 lg:grid-cols-4">
<div>
<img
src="/product-cards/product-of-the-day.svg"
className="h-[34px] w-full dark:invert"
alt="Cal.com was Product of the Day at ProductHunt"
/>
</div>
<div>
<img
src="/product-cards/product-of-the-week.svg"
className="h-[34px] w-full dark:invert"
alt="Cal.com was Product of the Week at ProductHunt"
/>
</div>
<div>
<img
src="/product-cards/product-of-the-month.svg"
className="h-[34px] w-full dark:invert"
alt="Cal.com was Product of the Month at ProductHunt"
/>
</div>
</div>
<div>
<img src="/product-cards/g2.svg" className="h-[54px] w-full" alt="#" />
<div className="mb-6 mr-12 grid w-full grid-cols-3 gap-3 lg:grid-cols-4">
<div>
<img
src="/product-cards/producthunt.svg"
className="h-[54px] w-full"
alt="ProductHunt Rating of 5 Stars"
/>
</div>
<div>
<img
src="/product-cards/trustpilot.svg"
className="block h-[54px] w-full dark:hidden"
alt="Trustpilot Rating of 4.7 Stars"
/>
<img
src="/product-cards/trustpilot-dark.svg"
className="hidden h-[54px] w-full dark:block"
alt="Trustpilot Rating of 4.7 Stars"
/>
</div>
<div>
<img src="/product-cards/g2.svg" className="h-[54px] w-full" alt="G2 Rating of 4.7 Stars" />
</div>
</div>
<div>
<img src="/product-cards/producthunt.svg" className="h-[54px] w-full" alt="#" />
</div>
</div>
</>
)}
<div
className="border-default rounded-bl-2xl rounded-br-none rounded-tl-2xl border-dashed py-[6px] pl-[6px]"
className="border-default hidden rounded-bl-2xl rounded-br-none rounded-tl-2xl border-dashed lg:block lg:py-[6px] lg:pl-[6px]"
style={{
backgroundColor: "rgba(236,237,239,0.9)",
}}>
<img src="/mock-event-type-list.svg" alt="#" className="" />
<img src="/mock-event-type-list.svg" alt="Cal.com Booking Page" />
</div>
<div className="mr-12 mt-8 grid h-full w-full grid-cols-3 gap-4 overflow-hidden">
{!IS_CALCOM &&
FEATURES.map((feature) => (
<>
<div className="flex flex-col leading-none">
<div className="text-emphasis items-center">
<feature.icon className="mb-1 h-4 w-4" />
<span className="text-sm font-medium">{t(feature.title)}</span>
</div>
<div className="text-subtle text-sm">
<p>
{t(
feature.description,
feature.i18nOptions && {
...feature.i18nOptions,
}
)}
</p>
</div>
<div className="mr-12 mt-8 h-full w-full grid-cols-3 gap-4 overflow-hidden sm:grid">
{FEATURES.map((feature) => (
<>
<div className="max-w-52 mb-8 flex flex-col leading-none sm:mb-0">
<div className="text-emphasis items-center">
<feature.icon className="mb-1 h-4 w-4" />
<span className="text-sm font-medium">{t(feature.title)}</span>
</div>
</>
))}
<div className="text-subtle text-sm">
<p>
{t(
feature.description,
feature.i18nOptions && {
...feature.i18nOptions,
}
)}
</p>
</div>
</div>
</>
))}
</div>
</div>
</div>
@@ -0,0 +1,27 @@
<svg width="121" height="54" viewBox="0 0 121 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_505_15)">
<mask id="mask0_505_15" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="121" height="54">
<path d="M121 0H0V54H121V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_505_15)">
<path d="M22.6079 0H0.10791V22.5H22.6079V0Z" fill="#00B67A"/>
<path d="M46.9829 0H24.4829V22.5H46.9829V0Z" fill="#00B67A"/>
<path d="M71.3579 0H48.8579V22.5H71.3579V0Z" fill="#00B67A"/>
<path d="M95.7329 0H73.2329V22.5H95.7329V0Z" fill="#00B67A"/>
<path d="M120.108 0H108.858V22.5H120.108V0Z" fill="#AFAFAF"/>
<path d="M108.858 0H97.6079V22.5H108.858V0Z" fill="#00B67A"/>
<path d="M11.3579 15.1641L14.7799 14.2969L16.2099 18.7031L11.3579 15.1641ZM19.2329 9.46867H13.2099L11.3579 3.79688L9.50696 9.46867H3.48291L8.35791 12.9844L6.50696 18.6562L11.3819 15.1406L14.3819 12.9844L19.2329 9.46867Z" fill="white"/>
<path d="M35.7329 15.1641L39.1549 14.2969L40.5849 18.7031L35.7329 15.1641ZM43.6079 9.46867H37.5849L35.7329 3.79688L33.8819 9.46867H27.8579L32.7329 12.9844L30.8819 18.6562L35.7569 15.1406L38.7569 12.9844L43.6079 9.46867Z" fill="white"/>
<path d="M60.1079 15.1641L63.5299 14.2969L64.9599 18.7031L60.1079 15.1641ZM67.9829 9.46867H61.9599L60.1079 3.79688L58.2569 9.46867H52.2329L57.1079 12.9844L55.2569 18.6562L60.1319 15.1406L63.1319 12.9844L67.9829 9.46867Z" fill="white"/>
<path d="M84.4829 15.1641L87.9049 14.2969L89.3349 18.7031L84.4829 15.1641ZM92.3579 9.46867H86.3349L84.4829 3.79688L82.6319 9.46867H76.6079L81.4829 12.9844L79.6319 18.6562L84.5069 15.1406L87.5069 12.9844L92.3579 9.46867Z" fill="white"/>
<path d="M108.858 15.1641L112.28 14.2969L113.71 18.7031L108.858 15.1641ZM116.733 9.46867H110.71L108.858 3.79688L107.007 9.46867H100.983L105.858 12.9844L104.007 18.6562L108.882 15.1406L111.882 12.9844L116.733 9.46867Z" fill="white"/>
<path d="M19.8749 41.5801H27.4909V43.001H24.4959V50.9886H22.8489V43.001H19.8679V41.5801H19.8749ZM27.1649 44.1762H28.5729V45.4909H28.5989C28.6459 45.305 28.7319 45.1257 28.8579 44.9531C28.9839 44.7804 29.1369 44.6144 29.3159 44.475C29.4959 44.3289 29.6949 44.216 29.9139 44.1231C30.1329 44.0368 30.3589 43.9903 30.5849 43.9903C30.7569 43.9903 30.8829 43.9969 30.9499 44.0036C31.0159 44.0102 31.0829 44.0235 31.1559 44.0301V45.4776C31.0489 45.4577 30.9429 45.4444 30.8299 45.4311C30.7169 45.4178 30.6109 45.4112 30.5049 45.4112C30.2529 45.4112 30.0139 45.4643 29.7879 45.5639C29.5619 45.6635 29.3699 45.8162 29.2039 46.0088C29.0379 46.208 28.9049 46.447 28.8049 46.7391C28.7059 47.0313 28.6589 47.3633 28.6589 47.7417V50.9819H27.1589V44.1762H27.1649ZM38.0539 50.9886H36.5799V50.0391H36.5539C36.3679 50.3843 36.0959 50.6566 35.7299 50.8624C35.3649 51.0682 34.9929 51.1745 34.6149 51.1745C33.7189 51.1745 33.0679 50.9554 32.6699 50.5105C32.2709 50.0656 32.0719 49.395 32.0719 48.4987V44.1762H33.5729V48.3526C33.5729 48.9502 33.6849 49.3751 33.9179 49.6208C34.1439 49.8664 34.4689 49.9926 34.8809 49.9926C35.1989 49.9926 35.4579 49.9461 35.6709 49.8465C35.8829 49.7469 36.0559 49.6208 36.1819 49.4548C36.3149 49.2954 36.4079 49.0962 36.4669 48.8705C36.5269 48.6447 36.5539 48.3991 36.5539 48.1335V44.1828H38.0539V50.9886ZM40.6109 48.8041C40.6569 49.2423 40.8229 49.5477 41.1089 49.727C41.4009 49.8996 41.7459 49.9926 42.1509 49.9926C42.2899 49.9926 42.4499 49.9793 42.6289 49.9594C42.8079 49.9395 42.9809 49.893 43.1339 49.8332C43.2929 49.7735 43.4189 49.6805 43.5249 49.561C43.6249 49.4415 43.6719 49.2888 43.6649 49.0962C43.6579 48.9037 43.5849 48.7443 43.4519 48.6248C43.3199 48.4987 43.1539 48.4057 42.9479 48.326C42.7419 48.253 42.5099 48.1866 42.2439 48.1335C41.9779 48.0804 41.7129 48.0206 41.4409 47.9608C41.1619 47.9011 40.8889 47.8214 40.6309 47.7351C40.3719 47.6488 40.1389 47.5293 39.9329 47.3765C39.7279 47.2305 39.5619 47.0379 39.4419 46.8055C39.3159 46.5731 39.2559 46.2876 39.2559 45.9424C39.2559 45.5705 39.3489 45.2651 39.5279 45.0128C39.7079 44.7605 39.9399 44.5613 40.2119 44.4086C40.4909 44.2559 40.7969 44.1496 41.1349 44.0832C41.4739 44.0235 41.7989 43.9903 42.1049 43.9903C42.4559 43.9903 42.7949 44.0301 43.1139 44.1032C43.4329 44.1762 43.7249 44.2957 43.9839 44.4684C44.2429 44.6343 44.4549 44.8535 44.6279 45.119C44.7999 45.3846 44.9069 45.71 44.9529 46.0884H43.3859C43.3129 45.7299 43.1539 45.4842 42.8949 45.3647C42.6359 45.2386 42.3369 45.1788 42.0049 45.1788C41.8989 45.1788 41.7729 45.1854 41.6259 45.2054C41.4799 45.2253 41.3479 45.2585 41.2149 45.305C41.0889 45.3514 40.9819 45.4245 40.8889 45.5174C40.8029 45.6104 40.7569 45.7299 40.7569 45.8826C40.7569 46.0685 40.8229 46.2146 40.9489 46.3275C41.0749 46.4403 41.2409 46.5333 41.4469 46.613C41.6529 46.686 41.8849 46.7524 42.1509 46.8055C42.4169 46.8586 42.6889 46.9184 42.9679 46.9782C43.2399 47.0379 43.5059 47.1176 43.7709 47.2039C44.0369 47.2902 44.2689 47.4097 44.4749 47.5625C44.6809 47.7152 44.8469 47.9011 44.9729 48.1268C45.0989 48.3526 45.1649 48.6381 45.1649 48.9701C45.1649 49.3751 45.0729 49.7137 44.8869 49.9992C44.7009 50.2781 44.4619 50.5105 44.1699 50.6831C43.8769 50.8558 43.5449 50.9886 43.1869 51.0682C42.8279 51.1479 42.4699 51.1877 42.1179 51.1877C41.6859 51.1877 41.2879 51.1413 40.9229 51.0417C40.5579 50.9421 40.2389 50.796 39.9729 50.6034C39.7079 50.4043 39.4949 50.1586 39.3419 49.8664C39.1899 49.5743 39.1099 49.2224 39.0969 48.8174H40.6109V48.8041ZM45.5639 44.1762H46.6989V42.1312H48.1999V44.1762H49.5539V45.2983H48.1999V48.9369C48.1999 49.0962 48.2059 49.229 48.2199 49.3485C48.2329 49.4614 48.2659 49.561 48.3129 49.6407C48.3589 49.7204 48.4319 49.7801 48.5319 49.82C48.6309 49.8598 48.7579 49.8797 48.9299 49.8797C49.0359 49.8797 49.1429 49.8797 49.2489 49.8731C49.3549 49.8664 49.4609 49.8532 49.5679 49.8266V50.9886C49.4019 51.0085 49.2359 51.0217 49.0829 51.0417C48.9239 51.0616 48.7639 51.0682 48.5979 51.0682C48.1999 51.0682 47.8809 51.0284 47.6419 50.9554C47.4029 50.8823 47.2099 50.7694 47.0779 50.6234C46.9379 50.4773 46.8519 50.298 46.7989 50.0789C46.7519 49.8598 46.7189 49.6075 46.7129 49.3286V45.3116H45.5769V44.1762H45.5639ZM50.6169 44.1762H52.0379V45.0991H52.0639C52.2769 44.7007 52.5689 44.4219 52.9469 44.2492C53.3259 44.0766 53.7309 43.9903 54.1759 43.9903C54.7129 43.9903 55.1779 44.0832 55.5769 44.2758C55.9749 44.4617 56.3069 44.7207 56.5719 45.0526C56.8379 45.3846 57.0309 45.7697 57.1629 46.208C57.2959 46.6462 57.3629 47.1176 57.3629 47.6156C57.3629 48.0737 57.3029 48.5186 57.1829 48.9435C57.0639 49.3751 56.8849 49.7536 56.6459 50.0855C56.4059 50.4175 56.1009 50.6765 55.7289 50.8757C55.3569 51.0749 54.9259 51.1745 54.4209 51.1745C54.2019 51.1745 53.9829 51.1545 53.7639 51.1147C53.5449 51.0749 53.3319 51.0085 53.1329 50.9222C52.9339 50.8358 52.7409 50.723 52.5749 50.5835C52.4029 50.4441 52.2629 50.2847 52.1439 50.1055H52.1169V53.505H50.6169V44.1762ZM55.8619 47.589C55.8619 47.2836 55.8219 46.9848 55.7429 46.6927C55.6629 46.4005 55.5429 46.1482 55.3839 45.9Line truncated
<path d="M9.11792 48.1201L13.0429 47.1042L14.6889 52.1637L9.11792 48.1201ZM18.1219 41.58H11.2429L9.11792 35.0332L6.99396 41.58L0.10791 41.5733L5.67896 45.6169L3.55396 52.1637L9.11792 48.1201L12.5579 45.6235L18.1219 41.58Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_505_15">
<rect width="121" height="54" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

+2
View File
@@ -124,3 +124,5 @@ export const IS_PREMIUM_USERNAME_ENABLED =
// Max number of invites to join a team/org that can be sent at once
export const MAX_NB_INVITES = 100;
export const URL_PROTOCOL_REGEX = /(^\w+:|^)\/\//;