From dc28fa82bd57ccb98d318f830ca1e5a761b747d0 Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Sat, 9 Mar 2024 14:53:17 -0500 Subject: [PATCH 01/11] hello Signed-off-by: Julio Jimenez --- .gitignore | 1 + README.md | 76 +++++++++++++++++------------- chapter-11/1-hello-world/index.xml | 13 +++++ 3 files changed, 58 insertions(+), 32 deletions(-) create mode 100644 chapter-11/1-hello-world/index.xml diff --git a/.gitignore b/.gitignore index 2ace4a6b..bd13b202 100644 --- a/.gitignore +++ b/.gitignore @@ -160,4 +160,5 @@ cython_debug/ #.idea/ .mypy_cache .vscode +.zed TODO.md diff --git a/README.md b/README.md index 97da03dd..94df8b81 100644 --- a/README.md +++ b/README.md @@ -11,19 +11,26 @@ The code here is slightly different from the book, as I try to use types where I ## Running an Example Clone the repo... + ```bash git clone https://github.com/juliojimenez/hypermedia.systems cd hypermedia.systems ``` + Install dependencies... + ```bash pip3 install -r requirements.txt ``` + Go to an example... + ```bash cd chapter-3/1-simple-hello-world/ ``` + And run it... + ```bash python3 app.py ``` @@ -50,12 +57,12 @@ Each example runs on a different port. Run multiple examples simultaneously and - [Targeting Other Elements](./chapter-4/4-targeting-other-elements/) - [Swap Styles](./chapter-4/5-swap-styles/) - Using Events - - [mouseenter](./chapter-4/6-using-events-mouseenter/) - - [click and keyup](./chapter-4/7-using-events-click-and-keyup/) + - [mouseenter](./chapter-4/6-using-events-mouseenter/) + - [click and keyup](./chapter-4/7-using-events-click-and-keyup/) - Passing Request Parameters - - [Enclosing Forms](./chapter-4/8-passing-request-parameters-enclosing-forms/) - - [Including Inputs](./chapter-4/9-passing-request-parameters-including-inputs/) - - [Inline Values](./chapter-4/10-passing-request-parameters-inline-values/) + - [Enclosing Forms](./chapter-4/8-passing-request-parameters-enclosing-forms/) + - [Including Inputs](./chapter-4/9-passing-request-parameters-including-inputs/) + - [Inline Values](./chapter-4/10-passing-request-parameters-inline-values/) - [History Support](./chapter-4/11-history-support/) ### Chapter 5 @@ -64,38 +71,38 @@ Each example runs on a different port. Run multiple examples simultaneously and - [Adding hx-boost to Contacts.app](./chapter-5/2-adding-hx-boost-to-contact-app/) - [A Second Step: Deleting Contacts With HTTP DELETE](./chapter-5/3-a-second-step-deleting-contacts-with-http-delete/) - Next Steps: Validating Contact Emails - - [Update Our Input Type](./chapter-5/4-next-steps-validating-contact-emails-update-our-input-type/) - - [Inline Validation](./chapter-5/5-next-steps-validating-contact-emails-inline-validation/) - - [Validating Emails Server-Side](./chapter-5/6-next-steps-validating-contact-emails-validating-emails-server-side/) - - [Taking The User Experience Further](./chapter-5/7-next-steps-validating-contact-emails-taking-the-user-experience-further/) - - [Debouncing Our Validation Requests](./chapter-5/8-next-steps-validating-contact-emails-debouncing-our-validation-requests/) - - [Ignoring Non-Mutating Keys](./chapter-5/9-next-steps-validating-contact-emails-ignoring-non-mutating-keys/) + - [Update Our Input Type](./chapter-5/4-next-steps-validating-contact-emails-update-our-input-type/) + - [Inline Validation](./chapter-5/5-next-steps-validating-contact-emails-inline-validation/) + - [Validating Emails Server-Side](./chapter-5/6-next-steps-validating-contact-emails-validating-emails-server-side/) + - [Taking The User Experience Further](./chapter-5/7-next-steps-validating-contact-emails-taking-the-user-experience-further/) + - [Debouncing Our Validation Requests](./chapter-5/8-next-steps-validating-contact-emails-debouncing-our-validation-requests/) + - [Ignoring Non-Mutating Keys](./chapter-5/9-next-steps-validating-contact-emails-ignoring-non-mutating-keys/) - Another Application Improvement: Paging - - [Adding Paging Widgets](./chapter-5/10-another-application-improvement-paging-adding-paging-widgets/) - - [Click To Load](./chapter-5/11-another-application-improvement-paging-click-to-load/) - - [Infinite Scroll](./chapter-5/12-another-application-improvement-paging-infinite-scroll/) + - [Adding Paging Widgets](./chapter-5/10-another-application-improvement-paging-adding-paging-widgets/) + - [Click To Load](./chapter-5/11-another-application-improvement-paging-click-to-load/) + - [Infinite Scroll](./chapter-5/12-another-application-improvement-paging-infinite-scroll/) ### Chapter 6 - [Adding Active Search](./chapter-6/1-adding-active-search/) - - [Targeting The Correct Element](./chapter-6/2-targeting-the-correct-element/) - - [Paring Down Our Content](./chapter-6/3-paring-down-our-content/) - - [HTTP Headers In HTMX](./chapter-6/4-http-headers-in-htmx/) - - [Factoring Your Templates](./chapter-6/4-http-headers-in-htmx/) - - [Using Our New Template](./chapter-6/4-http-headers-in-htmx/) - - [Updating The Navigation Bar With "hx-push-url"](./chapter-6/5-updating-the-navigation-bar-with-hx-push-url/) - - [Adding A Request Indicator](./chapter-6/6-adding-a-request-indicator/) + - [Targeting The Correct Element](./chapter-6/2-targeting-the-correct-element/) + - [Paring Down Our Content](./chapter-6/3-paring-down-our-content/) + - [HTTP Headers In HTMX](./chapter-6/4-http-headers-in-htmx/) + - [Factoring Your Templates](./chapter-6/4-http-headers-in-htmx/) + - [Using Our New Template](./chapter-6/4-http-headers-in-htmx/) + - [Updating The Navigation Bar With "hx-push-url"](./chapter-6/5-updating-the-navigation-bar-with-hx-push-url/) + - [Adding A Request Indicator](./chapter-6/6-adding-a-request-indicator/) - [Lazy Loading](./chapter-6/7-lazy-loading/) - - [Pulling Out The Expensive Code](./chapter-6/8-pulling-out-the-expensive-code/) - - [Adding An Indicator](./chapter-6/9-adding-an-indicator/) - - [But That's Not Lazy!](./chapter-6/10-but-thats-not-lazy/) + - [Pulling Out The Expensive Code](./chapter-6/8-pulling-out-the-expensive-code/) + - [Adding An Indicator](./chapter-6/9-adding-an-indicator/) + - [But That's Not Lazy!](./chapter-6/10-but-thats-not-lazy/) - [Inline Delete](./chapter-6/11-inline-delete/) - - [Narrowing Our Target](./chapter-6/12-narrowing-our-target/) - - [Updating The Server Side](./chapter-6/13-updating-the-server-side/) - - [Taking Advantage of "htmx-swapping"](./chapter-6/14-taking-advantage-of-htmx-swapping/) + - [Narrowing Our Target](./chapter-6/12-narrowing-our-target/) + - [Updating The Server Side](./chapter-6/13-updating-the-server-side/) + - [Taking Advantage of "htmx-swapping"](./chapter-6/14-taking-advantage-of-htmx-swapping/) - [Bulk Delete](./chapter-6/15-bulk-delete/) - - [The "Delete Selected Contacts" Button](./chapter-6/16-the-delete-selected-contacts-button/) - - [The Server Side for Delete Selected Contacts](./chapter-6/17-the-server-side-for-delete-selected-contacts/) + - [The "Delete Selected Contacts" Button](./chapter-6/16-the-delete-selected-contacts-button/) + - [The Server Side for Delete Selected Contacts](./chapter-6/17-the-server-side-for-delete-selected-contacts/) ### Chapter 7 @@ -113,7 +120,7 @@ Each example runs on a different port. Run multiple examples simultaneously and - [VanillaJS in Action: An Overflow Menu](./chapter-9/1-vanillajs-in-action-an-overflow-menu) - [Alpine.js](./chapter-9/2-alpine.js) -- [_hyperscript](./chapter-9/3-hyperscript) +- [\_hyperscript](./chapter-9/3-hyperscript) - [Integrating Using Callbacks](./chapter-9/4-integrating-using-callbacks) - [Integrating Using Events](./chapter-9/5-integrating-using-events) @@ -124,6 +131,11 @@ Each example runs on a different port. Run multiple examples simultaneously and - [Viewing Contact Details](./chapter-10/3-viewing-contact-details) - [Updating & Deleting Contacts](./chapter-10/4-updating-and-deleting-contacts) +### Chapter 11 + +- Introduction To HXML + - [Hello World]() + ## Support Python 3.11+ @@ -132,5 +144,5 @@ Python 3.11+ - [HTMX v1.9.5](https://htmx.org) - [missing.css v1.0.10](https://missing.style) - - Not sure what's going on with the package hosting for this, but I had to grab the artifact from the latest tag in the [repo](https://github.com/bigskysoftware/missing). - - It was working fine when I started this repository. If it starts working again, please submit an issue or hit me up on [X](https://twitter.com/LispDev). + - Not sure what's going on with the package hosting for this, but I had to grab the artifact from the latest tag in the [repo](https://github.com/bigskysoftware/missing). + - It was working fine when I started this repository. If it starts working again, please submit an issue or hit me up on [X](https://twitter.com/LispDev). diff --git a/chapter-11/1-hello-world/index.xml b/chapter-11/1-hello-world/index.xml new file mode 100644 index 00000000..2b58185c --- /dev/null +++ b/chapter-11/1-hello-world/index.xml @@ -0,0 +1,13 @@ + + + + +
+ My first app +
+ + Hello World! + + +
+
From 0ff8c60db955376a37ce9b9999496d8e2b56262e Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Mon, 18 Mar 2024 11:55:46 -0400 Subject: [PATCH 02/11] lists Signed-off-by: Julio Jimenez --- README.md | 4 +++- chapter-11/2-ui-elements-lists/index.xml | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 chapter-11/2-ui-elements-lists/index.xml diff --git a/README.md b/README.md index 94df8b81..a8841ee7 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ Each example runs on a different port. Run multiple examples simultaneously and ### Chapter 11 - Introduction To HXML - - [Hello World]() + - [Hello World](./chapter-11/1-hello-world) + - UI Elements + - [Lists](./chapter-11/2-ui-elements-lists) ## Support diff --git a/chapter-11/2-ui-elements-lists/index.xml b/chapter-11/2-ui-elements-lists/index.xml new file mode 100644 index 00000000..57a4d304 --- /dev/null +++ b/chapter-11/2-ui-elements-lists/index.xml @@ -0,0 +1,21 @@ + + + + +
+ My first app +
+ + Hello World! + + + My first item + + + My second item + + + + +
+
From 4ad79ed01893c9dd98356dc7f88873882dd7be0f Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Mon, 18 Mar 2024 12:09:04 -0400 Subject: [PATCH 03/11] section-list Signed-off-by: Julio Jimenez --- chapter-11/2-ui-elements-lists/index.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/chapter-11/2-ui-elements-lists/index.xml b/chapter-11/2-ui-elements-lists/index.xml index 57a4d304..729835bb 100644 --- a/chapter-11/2-ui-elements-lists/index.xml +++ b/chapter-11/2-ui-elements-lists/index.xml @@ -15,6 +15,27 @@ My second item + +
+ + Appetizers + + + French Fries + + + Onion Rings + +
+
+ + Entrees + + + Burger + +
+
From 908b9054760ec62165b2c06a6a903bd3196015f7 Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Sat, 30 Mar 2024 18:08:07 -0400 Subject: [PATCH 04/11] images Signed-off-by: Julio Jimenez --- README.md | 1 + chapter-11/3-ui-elements-images/index.xml | 44 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 chapter-11/3-ui-elements-images/index.xml diff --git a/README.md b/README.md index a8841ee7..c31fadd1 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ Each example runs on a different port. Run multiple examples simultaneously and - [Hello World](./chapter-11/1-hello-world) - UI Elements - [Lists](./chapter-11/2-ui-elements-lists) + - [Images](./chapter-11/3-ui-elements-images) ## Support diff --git a/chapter-11/3-ui-elements-images/index.xml b/chapter-11/3-ui-elements-images/index.xml new file mode 100644 index 00000000..1e9bef6e --- /dev/null +++ b/chapter-11/3-ui-elements-images/index.xml @@ -0,0 +1,44 @@ + + + + +
+ My first app +
+ + Hello World! + + + My first item + + + My second item + + + +
+ + Appetizers + + + French Fries + + + Onion Rings + +
+
+ + Entrees + + + Burger + +
+
+ + +
+ +
+
From c1cdd57bf7e59e42241c8d14ec731985e69d0a36 Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Sat, 6 Apr 2024 14:21:52 -0400 Subject: [PATCH 05/11] Inputs Signed-off-by: Julio Jimenez --- README.md | 1 + chapter-11/4-inputs/index.xml | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 chapter-11/4-inputs/index.xml diff --git a/README.md b/README.md index c31fadd1..6f02d583 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ Each example runs on a different port. Run multiple examples simultaneously and - UI Elements - [Lists](./chapter-11/2-ui-elements-lists) - [Images](./chapter-11/3-ui-elements-images) + - [Inputs](./chapter-11/4-inputs) ## Support diff --git a/chapter-11/4-inputs/index.xml b/chapter-11/4-inputs/index.xml new file mode 100644 index 00000000..9c12c694 --- /dev/null +++ b/chapter-11/4-inputs/index.xml @@ -0,0 +1,58 @@ + + + + +
+ My first app +
+ + Hello World! + + + My first item + + + My second item + + + +
+ + Appetizers + + + French Fries + + + Onion Rings + +
+
+ + Entrees + + + Burger + +
+
+ + + + + + + +
+ +
+
From 1b5487d31aa47e9e027593447ed548fc753088f8 Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Mon, 15 Apr 2024 18:13:20 -0400 Subject: [PATCH 06/11] 5-styling Signed-off-by: Julio Jimenez --- README.md | 1 + chapter-11/5-styling/index.xml | 64 ++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 chapter-11/5-styling/index.xml diff --git a/README.md b/README.md index 6f02d583..3636acd9 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,7 @@ Each example runs on a different port. Run multiple examples simultaneously and - [Lists](./chapter-11/2-ui-elements-lists) - [Images](./chapter-11/3-ui-elements-images) - [Inputs](./chapter-11/4-inputs) + - [Styling](./chapter-11/5-styling) ## Support diff --git a/chapter-11/5-styling/index.xml b/chapter-11/5-styling/index.xml new file mode 100644 index 00000000..240a1227 --- /dev/null +++ b/chapter-11/5-styling/index.xml @@ -0,0 +1,64 @@ + + + +