diff --git a/examples/todo/index.html b/examples/todo/index.html index 5b85662..37e92e3 100644 --- a/examples/todo/index.html +++ b/examples/todo/index.html @@ -1,55 +1,70 @@ <!DOCTYPE html> <html lang="en"> + <head> - <title>Document</title> - <script src="https://unpkg.com/htmx.org@1.9.4"></script> + <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> + <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> + <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> + <link rel="manifest" href="/site.webmanifest"> + <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> + <meta name="msapplication-TileColor" content="#ffffff"> + <meta name="theme-color" content="#ffffff"> + <title>Document</title> + <script src="https://unpkg.com/htmx.org@1.9.4"></script> </head> + <body> - <div class="container"> - <h1>A Web<font color="#2262dc">X</font> todo list</h1> - <p>Welcome! Here is a list of things to do:</p> - <ul id="todo-list" hx-get="/todos/list" hx-trigger="load" hx-swap="outerHTML">Loading...</ul> - - <form hx-post="/todos/add" hx-target="#todo-list" hx-swap="afterend"> - <input name="title" placeholder="Add a new item" type="text" required> - <button>Add</button> - </form> - </div> + <div class="container"> + <h1>A Web<font color="#2262dc">X</font> todo list</h1> + <p>Welcome! Here is a list of things to do:</p> + <ul id="todo-list" hx-get="/todos/list" hx-trigger="load" hx-swap="outerHTML">Loading...</ul> + + <form hx-post="/todos/add" hx-target="#todo-list" hx-swap="afterend"> + <input name="title" placeholder="Add a new item" type="text" required> + <button>Add</button> + </form> + </div> </body> <style> - body { - font-family: Roboto, sans-serif; - margin: 0; - height: 100vh; - background: #f9f9f9; - } - .container { - padding: 1em 4em; - max-width: 30em; - margin: 0 auto; - height: 100%; - box-sizing: border-box; - border: 1px solid #ccc; - background: white; - } - ul { - list-style: none; - padding: 0; - } - li { - padding: 0.5em; - border-bottom: 1px solid #ccc; - } - input { - padding: 0.5em; - border: 1px solid #ccc; - border-radius: 0.25em; - } - button { - padding: 0.5em; - border: 1px solid #ccc; - border-radius: 0.25em; - background: #eee; - } + body { + font-family: Roboto, sans-serif; + margin: 0; + height: 100vh; + background: #f9f9f9; + } + + .container { + padding: 1em 4em; + max-width: 30em; + margin: 0 auto; + height: 100%; + box-sizing: border-box; + border: 1px solid #ccc; + background: white; + } + + ul { + list-style: none; + padding: 0; + } + + li { + padding: 0.5em; + border-bottom: 1px solid #ccc; + } + + input { + padding: 0.5em; + border: 1px solid #ccc; + border-radius: 0.25em; + } + + button { + padding: 0.5em; + border: 1px solid #ccc; + border-radius: 0.25em; + background: #eee; + } </style> + </html>