diff --git a/go.mod b/go.mod index 4be6868..5d9ec93 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 github.com/livetemplate/components v0.0.0-20251224004709-1f8c1de230b4 - github.com/livetemplate/livetemplate v0.8.1-0.20260118195628-f6a04e2a2d8b + github.com/livetemplate/livetemplate v0.8.2 github.com/livetemplate/lvt v0.0.0-20260110064539-b9afb9e6df26 modernc.org/sqlite v1.43.0 ) diff --git a/go.sum b/go.sum index 131066b..20d79ca 100644 --- a/go.sum +++ b/go.sum @@ -126,8 +126,8 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/livetemplate/components v0.0.0-20251224004709-1f8c1de230b4 h1:wLfVleSSlcv4NPg5KN8pul0Rz9ub1CtI8OAcPlyBYlw= github.com/livetemplate/components v0.0.0-20251224004709-1f8c1de230b4/go.mod h1:+C2iGZfdgjc6y6MsaDHBWzWGIbBHna4l+ygFYJfuyUo= -github.com/livetemplate/livetemplate v0.8.1-0.20260118195628-f6a04e2a2d8b h1:jzwam9JEm/IQpwCNHLeKD33004pjmQDdbkpmLeL/s4U= -github.com/livetemplate/livetemplate v0.8.1-0.20260118195628-f6a04e2a2d8b/go.mod h1:0jD5ccG/VQ/BmjbsZdOamAeFh+aO/f1yJeMQqhxPa68= +github.com/livetemplate/livetemplate v0.8.2 h1:nPxBIOdHy/SO3cSeVlyKZj5jtCXzC23OufI1KEylwvE= +github.com/livetemplate/livetemplate v0.8.2/go.mod h1:0jD5ccG/VQ/BmjbsZdOamAeFh+aO/f1yJeMQqhxPa68= github.com/livetemplate/lvt v0.0.0-20260110064539-b9afb9e6df26 h1:RRYko8rFvHz8ad5ixw3ke1ZvJKMtVqJA6Ddxx92Wobw= github.com/livetemplate/lvt v0.0.0-20260110064539-b9afb9e6df26/go.mod h1:b+qhiaDS5oURHjiCs+ZPOoJTtZ+5cCM8xyriVA97uQo= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= diff --git a/progressive-enhancement/progressive-enhancement.tmpl b/progressive-enhancement/progressive-enhancement.tmpl index 04486d9..d03f569 100644 --- a/progressive-enhancement/progressive-enhancement.tmpl +++ b/progressive-enhancement/progressive-enhancement.tmpl @@ -4,195 +4,100 @@ {{.Title}} + -

{{.Title}}

-

This app works with or without JavaScript enabled

- - - -
- JavaScript Mode: Using WebSocket for instant updates without page reloads. - Actions update the page in real-time. -
+
+

{{.Title}}

+

This app works with or without JavaScript enabled

- - {{if .lvt.Flash "success"}} -
{{.lvt.Flash "success"}}
- {{end}} - {{if .lvt.Flash "error"}} -
{{.lvt.Flash "error"}}
- {{end}} - - - - -
-
- - - {{if .lvt.HasError "title"}} -
{{.lvt.Error "title"}}
- {{end}} - -
-
+ + + + JavaScript Mode: Using WebSocket for instant updates without page reloads. + Actions update the page in real-time. + - -
- {{if not .Items}} -
-

No todos yet. Add one above!

-
- {{else}} - {{range .Items}} - {{/* No explicit data-key needed - library auto-generates content-based keys */}} -
- -
- - - -
- {{.Title}} - {{.CreatedAt}} - -
- - - -
-
+ + {{if .lvt.Flash "success"}} + {{.lvt.Flash "success"}} {{end}} + {{if .lvt.Flash "error"}} + {{.lvt.Flash "error"}} {{end}} -
+ + + + +
+
+ + + {{if .lvt.HasError "title"}} + {{.lvt.Error "title"}} + {{end}} + +
+
+ + +
+ {{if not .Items}} +
+

No todos yet. Add one above!

+
+ {{else}} + {{range .Items}} + {{/* No explicit data-key needed - library auto-generates content-based keys */}} +
+ +
+ + + +
+ {{.Title}} + {{.CreatedAt}} + +
+ + + +
+
+ {{end}} + {{end}} +
+