Update fetch for static page gen, fix DOM patching
This commit is contained in:
@@ -27,8 +27,11 @@ answers `/api/quotes` with `httputil.RespondGob([]Quote)` and the client decodes
|
||||
it straight back into `[]Quote` with `httputil.FetchGob` (the same Go type on
|
||||
both ends — no JSON); and a **user-entered** GitHub repo (`owner/name`) is
|
||||
fetched with `httputil.FetchJSON` into a tagged Go struct. The client HTTP
|
||||
transport is `wasmruntime.FetchBytes`, injected once via
|
||||
`httputil.SetClientTransport`.
|
||||
transport is `wasmruntime.FetchBytes`, installed by the runtime itself (override
|
||||
it with `httputil.SetClientTransport` for auth headers or a base URL). `/data` is
|
||||
a `static` route, and fetching only exists on the client, so the fetches no-op
|
||||
during SSR: the server pre-renders the page's **spinner**, and the client runs
|
||||
them for real after hydration.
|
||||
|
||||
Styling is **Tailwind**: the dev server (and `build.sh`) run `kjol/cmd/twcss`,
|
||||
which scans the Go markup + the `webui` kit for utility classes and compiles
|
||||
|
||||
Reference in New Issue
Block a user