Skip to content

Commit

Permalink
add ccpa and new privacy policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Legal authored and stijnvdkolk committed Jun 20, 2024
1 parent b355d26 commit b1573a0
Show file tree
Hide file tree
Showing 10 changed files with 1,195 additions and 467 deletions.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@
"react-icons": "^5.0.1",
"react-infinite-scroller": "^1.2.6",
"react-use": "^17.4.0",
"remark-html": "^15.0.1",
"remark-parse": "^10.0.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"rehype-slug": "^6.0.0",
"rehype-stringify": "^10.0.0",
"remark-gfm": "^4.0.0",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"satori": "^0.10.13",
"sharp": "^0.33.3",
"tailwind-scrollbar": "^2.0.1",
"ulid": "^2.3.0",
"unified": "^10.1.2",
"unified": "^11.0.5",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
16 changes: 14 additions & 2 deletions src/pages/beta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import { Container } from '@/components/Container';
import { Title } from '@/components/Title';
import type { GetStaticProps, NextPage } from 'next';
import fs from 'node:fs/promises';
import remarkHtml from 'remark-html';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize from 'rehype-sanitize';
import rehypeSlug from 'rehype-slug';
import rehypeStringify from 'rehype-stringify';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';

type Props = {
Expand All @@ -15,7 +21,13 @@ export const getStaticProps: GetStaticProps<Props> = async () => {

const content = await unified()
.use(remarkParse)
.use(remarkHtml)
.use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeSanitize)
.use(rehypeSlug)
.use(rehypeAutolinkHeadings)
.use(rehypeStringify)
.process(text);

return {
Expand Down
16 changes: 14 additions & 2 deletions src/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import { Container } from '@/components/Container';
import { Title } from '@/components/Title';
import type { GetStaticProps, NextPage } from 'next';
import fs from 'node:fs/promises';
import remarkHtml from 'remark-html';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize from 'rehype-sanitize';
import rehypeSlug from 'rehype-slug';
import rehypeStringify from 'rehype-stringify';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';

type Props = {
Expand All @@ -15,7 +21,13 @@ export const getStaticProps: GetStaticProps<Props> = async () => {

const content = await unified()
.use(remarkParse)
.use(remarkHtml)
.use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeSanitize)
.use(rehypeSlug)
.use(rehypeAutolinkHeadings)
.use(rehypeStringify)
.process(text);

return {
Expand Down
52 changes: 52 additions & 0 deletions src/pages/ccpa.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Container } from '@/components/Container';
import { Title } from '@/components/Title';
import type { GetStaticProps, NextPage } from 'next';
import fs from 'node:fs/promises';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeStringify from 'rehype-stringify';
import rehypeSlug from 'rehype-slug';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize from 'rehype-sanitize';

type Props = {
content: string;
};

export const getStaticProps: GetStaticProps<Props> = async () => {
const text = await fs.readFile('static/ccpa.md', 'utf8');

const content = await unified()
.use(remarkParse)
.use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeSanitize)
.use(rehypeSlug)
.use(rehypeAutolinkHeadings)
.use(rehypeStringify)
.process(text);

return {
props: {
content: String(content),
},
};
};

const CCPAPage: NextPage<Props> = ({ content }) => {
return (
<Container>
<Title>CCPA</Title>
<article
className="prose max-w-full pt-32 font-medium text-neutral-400 prose-headings:text-white prose-a:text-primary prose-strong:text-white prose-li:my-0.5"
dangerouslySetInnerHTML={{ __html: content }}
/>
</Container>
);
};

export default CCPAPage;
18 changes: 15 additions & 3 deletions src/pages/privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import { Container } from '@/components/Container';
import { Title } from '@/components/Title';
import type { GetStaticProps, NextPage } from 'next';
import fs from 'node:fs/promises';
import remarkHtml from 'remark-html';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize from 'rehype-sanitize';
import rehypeSlug from 'rehype-slug';
import rehypeStringify from 'rehype-stringify';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';

type Props = {
Expand All @@ -15,7 +21,13 @@ export const getStaticProps: GetStaticProps<Props> = async () => {

const content = await unified()
.use(remarkParse)
.use(remarkHtml)
.use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeSanitize)
.use(rehypeSlug)
.use(rehypeAutolinkHeadings)
.use(rehypeStringify)
.process(text);

return {
Expand All @@ -30,7 +42,7 @@ const PrivacyPage: NextPage<Props> = ({ content }) => {
<Container>
<Title>Privacy policy</Title>
<article
className="prose max-w-full pt-32 font-medium text-neutral-400 prose-headings:text-white prose-a:text-primary prose-li:my-0.5"
className="prose max-w-full pt-32 font-medium text-neutral-400 prose-headings:text-white prose-a:text-primary prose-strong:text-white prose-li:my-0.5"
dangerouslySetInnerHTML={{ __html: content }}
/>
</Container>
Expand Down
16 changes: 14 additions & 2 deletions src/pages/terms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import { Container } from '@/components/Container';
import { Title } from '@/components/Title';
import type { GetStaticProps, NextPage } from 'next';
import fs from 'node:fs/promises';
import remarkHtml from 'remark-html';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize from 'rehype-sanitize';
import rehypeSlug from 'rehype-slug';
import rehypeStringify from 'rehype-stringify';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';

type Props = {
Expand All @@ -15,7 +21,13 @@ export const getStaticProps: GetStaticProps<Props> = async () => {

const content = await unified()
.use(remarkParse)
.use(remarkHtml)
.use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeSanitize)
.use(rehypeSlug)
.use(rehypeAutolinkHeadings)
.use(rehypeStringify)
.process(text);

return {
Expand Down
16 changes: 14 additions & 2 deletions src/pages/tiktok-ad-contest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import { Container } from '@/components/Container';
import { Title } from '@/components/Title';
import type { GetStaticProps, NextPage } from 'next';
import fs from 'node:fs/promises';
import remarkHtml from 'remark-html';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize from 'rehype-sanitize';
import rehypeSlug from 'rehype-slug';
import rehypeStringify from 'rehype-stringify';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';

type Props = {
Expand All @@ -15,7 +21,13 @@ export const getStaticProps: GetStaticProps<Props> = async () => {

const content = await unified()
.use(remarkParse)
.use(remarkHtml)
.use(remarkGfm)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeSanitize)
.use(rehypeSlug)
.use(rehypeAutolinkHeadings)
.use(rehypeStringify)
.process(text);

return {
Expand Down
Loading

0 comments on commit b1573a0

Please sign in to comment.