From 507c972ecafeceaf4f8962ad881f8fb50c9b86c1 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 4 Oct 2025 17:37:22 -0700 Subject: paste art --- index.html | 8 ++- public/fonts/fantasque.woff | Bin 0 -> 49356 bytes public/img/background.jpg | Bin 0 -> 45441 bytes public/img/cursor/hover.png | Bin 0 -> 1789 bytes public/img/cursor/regular.png | Bin 0 -> 3255 bytes public/vite.svg | 1 - src/App.tsx | 14 ++++- src/main.tsx | 3 + src/pages/ChooseArt.tsx | 45 ++++++++++++++ src/pages/Paint.tsx | 11 ++++ src/styles/colors.css | 119 +++++++++++++++++++++++++++++++++++ src/styles/styles.css | 140 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 336 insertions(+), 5 deletions(-) create mode 100644 public/fonts/fantasque.woff create mode 100644 public/img/background.jpg create mode 100644 public/img/cursor/hover.png create mode 100644 public/img/cursor/regular.png delete mode 100644 public/vite.svg create mode 100644 src/pages/ChooseArt.tsx create mode 100644 src/pages/Paint.tsx create mode 100644 src/styles/colors.css create mode 100644 src/styles/styles.css diff --git a/index.html b/index.html index b8fd1a2..da18db3 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,13 @@ ansicolor -
+
+

## ansicolor

+
+
+
+
+
diff --git a/public/fonts/fantasque.woff b/public/fonts/fantasque.woff new file mode 100644 index 0000000..a239067 Binary files /dev/null and b/public/fonts/fantasque.woff differ diff --git a/public/img/background.jpg b/public/img/background.jpg new file mode 100644 index 0000000..e54d261 Binary files /dev/null and b/public/img/background.jpg differ diff --git a/public/img/cursor/hover.png b/public/img/cursor/hover.png new file mode 100644 index 0000000..2e2c248 Binary files /dev/null and b/public/img/cursor/hover.png differ diff --git a/public/img/cursor/regular.png b/public/img/cursor/regular.png new file mode 100644 index 0000000..f9fbfca Binary files /dev/null and b/public/img/cursor/regular.png differ diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 8666e34..3623384 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,13 @@ +import { useState } from "react"; +import { ChooseArt } from "./pages/ChooseArt"; +import { Paint } from "./pages/Paint"; + export const App: React.FC = () => { - return
- hello -
+ const [chosenArt, setChosenArt] = useState(undefined); + + if (chosenArt === undefined) { + return + } + + return } diff --git a/src/main.tsx b/src/main.tsx index 65bf1da..32ff2d4 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,9 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; +import '@/styles/colors.css'; +import '@/styles/styles.css'; + import { App } from '@/App'; createRoot(document.getElementById('root')!).render( diff --git a/src/pages/ChooseArt.tsx b/src/pages/ChooseArt.tsx new file mode 100644 index 0000000..fab6d79 --- /dev/null +++ b/src/pages/ChooseArt.tsx @@ -0,0 +1,45 @@ +import type React from 'react'; +import { useEffect, useRef, useState } from 'react'; + +export interface ChooseArtProps { + artSubmissionCallback: (art: string) => void; +} + +export const ChooseArt: React.FC = ({ + artSubmissionCallback, +}) => { + const [art, setArt] = useState(''); + const promptRef = useRef(null); + + useEffect(() => { + if (!promptRef.current) { + return; + } + // Automatically focus the textarea when the component mounts + promptRef.current.focus(); + }, [promptRef]); + + const handleSubmit = () => { + if (!art.trim()) { + return; + } + artSubmissionCallback(art); + }; + + return ( +
+