Skip to content

Commit 7524a84

Browse files
author
lukwol
committed
Update 2 last chapters
1 parent 6c23dad commit 7524a84

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

docs/client/14-pull-to-refresh.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,34 +217,35 @@ pub fn indicator(refreshing: Bool, pull_state: PullState) -> Element(msg) {
217217
False -> "transform 0.2s ease-out, opacity 0.2s ease-out"
218218
}
219219
let icon = case refreshing {
220-
True -> html.span([attr.class("loading loading-spinner loading-lg")], [])
220+
True ->
221+
html.span([attribute.class("loading loading-spinner loading-lg")], [])
221222
False ->
222223
html.span(
223224
[
224-
attr.class("icon-[heroicons--arrow-down] text-3xl"),
225-
attr.style(
225+
attribute.class("text-3xl icon-[heroicons--arrow-down]"),
226+
attribute.style(
226227
"transform",
227228
"rotate(" <> float.to_string(progress *. 180.0) <> "deg)",
228229
),
229-
attr.style("transition", "transform 0.1s linear"),
230+
attribute.style("transition", "transform 0.1s linear"),
230231
],
231232
[],
232233
)
233234
}
234235
235236
html.div(
236237
[
237-
attr.class(
238+
attribute.class(
238239
"flex absolute inset-x-0 top-0 justify-center items-center h-12",
239240
),
240-
attr.style(
241+
attribute.style(
241242
"transform",
242243
"translateY(calc("
243244
<> float.to_string(indicator_y)
244245
<> "px + env(safe-area-inset-top)))",
245246
),
246-
attr.style("opacity", indicator_opacity),
247-
attr.style("transition", transition),
247+
attribute.style("opacity", indicator_opacity),
248+
attribute.style("transition", transition),
248249
],
249250
[icon],
250251
)
@@ -412,4 +413,4 @@ The gesture and visual indicator work the same way. Haptic feedback varies by de
412413

413414
Pull-to-refresh works in dev, but the API URL is still hardcoded to `localhost:8000` — which is wrong both for production builds and for a real phone on your home network. In the final chapter we'll resolve the base URL by platform and build mode, then take the app out of the simulator and onto real devices and release builds.
414415

415-
[^1]: See commit [919a15c](https://github.com/lukwol/doable/commit/919a15c) on GitHub
416+
[^1]: See commit [1fc3340](https://github.com/lukwol/doable/commit/1fc3340) on GitHub

docs/client/15-deploy-to-device.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,4 @@ And that's the full stack: a Gleam server backed by Postgres, a Lustre frontend,
261261

262262
Thanks for sticking with me all the way through. If any of it helped, I'd love to hear about it — and the full source is at [github.com/lukwol/doable](https://github.com/lukwol/doable) if you want to fork it, star it, or use it as a starting point for your own project. Happy building.
263263

264-
[^1]: See commit [fe95c4c](https://github.com/lukwol/doable/commit/fe95c4c) on GitHub
264+
[^1]: See commit [05dbbc3](https://github.com/lukwol/doable/commit/05dbbc3) on GitHub

0 commit comments

Comments
 (0)