From 8a764b92e8673322010b623ec6d79a7172e84fa7 Mon Sep 17 00:00:00 2001 From: prodkt Date: Fri, 20 Sep 2024 01:28:14 -0600 Subject: [PATCH 01/44] fix(marketing): updated file fileType imgs - adjustment of card types along with some fixes to storybook stories --- apps/marketing/package.json | 12 +- .../src/components/plutio/plutio.astro | 34 +++ apps/marketing/src/database.types.ts | 45 +++ apps/marketing/src/layouts/PublicLayout.astro | 2 + .../src/pages/docs/[pageSlug]/index.astro | 12 +- .../src/pages/docs/[pageSlug]/index.json.ts | 4 +- apps/marketing/src/pages/docs/index.astro | 14 +- apps/marketing/src/pages/docs/index.json.ts | 5 +- apps/marketing/src/pages/files/index.astro | 12 +- bun.lockb | Bin 1010768 -> 1056256 bytes cspell.config.yaml | 5 +- packages/ui/package.json | 1 + packages/ui/src/brands/technologies/react.tsx | 4 +- .../ui/src/brands/technologies/storybook.tsx | 6 +- packages/ui/src/database.types.ts | 45 +++ .../prodkt-components/about-prodkt/index.tsx | 61 ++-- .../blog-post/blog-post.stories.tsx | 278 +++++------------- .../src/prodkt-components/blog-post/index.tsx | 2 - .../ui/src/prodkt-components/card/index.tsx | 10 +- .../prodkt-components/file/file.stories.tsx | 12 +- .../ui/src/prodkt-components/file/index.tsx | 36 +-- .../prodkt-components/hero-header/index.tsx | 75 +++-- .../prodkt-components/logo-cloud/index.tsx | 51 ++-- .../logo-cloud/logo-cloud.stories.tsx | 31 +- .../prodkt-components/page-footer/index.tsx | 26 +- 25 files changed, 411 insertions(+), 372 deletions(-) create mode 100644 apps/marketing/src/components/plutio/plutio.astro diff --git a/apps/marketing/package.json b/apps/marketing/package.json index a1a83b5..caa2cbf 100644 --- a/apps/marketing/package.json +++ b/apps/marketing/package.json @@ -42,31 +42,31 @@ "lucide-react": "^0.441.0", "micromatch": "^4.0.8", "next-themes": "^0.3.0", - "posthog-js": "^1.161.5", + "posthog-js": "^1.162.0", "react": "^18.3.1", "react-dom": "^18.3.1", "reactflow": "^11.11.4", - "sass": "^1.78.0", + "sass": "^1.79.2", "supabase": "^1.192.5", "zod": "^3.23.8" }, "devDependencies": { "@astrojs/check": "^0.9.3", - "@astrojs/mdx": "^3.1.6", + "@astrojs/mdx": "^3.1.7", "@astrojs/react": "^3.6.2", "@astrojs/sitemap": "^3.1.6", - "@astrojs/tailwind": "^5.1.0", + "@astrojs/tailwind": "^5.1.1", "@playwright/test": "^1.45.2", "@prodkt/eslint": "workspace:*", "@prodkt/tailwind": "workspace:*", "@prodkt/tsconfig": "workspace:*", "@sentry/astro": "^8.30.0", - "@types/react": "^18.3.6", + "@types/react": "^18.3.8", "@types/react-dom": "^18.3.0", "autoprefixer": "^10.4.20", "dotenv": "^16.4.5", "postcss": "^8.4.47", "postcss-import": "^16.1.0", - "tailwindcss": "^3.4.11" + "tailwindcss": "^3.4.12" } } diff --git a/apps/marketing/src/components/plutio/plutio.astro b/apps/marketing/src/components/plutio/plutio.astro new file mode 100644 index 0000000..f7003ee --- /dev/null +++ b/apps/marketing/src/components/plutio/plutio.astro @@ -0,0 +1,34 @@ +--- +// @ts-nocheck +--- + + diff --git a/apps/marketing/src/database.types.ts b/apps/marketing/src/database.types.ts index 8eda098..383871d 100644 --- a/apps/marketing/src/database.types.ts +++ b/apps/marketing/src/database.types.ts @@ -2369,11 +2369,26 @@ export type Database = { }, ] } + documentation_navigation: { + Row: { + id: string + } + Insert: { + id: string + } + Update: { + id?: string + } + Relationships: [] + } documentation_page: { Row: { date_created: string | null date_updated: string | null + excerpt: string | null id: string + image: string | null + order_id: string | null slug: string | null sort: number | null status: string @@ -2384,7 +2399,10 @@ export type Database = { Insert: { date_created?: string | null date_updated?: string | null + excerpt?: string | null id: string + image?: string | null + order_id?: string | null slug?: string | null sort?: number | null status?: string @@ -2395,7 +2413,10 @@ export type Database = { Update: { date_created?: string | null date_updated?: string | null + excerpt?: string | null id?: string + image?: string | null + order_id?: string | null slug?: string | null sort?: number | null status?: string @@ -2404,6 +2425,20 @@ export type Database = { user_updated?: string | null } Relationships: [ + { + foreignKeyName: 'documentation_page_image_foreign' + columns: ['image'] + isOneToOne: false + referencedRelation: 'directus_files' + referencedColumns: ['id'] + }, + { + foreignKeyName: 'documentation_page_order_id_foreign' + columns: ['order_id'] + isOneToOne: false + referencedRelation: 'documentation_navigation' + referencedColumns: ['id'] + }, { foreignKeyName: 'documentation_page_user_created_foreign' columns: ['user_created'] @@ -3002,23 +3037,33 @@ export type Database = { folder: { Row: { id: string + image: string | null parent: string | null project: string | null title: string | null } Insert: { id: string + image?: string | null parent?: string | null project?: string | null title?: string | null } Update: { id?: string + image?: string | null parent?: string | null project?: string | null title?: string | null } Relationships: [ + { + foreignKeyName: 'folder_image_foreign' + columns: ['image'] + isOneToOne: false + referencedRelation: 'directus_files' + referencedColumns: ['id'] + }, { foreignKeyName: 'folder_parent_foreign' columns: ['parent'] diff --git a/apps/marketing/src/layouts/PublicLayout.astro b/apps/marketing/src/layouts/PublicLayout.astro index 7d398ca..ae1379f 100644 --- a/apps/marketing/src/layouts/PublicLayout.astro +++ b/apps/marketing/src/layouts/PublicLayout.astro @@ -8,6 +8,7 @@ import { Header } from '@prodkt/ui/prodkt-components/header' import { PageFooter } from '@prodkt/ui/prodkt-components/page-footer' import BaseHead from '@/components/BaseHead.astro' +import Plutio from '@/components/plutio/plutio.astro' import PostHog from '@/components/posthog/PostHog.astro' type Appearance = 'inherit' | 'light' | 'dark' @@ -75,6 +76,7 @@ const { +
- +
element of an Edge */ .react-flow__edge-path { - @apply stroke-[var(--grayA9)] stroke-1 ease-in-out; + stroke: url(#edge-gradient); + stroke-linecap: round; + stroke-width: 1.5; + stroke-dasharray: 1 3; + stroke-linejoin: round; + marker-end: none; +} + +.react-flow__edge .react-flow__edge-path { + stroke-opacity: 0.75; +} + +.react-flow__edgelabel-renderer button { + @apply size-6 flex items-center content-center place-content-center place-items-center pb-0.5 justify-center leading-[100%] rounded-full bg-radial-gradient from-[var(--grayA6)] backdrop-blur-[2px] to-[var(--grayA1)] text-lg text-[var(--ghost-a12)]; + border: 0px solid transparent; } /* The SVG element of an Edge label */ .react-flow__edge-text { @@ -76,6 +77,7 @@ } /* Applied to the current connection line */ .react-flow__connection { + /* @apply bg-gradient-to-t from-[var(--gray12)] to-[var(--gray1)]; */ } /* The SVG of a connection line */ .react-flow__connection-path { @@ -85,7 +87,7 @@ } /* Applied to each Node in the flow */ .react-flow__node { - @apply bg-[var(--grayA4)] backdrop-blur border-[var(--grayA4)] rounded-2xl px-8 py-4; + @apply bg-[var(--gray1)] backdrop-blur border-[var(--grayA4)] rounded-2xl px-8 py-4; @apply drop-shadow-2xl shadow-[var(--grayA2)]; & .selected { @@ -93,7 +95,7 @@ } /* .selected Added to a Node when selected. */ .react-flow__node { - @apply after:bg-gradient-to-br after:from-[var(--grayA1)] after:to-[var(--grayA1)] after:blur-3xl after:w-full after:h-full after:top-0 after:bottom-0 after:left-0 after:right-0 after:z-[10] after:absolute; + @apply after:bg-gradient-to-br after:from-[var(--grayA1)] after:to-[var(--ghost-aa4)] after:blur-3xl after:w-full after:h-full after:top-0 after:bottom-0 after:left-0 after:right-0 after:z-[10] after:absolute; } /* Added when Node type is "default" */ .react-flow__node-default { @@ -112,50 +114,53 @@ } /* Applied to each component */ .react-flow__handle { + @apply size-4 bg-[var(--grayA9)] border border-[var(--grayA12)] rounded-full shadow-[var(--ghost-aa12)] shadow-xl ring-1 ring-inset ring-[var(--grayA9)]; + @apply transition-all ease-in-out duration-500; +} + +.react-flow__handle.source { + right: -20px; +} + +.react-flow__handle.target { + left: -20px; +} + +.react-flow__node:focus { } + /* Applied when a handle's Position is set to "top" */ .react-flow__handle-top { } /* Applied when a handle's Position is set to "right" */ .react-flow__handle-right { + /* @apply right-[-12px]; */ } /* Applied when a handle's Position is set to "bottom" */ .react-flow__handle-bottom { } /* Applied when a handle's Position is set to "left" */ .react-flow__handle-left { + /* @apply left-[-12px]; */ } /* Added to a Handle when a connection line is above a handle. */ .connectingfrom { + @apply size-8 transition-all ease-in-out duration-1000; } /* Added to a Handle when a connection line is above a handle. */ .connectingto { + @apply size-8 transition-all ease-in-out duration-1000; } /* */ -.valid - Added - to - a - Handle - when - a - connection - line - is - above - and - the - connection - is - valid { +.valid { } /* Applied to the component */ .react-flow__background { - @apply bg-[var(--gray2)]; + @apply bg-gradient-to-br from-[var(--gray6)] to-[var(--gray5)] dark:from-[var(--gray2)] dark:to-[var(--gray1)]; } /* Applied to the component */ .react-flow__minimap { - @apply bg-[var(--grayA1)] rounded-2xl border overflow-clip backdrop-blur before:opacity-0 after:opacity-0; + @apply bg-[var(--ghost-aa7)] rounded-2xl border border-[var(--grayA3)] overflow-clip backdrop-blur before:opacity-0 after:opacity-0; } /* Applied to the component */ .react-flow__controls { @@ -163,7 +168,12 @@ } .react-flow__panel { - @apply bg-[var(--grayA1)] backdrop-blur; + @apply bg-[var(--ghost-aa8)] dark:bg-[var(--grayA3)] ring-1 ring-[var(--grayA2)] backdrop-blur border-none; +} + +.react-flow__attribution { + visibility: hidden; + display: none; } .react-flow__minimap::before { diff --git a/packages/config/tailwind/src/color.css b/packages/config/tailwind/src/color.css index bdeeb3a..66bd099 100644 --- a/packages/config/tailwind/src/color.css +++ b/packages/config/tailwind/src/color.css @@ -131,28 +131,6 @@ @tailwind components; @tailwind utilities; @tailwind base; -:root { - --background: 0 0% 100%; - --foreground: 222.2 47.4% 11.2%; - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - --card: var(--gray2); - --card-foreground: var(--gray11); - --popover: var(--gray3); - --popover-foreground: var(--gray11); - --border: var(--grayA4); - --input: var(--gray4); - --primary: var(--accent9); - --primary-foreground: var(--accent2); - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 100% 50%; - --destructive-foreground: 210 40% 98%; - --ring: 215 20.2% 65.1%; - --radius: 0.5rem; -} [data-accent-color='amber'] { --accent1: var(--amber1); @@ -966,6 +944,29 @@ --grayA12: var(--slateA12); } +:root { + --background: var(--gray2); + --foreground: var(--gray11); + --muted: var(--gray3); + --muted-foreground: var(--gray11); + --card: var(--gray2); + --card-foreground: var(--gray11); + --popover: var(--gray3); + --popover-foreground: var(--gray11); + --border: var(--grayA4); + --input: var(--gray4); + --primary: var(--accent9); + --primary-foreground: var(--accent2); + --secondary: var(--violet9); + --secondary-foreground: var(--violet12); + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + --destructive: 0 100% 50%; + --destructive-foreground: 210 40% 98%; + --ring: 215 20.2% 65.1%; + --radius: 0.5rem; +} + @layer base { :root { --chart-1: 12 76% 61%; diff --git a/packages/ui/src/prodkt-components/about-prodkt/index.tsx b/packages/ui/src/prodkt-components/about-prodkt/index.tsx index 27a85e6..c5a8708 100644 --- a/packages/ui/src/prodkt-components/about-prodkt/index.tsx +++ b/packages/ui/src/prodkt-components/about-prodkt/index.tsx @@ -35,15 +35,29 @@ const AboutProdkt = React.forwardRef(({ ...props }, ref) => {

What is Prodkt?

-
-
- -
-

- Lets get to the details +
+
+

+
+ A resume made available to companies I've expressed interest + in for potential employment. +

+

+
+ A resume made available to companies I've expressed interest + in for potential employment. +

+
+
+

+
+ Building towards a multi-tenant SaaS platform for technical + Designer/Developers looking to showcase their work.

-

- Lets get to the details +

+
+ Building towards a multi-tenant SaaS platform for technical + Designer/Developers looking to showcase their work.

@@ -56,82 +70,82 @@ const AboutProdkt = React.forwardRef(({ ...props }, ref) => {
- -

+ +

Prodkt

-

+

Portfolio Engine

-
+
{/*
*/} {''}
-
+
{/*
*/} {''}
-
+
{/*
*/} {''}
-
+
{/*
*/} {''}
Chip glow Chip glow - - + +
-
+
- + - + - + - + - + - +
@@ -143,10 +157,10 @@ const AboutProdkt = React.forwardRef(({ ...props }, ref) => { The driving force above all other intentions and purpose is simple...

-

+

Get hired.

-
+
I{`'`}m in search of my next challenge.
@@ -156,7 +170,7 @@ const AboutProdkt = React.forwardRef(({ ...props }, ref) => { {/* */} {/* */} - + ) diff --git a/packages/ui/src/prodkt-components/logo-cloud/index.tsx b/packages/ui/src/prodkt-components/logo-cloud/index.tsx index 7202644..01b09e1 100644 --- a/packages/ui/src/prodkt-components/logo-cloud/index.tsx +++ b/packages/ui/src/prodkt-components/logo-cloud/index.tsx @@ -12,10 +12,10 @@ const LogoCloud = React.forwardRef< className='relative -top-px z-[6] flex w-fit flex-row items-center justify-center -space-x-px backdrop-blur' {...props} > -
-
-
-
+
+
+
+
{children}
) @@ -28,7 +28,7 @@ const CloudLogo = React.forwardRef< return (
{children} diff --git a/packages/ui/src/prodkt-components/mode-toggle/index.tsx b/packages/ui/src/prodkt-components/mode-toggle/index.tsx index 7e2eb44..466cd6e 100644 --- a/packages/ui/src/prodkt-components/mode-toggle/index.tsx +++ b/packages/ui/src/prodkt-components/mode-toggle/index.tsx @@ -118,7 +118,7 @@ export function ModeToggle() { root.setAttribute('data-theme', 'light-theme') root.setAttribute( 'style', - 'color-scheme: light-theme;; background-color: var(--gray1);', + 'color-scheme: light-theme; background-color: var(--gray2)', ) } else { root.classList.add('dark-theme') @@ -128,7 +128,7 @@ export function ModeToggle() { root.setAttribute('data-theme', 'dark-theme') root.setAttribute( 'style', - 'color-scheme: dark-theme; background-color: var(--gray1);', + 'color-scheme: dark-theme; background-color: var(--gray2)', ) } }, [theme]) diff --git a/packages/ui/src/prodkt-components/page-footer/index.tsx b/packages/ui/src/prodkt-components/page-footer/index.tsx index 580209a..0550064 100644 --- a/packages/ui/src/prodkt-components/page-footer/index.tsx +++ b/packages/ui/src/prodkt-components/page-footer/index.tsx @@ -10,12 +10,12 @@ export default function PageFooter() { return (
-
+
-
+

Working remote

Las Vegas, Nevada

Boise, Idaho

@@ -25,30 +25,42 @@ export default function PageFooter() {
-
-
+
+
- -
-

+

+

© Copyright 2024 Bryan Funk

From 365fa4dd64d02ffa2ba8ab8f618bbefa87e019f6 Mon Sep 17 00:00:00 2001 From: Bryan Funk Date: Sat, 28 Sep 2024 11:59:51 -0600 Subject: [PATCH 25/44] refactor(marketing): refactor of API endpoints prep for auth accounts Rewrite of API endpoints to prepare for authorize with supabase for user accounts BREAKING CHANGE: changes to the supabase client for server and client side and updates to middleware to accomodate --- apps/marketing/package.json | 13 + apps/marketing/src/components/avatar.tsx | 14 - .../marketing/src/components/docs-aside.astro | 6 +- apps/marketing/src/components/login.tsx | 73 +++ .../src/components/page-header.astro | 55 ++- .../src/components/shared/placeholder.css | 18 + .../src/components/shared/tiptap-editor.tsx | 81 ++++ apps/marketing/src/components/signup.tsx | 71 +++ .../marketing/src/components/work-history.tsx | 76 ++- apps/marketing/src/layouts/PublicLayout.astro | 19 +- apps/marketing/src/lib/types.ts | 123 +++++ apps/marketing/src/middleware/index.ts | 62 ++- apps/marketing/src/pages/api/docs-toc.json.ts | 24 +- apps/marketing/src/pages/api/route.ts | 31 ++ .../src/pages/api/work-history.json.ts | 77 +++ apps/marketing/src/pages/auth/callback.ts | 33 ++ apps/marketing/src/pages/auth/confirm.ts | 41 ++ apps/marketing/src/pages/auth/login.ts | 60 +++ apps/marketing/src/pages/auth/register.ts | 26 + apps/marketing/src/pages/auth/signout.ts | 11 + .../src/pages/blog/[slug]/index.json.ts | 40 +- apps/marketing/src/pages/blog/index.astro | 61 +-- apps/marketing/src/pages/blog/index.json.ts | 47 +- .../marketing/src/pages/changelog/index.astro | 214 ++++----- .../src/pages/changelog/index.json.ts | 22 +- .../[codeblockSlug]/index.json.ts | 23 +- .../codeblocks/[templateSlug]/index.astro | 2 +- .../codeblocks/[templateSlug]/index.json.ts | 26 +- .../src/pages/codeblocks/index.astro | 58 ++- .../src/pages/codeblocks/index.json.ts | 27 +- apps/marketing/src/pages/dashboard.astro | 9 + .../docs/[pageSlug]/[groupSlug]/index.astro | 82 ++-- .../docs/[pageSlug]/[groupSlug]/index.json.ts | 25 +- .../src/pages/docs/[pageSlug]/index.astro | 116 +++-- .../src/pages/docs/[pageSlug]/index.json.ts | 27 +- apps/marketing/src/pages/docs/index.astro | 48 +- apps/marketing/src/pages/docs/index.json.ts | 24 +- apps/marketing/src/pages/files/index.astro | 91 ++-- apps/marketing/src/pages/files/index.json.ts | 20 +- .../src/pages/flows/[slug]/index.json.ts | 41 +- apps/marketing/src/pages/flows/index.astro | 63 +-- apps/marketing/src/pages/flows/index.json.ts | 21 +- apps/marketing/src/pages/login.astro | 8 + .../[projectSlug]/[workSlug]/index.json.ts | 29 +- .../projects/[projectSlug]/index.json.ts | 53 +-- .../marketing/src/pages/projects/create.astro | 21 + apps/marketing/src/pages/projects/index.astro | 63 +-- .../src/pages/projects/index.json.ts | 23 +- .../repos/[namespace]/[path]/index.astro | 4 +- .../repos/[namespace]/[path]/index.json.ts | 24 +- .../src/pages/repos/[namespace]/index.astro | 4 +- .../src/pages/repos/[namespace]/index.json.ts | 21 +- apps/marketing/src/pages/repos/index.astro | 61 +-- apps/marketing/src/pages/repos/index.json.ts | 22 +- apps/marketing/src/pages/signup.astro | 8 + .../work/[projectSlug]/[workSlug]/index.astro | 84 ---- .../[projectSlug]/[workSlug]/index.json.ts | 48 +- .../pages/work/[projectSlug]/index.json.ts | 25 +- apps/marketing/src/pages/work/index.astro | 63 +-- apps/marketing/src/pages/work/index.json.ts | 20 +- .../src/pages/workspace/[slug]/index.json.ts | 22 +- apps/marketing/src/supabase/index.tsx | 443 +++++++++++++++++- apps/marketing/src/supabase/server.astro | 27 ++ apps/marketing/tsconfig.json | 2 +- apps/marketing/turbo.json | 10 +- apps/web/package.json | 8 + bun.lockb | Bin 1190256 -> 1203480 bytes cspell.config.yaml | 8 + .../ui/src/prodkt-components/card/index.tsx | 6 +- .../prodkt-components/header-menu/index.tsx | 8 +- .../ui/src/prodkt-components/header/index.tsx | 6 +- .../responsive-dialog/index.tsx | 119 +++++ .../responsive-dialog/use-media-query.ts | 56 +++ .../prodkt-components/team-switcher/index.tsx | 26 +- packages/ui/tsconfig.json | 2 +- 75 files changed, 2413 insertions(+), 912 deletions(-) delete mode 100644 apps/marketing/src/components/avatar.tsx create mode 100644 apps/marketing/src/components/login.tsx create mode 100644 apps/marketing/src/components/shared/placeholder.css create mode 100644 apps/marketing/src/components/shared/tiptap-editor.tsx create mode 100644 apps/marketing/src/components/signup.tsx create mode 100644 apps/marketing/src/lib/types.ts create mode 100644 apps/marketing/src/pages/api/route.ts create mode 100644 apps/marketing/src/pages/api/work-history.json.ts create mode 100644 apps/marketing/src/pages/auth/callback.ts create mode 100644 apps/marketing/src/pages/auth/confirm.ts create mode 100644 apps/marketing/src/pages/auth/login.ts create mode 100644 apps/marketing/src/pages/auth/register.ts create mode 100644 apps/marketing/src/pages/auth/signout.ts create mode 100644 apps/marketing/src/pages/dashboard.astro create mode 100644 apps/marketing/src/pages/login.astro create mode 100644 apps/marketing/src/pages/projects/create.astro create mode 100644 apps/marketing/src/pages/signup.astro create mode 100644 apps/marketing/src/supabase/server.astro create mode 100644 packages/ui/src/prodkt-components/responsive-dialog/index.tsx create mode 100644 packages/ui/src/prodkt-components/responsive-dialog/use-media-query.ts diff --git a/apps/marketing/package.json b/apps/marketing/package.json index a1538e8..c6f7c4b 100644 --- a/apps/marketing/package.json +++ b/apps/marketing/package.json @@ -25,6 +25,8 @@ "@dnd-kit/core": "^6.1.0", "@dnd-kit/modifiers": "^7.0.0", "@dnd-kit/sortable": "^8.0.0", + "@dotlottie/react-player": "^1.6.19", + "@lottiefiles/dotlottie-react": "^0.9.0", "@prodkt/assets": "workspace:*", "@prodkt/blocks": "workspace:*", "@prodkt/env": "workspace:*", @@ -34,11 +36,21 @@ "@supabase/ssr": "^0.5.1", "@supabase/supabase-js": "^2.45.4", "@t3-oss/env-core": "^0.11.1", + "@tiptap/extension-character-count": "^2.1.12", + "@tiptap/extension-highlight": "^2.1.11", + "@tiptap/extension-link": "^2.2.4", + "@tiptap/extension-placeholder": "^2.1.11", + "@tiptap/extension-typography": "^2.1.11", + "@tiptap/pm": "^2.1.11", + "@tiptap/react": "^2.1.11", + "@tiptap/starter-kit": "^2.1.11", "@total-typescript/ts-reset": "^0.5.1", "@types/cheerio": "^0.22.35", "@types/micromatch": "^4.0.9", "@xyflow/react": "^12.3.0", "astro": "^4.15.9", + "base64-arraybuffer": "^1.0.2", + "chart.js": "^4.4.4", "cheerio": "^1.0.0", "class-variance-authority": "^0.7.0", "lucide-react": "^0.445.0", @@ -46,6 +58,7 @@ "next-themes": "^0.3.0", "posthog-js": "^1.164.2", "react": "^18.3.1", + "react-chartjs-2": "^5.2.0", "react-dom": "^18.3.1", "reactflow": "^11.11.4", "sass": "^1.79.3", diff --git a/apps/marketing/src/components/avatar.tsx b/apps/marketing/src/components/avatar.tsx deleted file mode 100644 index e000271..0000000 --- a/apps/marketing/src/components/avatar.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { - Avatar, - AvatarFallback, - AvatarImage, -} from '@prodkt/ui/primitives/avatar' - -export const MyAvatar = () => { - return ( - - - CN - - ) -} diff --git a/apps/marketing/src/components/docs-aside.astro b/apps/marketing/src/components/docs-aside.astro index 0385919..2a88342 100644 --- a/apps/marketing/src/components/docs-aside.astro +++ b/apps/marketing/src/components/docs-aside.astro @@ -51,14 +51,14 @@ interface DocTabsProps { documentationData: DocGroupItem[] } -const response = await GET() +const response = await GET(Astro) const data = await response.json() const { documentationData } = data as DocTabsProps ---
@@ -70,7 +70,7 @@ const { documentationData } = data as DocTabsProps &:has(.border-b):last-of-type { @apply border-b-0 border-b-transparent rounded-b-none; } - @apply sticky top-[80px] bg-[var(--grayA1)] overflow-hidden w-[327px] rounded-xl p-0; + @apply sticky top-[80px] bg-[var(--grayA1)] overflow-hidden rounded-xl p-0; ol { @apply py-1; li { diff --git a/apps/marketing/src/components/login.tsx b/apps/marketing/src/components/login.tsx new file mode 100644 index 0000000..93718c6 --- /dev/null +++ b/apps/marketing/src/components/login.tsx @@ -0,0 +1,73 @@ +import { Button } from '@prodkt/ui/primitives/button' +import { Input } from '@prodkt/ui/primitives/input' +import { Label } from '@prodkt/ui/primitives/label' + +/** + * + */ +export function LoginSection() { + return ( +
+
+
+
+ + {/* */} + {/* */} + +

Login to your account

+

+ Enter your email below to login to your account +

+
+
+
+ + +
+
+ + +
+ + +
+
+ Don't have an account?{' '} + + Sign up + +
+
+
+
+
+
+ +

+ A portfolio platform from Bryan Funk +

+
+
+
+
+ ) +} diff --git a/apps/marketing/src/components/page-header.astro b/apps/marketing/src/components/page-header.astro index 6aeec23..30e844d 100644 --- a/apps/marketing/src/components/page-header.astro +++ b/apps/marketing/src/components/page-header.astro @@ -16,7 +16,7 @@ const pageHeaderVariants = cva('', { cn( !minimal ? 'justify-center' : '', fullWidth ? 'w-full mx-0' : 'mx-auto', - 'flex flex-col items-center justify-between gap-20 relative h-auto', + 'flex flex-col items-center justify-between relative h-auto p-6 pt-10 md:pt-0 md:p-0', ), }, }, @@ -53,101 +53,100 @@ const {

{text}

> + placeholder?: string + className?: string + characterLimit?: number + proseInvert?: boolean +}) { + const editor = useEditor({ + extensions: [ + StarterKit as AnyExtension, + Highlight, + Typography, + Link.configure({ + HTMLAttributes: { + class: 'cursor-pointer', + }, + }), + Placeholder.configure({ + placeholder: placeholder ?? 'Write something...', + }), + CharacterCount.configure({ + limit: characterLimit ?? undefined, + }), + ], + content, + editorProps: { + attributes: { + class: `prose prose-sm dark:prose-invert focus:outline-none${proseInvert ? ' prose-invert' : ''}`, + }, + }, + onUpdate: ({ editor }) => { + setContent(editor.getHTML()) + }, + }) + + return ( + + ) +} diff --git a/apps/marketing/src/components/signup.tsx b/apps/marketing/src/components/signup.tsx new file mode 100644 index 0000000..e388245 --- /dev/null +++ b/apps/marketing/src/components/signup.tsx @@ -0,0 +1,71 @@ +import { Button } from '@prodkt/ui/primitives/button' +import { Input } from '@prodkt/ui/primitives/input' +import { Label } from '@prodkt/ui/primitives/label' + +/** + * + */ +export function RegisterSection() { + return ( +

+
+
+
+ + {/* */} + {/* */} + +

Create Account

+

+ Register below to access exclusive content and downlaods +

+
+
+
+ + +
+
+ + +
+ + +
+
+ Don't have an account?{' '} + + Sign up + +
+
+
+
+
+
+ +

+ A portfolio platform from Bryan Funk +

+
+
+
+
+ ) +} diff --git a/apps/marketing/src/components/work-history.tsx b/apps/marketing/src/components/work-history.tsx index 37fe042..ab5c33b 100644 --- a/apps/marketing/src/components/work-history.tsx +++ b/apps/marketing/src/components/work-history.tsx @@ -1,10 +1,10 @@ -/* eslint-disable @eslint-community/eslint-comments/disable-enable-pair */ /* eslint-disable jsdoc/require-returns */ +/* eslint-disable jsdoc/require-param-description */ +/* eslint-disable @eslint-community/eslint-comments/disable-enable-pair */ import { useEffect, useState } from 'react' import type { Database } from '@/database.types' -import type { PostgrestError } from '@supabase/supabase-js' import { DesignBoiseLogo, @@ -19,7 +19,8 @@ import { TabsTrigger, } from '@prodkt/ui/primitives/tabs' -import { supabase } from '@/supabase' +import { createClientSupabaseClient } from '@/supabase' +// import { GET as getSupabaseClient } from '@/supabase' import { formatDate } from '@/utils/formatDate' interface WorkItem { @@ -43,38 +44,65 @@ type Resumes = Database['public']['Tables']['resumes']['Row'] & { /** * */ -export function WorkHistory() { - const [resumes, setResumes] = useState([]) - const [error, setError] = useState(null) + +/** + * + * @param root0 + * @param root0.initialWorkHistory + */ + +const supabase = createClientSupabaseClient() + +/** + * + * @param root0 + * @param root0.initialWorkHistory + */ +export function WorkHistory({ initialWorkHistory = [] }) { + const [workHistory, setWorkHistory] = useState([]) + const [error, setError] = useState(null) useEffect(() => { - const fetchResumes = async () => { + const fetchWorkHistory = async () => { + if (initialWorkHistory.length > 0) return + try { - const { data } = await supabase + const { data, error } = await supabase .from('resumes') - .select( - '*, status,title,label,image,email,phone,url,summary,work,skills', - ) - .eq('title', 'Bryan Funk') + .select('*,image(filename_disk)') .eq('status', 'published') - setResumes(data as Resumes[]) - } catch (error) { - setError(error as PostgrestError) + if (error) { + throw new Error(error.message) + } + + if (Array.isArray(data)) { + setWorkHistory(data as unknown as Resumes[]) + } else { + throw new Error('Unexpected data format') + } + } catch (err) { + console.error('Error fetching work history:', err) + setError( + err instanceof Error + ? err + : new Error('Failed to fetch work history'), + ) } } - fetchResumes().catch((error: unknown) => { - console.log('error', error) - setError(error as PostgrestError | null) + fetchWorkHistory().catch((error: unknown) => { + console.error('Failed to fetch work history:', error) }) - console.log(fetchResumes) - }, []) + }, [initialWorkHistory]) + + if (error) { + return
Error: {error.message}
+ } return (
- {error &&

Error fetching Resume data: {error.message}

} - {resumes.map((resume) => { + {workHistory.map((resume) => { if (!Array.isArray(resume.work)) { return null } @@ -115,7 +143,7 @@ export function WorkHistory() { ) : null}
-

+

{workItem.position}

@@ -168,7 +196,7 @@ export function WorkHistory() { -

+
{workItem.highlights?.map((highlight, index) => { const highlightKey = highlight.id ? `highlight-${resume.id}-${highlight.id}` diff --git a/apps/marketing/src/layouts/PublicLayout.astro b/apps/marketing/src/layouts/PublicLayout.astro index af4ad64..a0393de 100644 --- a/apps/marketing/src/layouts/PublicLayout.astro +++ b/apps/marketing/src/layouts/PublicLayout.astro @@ -82,21 +82,24 @@ const {