From 0d6cc15cc846e4266fb34854f8254b91ad1e6111 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Fri, 1 Nov 2024 16:09:20 +0100 Subject: Feat: Add Frontend builder - update color scheme (TODO: accent color not final) - add product frontend helper to build card - add product frontend helper to build cards layout - add productmarker and implement for story, product and tool - add container for product and specific product (TODO: Refactoring) - add page builder for products - add temporary dummy product (TODO: Remove after first real implementation) --- src/handlers/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/handlers/mod.rs') diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index d346512..9d5aa54 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -7,10 +7,12 @@ use tower_http::add_extension::AddExtensionLayer; use tower_http::services::ServeDir; use admin::{admin_healthcheck, admin_middleware, upload_story}; -use frontend::home; +use frontend_builder::home; + +use self::frontend_builder::{build_page, DummyProduct}; mod admin; -mod frontend; +mod frontend_builder; #[derive(Debug, Clone)] struct ApiContext { @@ -23,6 +25,7 @@ pub async fn router(pool: SqlitePool) -> Router { .route("/admin", get(admin_healthcheck)) .layer(middleware::from_fn(admin_middleware)) .route("/", get(home)) + .route("/stories", get(build_page::)) .nest_service("/static", ServeDir::new("src/static")) .layer(DefaultBodyLimit::max(1074000000)) .layer(AddExtensionLayer::new(ApiContext { pool })) -- cgit v1.2.3