Skip to content

Go/HTMX Contact App built while reading the Hypermedia Systems Book

Notifications You must be signed in to change notification settings

bshore/htmx-contact-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmx-contact-app

Go/HTMX Contact App built while reading the Hypermedia Systems Book

Dependencies

Running

make dev

# or the long way

templ generate

go run main.go serve

Notes/Takeaways

hx-boost

Requests use AJAX rather than the browser built-in, and HTMX knows to only swap the <body> tag. This avoids a "Flash of Unstyled Content" side-effect common to native HTML while the <head> is being processed, before styles take effect on the page. Using hx-boost means the <head> stays, and only the <body> is swapped, so all styles are already loaded. It can be inherited, so it can probably just be placed directly on <body hx-boost="true">, and specific elements disabled with hx-boost="false" (Images, PDFs, etc.)

About

Go/HTMX Contact App built while reading the Hypermedia Systems Book

Resources

Stars

Watchers

Forks