Explorar el Código

Create outline for new game page

Lee Morgan hace 3 semanas
padre
commit
6ddd6c4a26
Se han modificado 2 ficheros con 28 adiciones y 0 borrados
  1. 1 0
      CLAUDE.md
  2. 27 0
      src/routes/(app)/game/new/+page.svelte

+ 1 - 0
CLAUDE.md

@@ -18,3 +18,4 @@
 ## Style
 - When told to create style for a page/component, do not write anything in <script>. Do not remove any HTML. You may add as much HTML as you see fit to improve it. You may do anything you want with CSS.
 - When adding any style, ensure that it is mobile responsive and works any any device size
+- Do not import "$lib/global.css" in every component. It should only be imported in the top level layout.

+ 27 - 0
src/routes/(app)/game/new/+page.svelte

@@ -0,0 +1,27 @@
+<script>
+    let title = $state("");
+    let gameContext = $state("");
+
+    const submit = async ()=>{
+        console.log("submit");
+    }
+
+    const autofocus = (node)=>{
+        node.focus();
+    }
+</script>
+
+<main>
+    <form onsubmit={submit}>
+        <label>Title:
+            <input bind:value={title} type="text" required use:autofocus>
+        </label>
+
+        <label>Game Information:
+            <textarea
+                bind:value={gameContext}
+                required
+            ></textarea>
+        </label>
+    </form>
+</main>