feat(examples): polish workout phone UI
Give the workout exemplar a durable gym-floor command-slate direction, serve focused CSS, keep the first viewport centered on one action, and extend the HTTP E2E to verify stylesheet delivery. req: examples/001 req: local/001 req: local/003 req: host/002
This commit is contained in:
@@ -24,6 +24,7 @@ async fn main() {
|
||||
pub fn app(state: AppState) -> Router {
|
||||
Router::new()
|
||||
.route("/", get(page).post(interact))
|
||||
.route("/workout.css", get(workout_css))
|
||||
.route(runtime_js_path(), get(runtime))
|
||||
.with_state(state)
|
||||
}
|
||||
@@ -41,6 +42,13 @@ async fn interact(
|
||||
request.dispatch_async(workout_app::registry(state)).await
|
||||
}
|
||||
|
||||
async fn workout_css() -> impl IntoResponse {
|
||||
(
|
||||
[("content-type", "text/css; charset=utf-8")],
|
||||
include_str!("../templates/workout.css"),
|
||||
)
|
||||
}
|
||||
|
||||
async fn runtime() -> impl IntoResponse {
|
||||
runtime_js()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user