diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2024-11-01 16:09:20 +0100 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2024-11-01 16:09:20 +0100 |
| commit | 0d6cc15cc846e4266fb34854f8254b91ad1e6111 (patch) | |
| tree | a2a0ab4bc35e2461a1d7dbf228ba226442fce6fb /src/handlers/frontend.rs | |
| parent | 6092e37e3a8e890cbe9d13305bcaf67daf410d93 (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/frontend.rs')
| -rw-r--r-- | src/handlers/frontend.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/handlers/frontend.rs b/src/handlers/frontend.rs deleted file mode 100644 index f4b7c6c..0000000 --- a/src/handlers/frontend.rs +++ /dev/null @@ -1,37 +0,0 @@ -use axum::response::IntoResponse; -use maud::{html, Markup, DOCTYPE}; - -use crate::error::AppError; - -pub async fn home() -> Result<impl IntoResponse, AppError> { - Ok(html!({ - (head("Home")) - body class="bg-[#eae3d2] text-[#333] dark:bg-[#333] dark:text-[#eae3d2] font-mono text-base tracking-wide" { - (header_with_navbar()) - } - })) -} - -fn header_with_navbar() -> Markup { - html!({ - header { - navbar class="p-3 text-sm flex flex-row flex-wrap content-center justify-around decoration-purple-500 shadow" { - a class="hover:underline" href="/" { "Home" } - a class="hover:underline" href="/" { "Stories" } - a class="hover:underline" href="/" { "Tools" } - a class="hover:underline" href="/" { "Games" } - } - } - }) -} - -fn head(page_title: &str) -> Markup { - html! { - head { - (DOCTYPE) - meta charset="utf-8"; - link rel="stylesheet" type="text/css" href="/static/styles.css"; - title { (page_title) } - } - } -} |
