Created
July 17, 2024 08:23
-
-
Save PCreations/eb8af7594b7fe28191e41eb11f31674a to your computer and use it in GitHub Desktop.
731b56e1bcb6.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-15,12 +15,11 @@ export class AppController { | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://cdn.tailwindcss.com"></script> | |
+ <script src="https://unpkg.com/htmx.org@2.0.1" integrity="sha384-QWGpdj554B4ETpJJC9z+ZHJcA/i59TyjxEPXiiUgN2WmTyV5OEZWCD6gQhgkdpB/" crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<main class="container mx-auto px-4 py-8"> | |
- ${query?.title ? '<p>Book added</p>' : ''} | |
- <form class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"> | |
+ <div id="add-book-form"> | |
+ <form action="/" class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4" method="post" hx-boost="true" hx-target="#add-book-form" hx-swap="outerHTML"> | |
<div class="mb-4"> | |
<label class="block text-gray-700 text-sm font-bold mb-2" for="title"> | |
Title | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment