-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from NomadicDaddy/dev
fixed npm cmds; crudmgr; aw icon; htmx-debugger links
- Loading branch information
Showing
12 changed files
with
421 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DROP TABLE "items"; | ||
|
||
CREATE TABLE "items" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"item" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"created_at" DATETIME DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" DATETIME DEFAULT CURRENT_TIMESTAMP | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
DROP TABLE "items"; | ||
|
||
CREATE TABLE "items" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"item" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"created_at" DATETIME DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" DATETIME DEFAULT CURRENT_TIMESTAMP | ||
); | ||
|
||
INSERT INTO | ||
"items" ("item", "description") | ||
VALUES | ||
('Item 1', 'Description for item 1'), | ||
('Item 2', 'Description for item 2'), | ||
('Item 3', 'Description for item 3'), | ||
('Item 4', 'Description for item 4'), | ||
('Item 5', 'Description for item 5'), | ||
('Item 6', 'Description for item 6'), | ||
('Item 7', 'Description for item 7'), | ||
('Item 8', 'Description for item 8'), | ||
('Item 9', 'Description for item 9'), | ||
('Item 10', 'Description for item 10'), | ||
('Item 11', 'Description for item 11'), | ||
('Item 12', 'Description for item 12'), | ||
('Item 13', 'Description for item 13'), | ||
('Item 14', 'Description for item 14'), | ||
('Item 15', 'Description for item 15'), | ||
('Item 16', 'Description for item 16'), | ||
('Item 17', 'Description for item 17'), | ||
('Item 18', 'Description for item 18'), | ||
('Item 19', 'Description for item 19'), | ||
('Item 20', 'Description for item 20'), | ||
('Item 21', 'Description for item 21'), | ||
('Item 22', 'Description for item 22'), | ||
('Item 23', 'Description for item 23'), | ||
('Item 24', 'Description for item 24'), | ||
('Item 25', 'Description for item 25'), | ||
('Item 26', 'Description for item 26'), | ||
('Item 27', 'Description for item 27'), | ||
('Item 28', 'Description for item 28'), | ||
('Item 29', 'Description for item 29'), | ||
('Item 30', 'Description for item 30'), | ||
('Item 31', 'Description for item 31'), | ||
('Item 32', 'Description for item 32'), | ||
('Item 33', 'Description for item 33'), | ||
('Item 34', 'Description for item 34'), | ||
('Item 35', 'Description for item 35'); |
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<div class="relative rounded-lg bg-white shadow dark:bg-gray-700"> | ||
<div class="flex items-center justify-between rounded-t border-b p-4 dark:border-gray-600"> | ||
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">Add New Item</h3> | ||
<button | ||
type="button" | ||
class="ml-auto inline-flex items-center rounded-lg bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white" | ||
hx-on:click="htmx.trigger('body', 'closeModal')"> | ||
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
fill-rule="evenodd" | ||
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" | ||
clip-rule="evenodd"></path> | ||
</svg> | ||
</button> | ||
</div> | ||
<form hx-post="/api/crud" hx-swap="none" hx-on::after-request="this.reset(); htmx.trigger('body', 'crudChanged')"> | ||
<div class="space-y-6 p-6"> | ||
<div> | ||
<label for="item" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white">Item Name</label> | ||
<input | ||
type="text" | ||
name="item" | ||
id="item" | ||
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder-gray-400" | ||
placeholder="Enter item name" | ||
required /> | ||
</div> | ||
<div> | ||
<label for="crudText" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white">Item Description</label> | ||
<textarea | ||
name="description" | ||
id="description" | ||
class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-500 dark:bg-gray-600 dark:text-white dark:placeholder-gray-400" | ||
placeholder="Enter description in markdown or HTML format" | ||
required></textarea> | ||
</div> | ||
</div> | ||
<div class="flex items-center space-x-2 rounded-b border-t border-gray-200 p-6 dark:border-gray-600"> | ||
<button | ||
type="submit" | ||
hx-on:click="htmx.trigger('body', 'crudChanged'); htmx.trigger('body', 'closeModal')" | ||
class="rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"> | ||
Add Item | ||
</button> | ||
<button | ||
type="button" | ||
class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:border-gray-500 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:ring-gray-600" | ||
hx-on:click="htmx.trigger('body', 'crudChanged'); htmx.trigger('body', 'closeModal')"> | ||
Cancel | ||
</button> | ||
</div> | ||
</form> | ||
</div> |
Oops, something went wrong.