Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursorless enablement group page #1660

Merged
merged 71 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 69 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b476a78
Cursorless enablement group page
pokey Jul 19, 2023
f78dc83
Generalize layout
pokey Jul 19, 2023
df0829c
Empty commit
pokey Jul 19, 2023
47038bc
fix meta tags
pokey Jul 20, 2023
adb8231
Update enablement-group.mdx (#1689)
F-Kunkle Aug 23, 2023
0fd8095
revert lockfile
pokey Aug 23, 2023
6dfaee5
Merge branch 'main' into pokey/cursorless-enablement-group-page
pokey Aug 23, 2023
56b3066
Working version
pokey Aug 23, 2023
97de460
More tweaks
pokey Aug 23, 2023
0060fa2
Fixed dependencies
pokey Aug 23, 2023
4307393
Attempt to fix mdx
pokey Aug 23, 2023
ba52c18
Living up the tone
pokey Aug 23, 2023
3cc0ed2
Tweaks
pokey Aug 23, 2023
dda35b3
Image padding and border
pokey Aug 25, 2023
d3f1547
add fixme
pokey Aug 25, 2023
d448e91
Apply tweaks from Frank
pokey Aug 25, 2023
657478a
tweaking
pokey Aug 25, 2023
9ffc544
more tweaks
pokey Aug 25, 2023
da54448
Merge branch 'main' into pokey/cursorless-enablement-group-page
pokey Oct 9, 2023
90c5761
Wordsmithing
pokey Oct 9, 2023
6370f91
Fancy callout boxes
pokey Oct 9, 2023
97044d1
Tweak callout boxes
pokey Oct 10, 2023
989a24e
tweaks
pokey Oct 12, 2023
4294cca
tweaks
pokey Oct 12, 2023
003892d
Frank tweaks
pokey Sep 8, 2023
17d938e
add todos
pokey Oct 12, 2023
2422552
Add spam-proof email links
pokey Oct 13, 2023
7693330
Fix ci
pokey Oct 13, 2023
ec3e6a0
More tweaks
pokey Oct 13, 2023
359fc36
Cleanup
pokey Oct 13, 2023
31e3d37
More tweaks
pokey Oct 13, 2023
4b74703
update images
pokey Oct 13, 2023
6993242
Merge branch 'main' into pokey/cursorless-enablement-group-page
pokey Oct 18, 2023
957e88a
Initial work towards new styling
pokey Oct 19, 2023
5137772
copy
pokey Oct 19, 2023
1f8e5a5
add todos
pokey Oct 19, 2023
b70bcf7
tweak
pokey Oct 19, 2023
1881382
tweaks
pokey Oct 19, 2023
5360289
Merge branch 'main' into pokey/cursorless-enablement-group-page
pokey Oct 27, 2023
f083919
More design tweaks
pokey Oct 27, 2023
9a9b581
More tweaks
pokey Oct 27, 2023
b5687d8
Fix fonts
pokey Oct 28, 2023
8c9a0c2
Desktop looking good
pokey Oct 28, 2023
391ee2a
tweaks
pokey Oct 28, 2023
3f57408
tweaks
pokey Oct 28, 2023
6f1f2aa
Start adding testimonials
pokey Oct 30, 2023
c735059
more endorsements
pokey Oct 30, 2023
0544adf
tweak mobile
pokey Oct 30, 2023
dd92390
more testimonial
pokey Oct 30, 2023
526c216
fix borders
pokey Oct 30, 2023
e711562
tweak light bg
pokey Oct 30, 2023
f655b67
tweak layout
pokey Oct 30, 2023
af958cd
more tweaking
pokey Oct 30, 2023
c719344
carousel
pokey Oct 30, 2023
d9f91b9
tweak spacing
pokey Oct 30, 2023
94adf19
tweak colors
pokey Oct 30, 2023
39e4d86
try left-aligned
pokey Oct 30, 2023
030c150
change order
pokey Oct 30, 2023
4b5b810
cleanup
pokey Oct 30, 2023
eca89db
borders on faces
pokey Oct 30, 2023
cc7c4a6
fix layout bug
pokey Oct 31, 2023
c62fe95
Bolder font on desktop light mode
pokey Oct 31, 2023
0506e04
tweak profile borders on light
pokey Oct 31, 2023
b84b175
Add subject and body to email links
pokey Nov 1, 2023
97b5050
More todos
pokey Nov 1, 2023
251fc0c
remove file
pokey Nov 1, 2023
4ec49fe
Fix spam blocker
pokey Nov 1, 2023
30cec5b
fix bg color
pokey Nov 1, 2023
3e1a672
Merge branch 'main' into pokey/cursorless-enablement-group-page
pokey Nov 1, 2023
83c67ee
Remove carousel for testimonials
pokey Nov 2, 2023
1e41a37
Link to homepage
pokey Nov 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/logo-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions packages/cursorless-org/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { MDXComponents } from "mdx/types";

// This file allows you to provide custom React components
// to be used in MDX files. You can import and use any
// React component you want, including components from
// other libraries.

// This file is required to use MDX in `app` directory.
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
// Allows customizing built-in components, e.g. to add styling.
// h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
...components,
};
}
11 changes: 10 additions & 1 deletion packages/cursorless-org/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
const withMDX = require("@next/mdx")({
options: {
providerImportSource: "@mdx-js/react",
},
});

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
Expand All @@ -9,7 +15,10 @@ const nextConfig = {

return config;
},
experimental: {
mdxRs: true,
},
reactStrictMode: true,
};

module.exports = nextConfig;
module.exports = withMDX(nextConfig);
6 changes: 6 additions & 0 deletions packages/cursorless-org/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
},
"dependencies": {
"@cursorless/cheatsheet": "workspace:*",
"@mdx-js/loader": "2.3.0",
"@mdx-js/react": "2.3.0",
"@next/mdx": "13.4.10",
"eslint": "^8.38.0",
"eslint-config-next": "13.5.4",
"next": "13.5.4",
Expand All @@ -24,10 +27,13 @@
},
"devDependencies": {
"@svgr/webpack": "6.5.1",
"@types/mdx": "2.0.5",
"@types/mdx-js__react": "1.5.5",
"@types/node": "^16.11.3",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"autoprefixer": "10.4.13",
"daisyui": "3.9.4",
"http-server": "14.1.1",
"postcss": "8.4.31",
"tailwindcss": "3.2.7"
Expand Down
Binary file added packages/cursorless-org/public/andrew-dant.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/cursorless-org/public/big-hats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added packages/cursorless-org/public/james-stout.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/cursorless-org/public/sohee-yang.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/cursorless-org/public/video-share-thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
import {
DESCRIPTION,
BASE_URL,
VIDEO_SHARE_THUMBNAIL_HEIGHT,
VIDEO_SHARE_THUMBNAIL_URL,
YOUTUBE_SLUG,
TITLE,
VIDEO_SHARE_THUMBNAIL_WIDTH,
VIDEO_SHARE_THUMBNAIL_HEIGHT,
} from "./constants";

export default function Social() {
export interface Props {
title: string;
description: string;
relativeUrl: string;
youtubeSlug?: string;
thumbnailUrl?: string;
thumbnailWidth?: string;
thumbnailHeight?: string;
}

export default function BaseSocial({
title,
description,
relativeUrl,
youtubeSlug,
thumbnailUrl = VIDEO_SHARE_THUMBNAIL_URL,
thumbnailWidth = VIDEO_SHARE_THUMBNAIL_WIDTH,
thumbnailHeight = VIDEO_SHARE_THUMBNAIL_HEIGHT,
}: Props) {
const url = `${BASE_URL}/${relativeUrl}`;

return (
<>
<meta property="og:title" content={TITLE} key="title" />
<meta property="og:title" content={title} key="title" />
<link
rel="apple-touch-icon"
sizes="180x180"
Expand All @@ -31,30 +48,63 @@ export default function Social() {
/>
<link rel="manifest" href="/site.webmanifest" />
<meta property="og:site_name" content="Cursorless" />
<meta property="og:url" content={BASE_URL} />
<meta property="og:image" content={VIDEO_SHARE_THUMBNAIL_URL} />
<meta property="og:image:width" content={VIDEO_SHARE_THUMBNAIL_WIDTH} />
<meta property="og:image:height" content={VIDEO_SHARE_THUMBNAIL_HEIGHT} />
<meta property="og:description" content={DESCRIPTION} />
<meta property="og:url" content={url} />
<meta property="og:image" content={thumbnailUrl} />
<meta property="og:image:width" content={thumbnailWidth} />
<meta property="og:image:height" content={thumbnailHeight} />
<meta property="og:description" content={description} />
<meta property="og:type" content="video" />
{youtubeSlug != null ? (
<VideoSocial youtubeSlug={youtubeSlug} />
) : (
<meta name="twitter:card" content="summary_large_image" />
)}
<meta name="twitter:site" content="@GoCursorless" />
<meta name="twitter:url" content={url} />
<meta name="twitter:title" content="Cursorless" />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={thumbnailUrl} />
<link itemProp="url" href={url} />
<meta itemProp="name" content="Cursorless" />
<meta itemProp="description" content={description} />
<meta name="description" content={description} />
<meta itemProp="paid" content="false" />
<meta itemProp="channelId" content="UCIh61mLlS6Do3R_8KnEScIQ" />
<link itemProp="thumbnailUrl" href={thumbnailUrl} />
<meta itemProp="isFamilyFriendly" content="true" />
<meta
itemProp="regionsAllowed"
content="HK,HT,TC,BW,PA,FK,AW,TN,AU,GE,SL,CC,TF,PN,TZ,CL,ET,BN,AR,PH,VI,EE,MY,LB,BM,UG,LU,NZ,KR,GG,BJ,SO,HM,GT,PR,IT,AZ,ZA,MH,MF,CW,UY,MN,MQ,MW,SE,PT,MK,SR,MA,RS,GQ,NP,BD,FM,GD,KI,IL,CK,YE,ML,BF,AO,SG,CG,GS,BI,CY,LR,UM,GH,BR,GY,KP,PM,IO,EH,SK,LV,AQ,IN,RE,LY,ZW,SZ,HR,LT,KE,TT,CR,KW,ER,NF,TK,BE,JM,SA,BH,RO,BO,MM,TH,IE,TD,QA,CN,FR,SC,VU,MG,SY,JP,PS,JO,MV,MD,TL,BY,GN,TJ,DE,TO,TR,BT,FJ,TW,AE,ES,DO,BS,NO,GU,DK,KH,SD,GB,ZM,VE,SS,IQ,AD,KG,NI,PK,PL,CZ,NA,LC,PY,SV,LA,AI,YT,US,VC,IR,NL,NU,AS,AL,GR,SH,GM,LS,ME,TV,EG,CF,DZ,SX,CA,PF,KM,AF,HN,NE,CD,MX,NC,CM,CX,SJ,GW,GF,VG,TG,BA,GP,CV,BQ,MO,SN,CH,BZ,MP,PE,FI,BB,GI,IS,PG,SM,BL,BG,AX,AM,AT,AG,ID,CI,GA,MC,NG,RW,SI,BV,UA,UZ,SB,LI,CU,VN,KN,WS,LK,IM,TM,OM,KY,VA,MT,MZ,DJ,EC,DM,HU,MU,FO,JE,NR,CO,WF,KZ,MR,GL,RU,MS,PW,ST"
/>
</>
);
}

interface VideoProps {
youtubeSlug: string;
}

function VideoSocial({ youtubeSlug }: VideoProps) {
return (
<>
<meta
property="og:video:url"
content={`https://www.youtube.com/embed/${YOUTUBE_SLUG}`}
content={`https://www.youtube.com/embed/${youtubeSlug}`}
/>
<meta
property="og:video:secure_url"
content={`https://www.youtube.com/embed/${YOUTUBE_SLUG}`}
content={`https://www.youtube.com/embed/${youtubeSlug}`}
/>
<meta property="og:video:type" content="text/html" />
<meta property="og:video:width" content="1280" />
<meta property="og:video:height" content="720" />
<meta
property="og:video:url"
content={`http://www.youtube.com/v/${YOUTUBE_SLUG}?version=3&amp;autohide=1`}
content={`http://www.youtube.com/v/${youtubeSlug}?version=3&amp;autohide=1`}
/>
<meta
property="og:video:secure_url"
content={`https://www.youtube.com/v/${YOUTUBE_SLUG}?version=3&amp;autohide=1`}
content={`https://www.youtube.com/v/${youtubeSlug}?version=3&amp;autohide=1`}
/>
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="1280" />
Expand All @@ -67,28 +117,12 @@ export default function Social() {
<meta property="og:video:tag" content="Talon voice" />

<meta name="twitter:card" content="player" />
<meta name="twitter:site" content="@GoCursorless" />
<meta name="twitter:url" content={BASE_URL} />
<meta name="twitter:title" content="Cursorless" />
<meta name="twitter:description" content={DESCRIPTION} />
<meta name="twitter:image" content={VIDEO_SHARE_THUMBNAIL_URL} />
<meta
name="twitter:player"
content={`https://www.youtube.com/embed/${YOUTUBE_SLUG}`}
content={`https://www.youtube.com/embed/${youtubeSlug}`}
/>
<meta name="twitter:player:width" content="1280" />
<meta name="twitter:player:height" content="720" />
<link itemProp="url" href={BASE_URL} />
<meta itemProp="name" content="Cursorless" />
<meta itemProp="description" content={DESCRIPTION} />
<meta itemProp="paid" content="false" />
<meta itemProp="channelId" content="UCIh61mLlS6Do3R_8KnEScIQ" />
<link itemProp="thumbnailUrl" href={VIDEO_SHARE_THUMBNAIL_URL} />
<meta itemProp="isFamilyFriendly" content="true" />
<meta
itemProp="regionsAllowed"
content="HK,HT,TC,BW,PA,FK,AW,TN,AU,GE,SL,CC,TF,PN,TZ,CL,ET,BN,AR,PH,VI,EE,MY,LB,BM,UG,LU,NZ,KR,GG,BJ,SO,HM,GT,PR,IT,AZ,ZA,MH,MF,CW,UY,MN,MQ,MW,SE,PT,MK,SR,MA,RS,GQ,NP,BD,FM,GD,KI,IL,CK,YE,ML,BF,AO,SG,CG,GS,BI,CY,LR,UM,GH,BR,GY,KP,PM,IO,EH,SK,LV,AQ,IN,RE,LY,ZW,SZ,HR,LT,KE,TT,CR,KW,ER,NF,TK,BE,JM,SA,BH,RO,BO,MM,TH,IE,TD,QA,CN,FR,SC,VU,MG,SY,JP,PS,JO,MV,MD,TL,BY,GN,TJ,DE,TO,TR,BT,FJ,TW,AE,ES,DO,BS,NO,GU,DK,KH,SD,GB,ZM,VE,SS,IQ,AD,KG,NI,PK,PL,CZ,NA,LC,PY,SV,LA,AI,YT,US,VC,IR,NL,NU,AS,AL,GR,SH,GM,LS,ME,TV,EG,CF,DZ,SX,CA,PF,KM,AF,HN,NE,CD,MX,NC,CM,CX,SJ,GW,GF,VG,TG,BA,GP,CV,BQ,MO,SN,CH,BZ,MP,PE,FI,BB,GI,IS,PG,SM,BL,BG,AX,AM,AT,AG,ID,CI,GA,MC,NG,RW,SI,BV,UA,UZ,SB,LI,CU,VN,KN,WS,LK,IM,TM,OM,KY,VA,MT,MZ,DJ,EC,DM,HU,MU,FO,JE,NR,CO,WF,KZ,MR,GL,RU,MS,PW,ST"
/>
</>
);
}
13 changes: 13 additions & 0 deletions packages/cursorless-org/src/components/IndexSocial.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import BaseSocial from "./BaseSocial";
import { DESCRIPTION, TITLE, VIDEO_SHARE_THUMBNAIL_URL } from "./constants";

export default function IndexSocial() {
return (
<BaseSocial
title={TITLE}
description={DESCRIPTION}
youtubeSlug={VIDEO_SHARE_THUMBNAIL_URL}
relativeUrl=""
/>
);
}
142 changes: 142 additions & 0 deletions packages/cursorless-org/src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import { MDXProvider } from "@mdx-js/react";
import type { MDXComponents } from "mdx/types.js";
import Head from "next/head";
import Logo from "../pages/logo.svg";
import BaseSocial from "./BaseSocial";
import { SpamProofEmailLink } from "./SpamProofEmailLink";

const components: MDXComponents = {
h1: ({ children }) => (
<h1 className="text-center uppercase text-[1.88em] leading-tight mt-7 tracking-[0.14em] font-semibold">
{children}
</h1>
),
h2: ({ children }) => (
<h2 className="uppercase text-[1.4em] mt-8 mb-4 sm:mb-8 font-semibold tracking-[0.08em]">
{children}
</h2>
),
h3: ({ children }) => (
<h3 className="uppercase text-[1.5rem] mt-6 mb-3 sm:mb-6 font-medium tracking-[0.08em]">
{children}
</h3>
),
h4: ({ children }) => (
<h4 className="uppercase text-[1.5rem] mt-11 mb-3 sm:mb-6 font-medium tracking-[0.08em]">
{children}
</h4>
),
hr: () => <hr className="my-8 border-teal-400" />,
ul: ({ children }) => <ul className="list-disc ml-8">{children}</ul>,
ol: ({ children }) => <ol className="list-decimal ml-8">{children}</ol>,
li: ({ children }) => <li className="my-2">{children}</li>,
img: ({ src, alt }) => (
// FIXME: Figure out how to use next/image with MDX
// eslint-disable-next-line @next/next/no-img-element
<img
className="mx-auto my-12 rounded-[4px] border-teal-400 border-[1.5px]"
src={src}
alt={alt}
style={{ maxWidth: "100%" }}
/>
),
CursorlessScreenshot: ({ src, alt }) => (
// FIXME: Figure out how to use next/image with MDX
// eslint-disable-next-line @next/next/no-img-element
<img
className="mx-auto my-12 border-teal-400 border p-3 sm:p-6 rounded-sm"
src={src}
alt={alt}
style={{ maxWidth: "100%" }}
/>
),
CalloutParent: ({ children }) => (
<div className="border-teal-400 border rounded-sm px-7 my-12">
{children}
</div>
),
CalloutBox: ({ title, children }) => (
<div className="my-6">
<h4 className="uppercase text-[1.5rem] mb-3 sm:mb-6 leading-tight font-medium tracking-[0.08em]">
{title}
</h4>
{children}
</div>
),
Testimonials: ({ children }) => (
<div className="carousel items-start gap-6 w-full sm:w-[110%] md:w-[125%] lg:w-[150%] box-border">
{children}
</div>
),
Testimonial: ({ children, src, name, title, company }) => (
<div className="w-3/4 sm:w-3/4 md:w-3/4 lg:w-2/3 box-border carousel-item flex flex-col items-center mt-8 mb-8 bg-teal-100 dark:bg-teal-900 border border-teal-400 text-teal-700 dark:text-teal-300 p-3 sm:p-6 rounded-sm">
<blockquote className="mb-5 sm:mb-6 flex flex-col gap-4">
{children}
</blockquote>
<div className="flex items-center gap-4">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
className="rounded-full w-[4.5em] h-[4.5em] border-teal-400 border dark:border-[0.5px]"
src={src}
alt={name}
/>
<div className="flex flex-col gap-[0.375rem]">
<div className="text-teal-800 dark:text-teal-200 font-semibold text-[1.2em] leading-none">
{name}
</div>
<div className="text-[0.9em] leading-none">{title}</div>
<div className="text-[0.9em] leading-none">{company}</div>
</div>
</div>
</div>
),
Tiers: ({ children }) => (
<div className="my-8 font-medium tracking-[0.1em] text-[1.2em]">
{children}
</div>
),
Tier: ({ emoji, type, price, address, subject, body }) => (
<div className="flex gap-3 leading-8">
<span className="">{emoji}</span>
<span className="uppercase">{type}</span>
<span>{"-"}</span>
<SpamProofEmailLink address={address} subject={subject} body={body}>
{price} / year
</SpamProofEmailLink>
</div>
),
};

export const bodyClasses = "bg-salmon-100 dark:bg-salmon-900";

export interface Props extends React.PropsWithChildren {
title: string;
description: string;
relativeUrl: string;
}

export function Layout({ title, description, relativeUrl, children }: Props) {
return (
<>
<Head>
<title>{title}</title>
<BaseSocial
title={title}
description={description}
relativeUrl={relativeUrl}
/>
</Head>
<MDXProvider components={components}>
<main className="text-salmon-900 dark:text-salmon-100 font-mono font-normal sm:dark:font-light px-4 pt-8 sm:pt-16 lg:pt-20 pb-8 tracking-[0.08em] leading-6">
<div className="max-w-prose mx-auto">
<Logo
title="Logo"
className="mx-auto align-middle w-[6.284em] h-[6.284em]"
/>
{children}
</div>
</main>
</MDXProvider>
</>
);
}
Loading