aboutsummaryrefslogtreecommitdiff
path: root/test/input.html
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-07-12 00:06:30 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-07-12 00:06:30 +0100
commit67ec0498443ca3972dcfb4775992d6b7d7e8dd87 (patch)
tree03a5650f74ac4bdcd9d8b12efa2848f19c05bb2a /test/input.html
parentd287da07805a86a2a958172e25889ff3d625bee5 (diff)
downloadlustre-67ec0498443ca3972dcfb4775992d6b7d7e8dd87.tar.gz
lustre-67ec0498443ca3972dcfb4775992d6b7d7e8dd87.zip
:sparkles: Create a simple example for handling input.
Diffstat (limited to 'test/input.html')
-rw-r--r--test/input.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/input.html b/test/input.html
new file mode 100644
index 0000000..20b60ca
--- /dev/null
+++ b/test/input.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html lang="en" class="h-full bg-gray-50">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>lustre | forms</title>
+
+ <script src="https://cdn.tailwindcss.com"></script>
+ <style type="text/tailwindcss">
+ @layer components {
+ .container {
+ @apply flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8;
+ }
+
+ .card {
+ @apply mt-10 sm:mx-auto sm:w-full sm:max-w-[480px];
+ }
+
+ .card > div {
+ @apply bg-white px-6 py-12 shadow sm:rounded-lg sm:px-12 space-y-6;
+ }
+
+ .debug {
+ @apply text-sm text-gray-400 whitespace-pre-line;
+ }
+
+ .input label {
+ @apply block text-sm font-medium leading-6 text-gray-900;
+ }
+
+ .input input {
+ @apply block w-full rounded-md border-0 p-1.5 mt-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-pink-600 sm:text-sm sm:leading-6;
+ }
+
+ .checkbox {
+ @apply h-4 w-4 rounded border-gray-300 text-pink-600 focus:ring-pink-600;
+ }
+
+ .checkbox + label {
+ @apply ml-3 block text-sm leading-6 text-gray-900;
+ }
+ }
+ </style>
+
+ <script type="module">
+ import { main } from "../build/dev/javascript/lustre/input.mjs";
+
+ document.addEventListener("DOMContentLoaded", main);
+ </script>
+ </head>
+ <body class="h-full"></body>
+</html>