summaryrefslogtreecommitdiff
path: root/src/handlers/mod.rs
diff options
context:
space:
mode:
authorWriterV2 <primary-v2@protonmail.com>2024-11-01 16:09:20 +0100
committerWriterV2 <primary-v2@protonmail.com>2024-11-01 16:09:20 +0100
commit0d6cc15cc846e4266fb34854f8254b91ad1e6111 (patch)
treea2a0ab4bc35e2461a1d7dbf228ba226442fce6fb /src/handlers/mod.rs
parent6092e37e3a8e890cbe9d13305bcaf67daf410d93 (diff)
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)
Diffstat (limited to 'src/handlers/mod.rs')
-rw-r--r--src/handlers/mod.rs7
1 files changed, 5 insertions, 2 deletions
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::<DummyProduct>))
.nest_service("/static", ServeDir::new("src/static"))
.layer(DefaultBodyLimit::max(1074000000))
.layer(AddExtensionLayer::new(ApiContext { pool }))