diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2024-11-05 19:06:54 +0100 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2024-11-05 19:06:54 +0100 |
| commit | 845073129204835413b53bb40ca7b6a7806d373a (patch) | |
| tree | 32b62478e3cee43eae9472a0ad69e8890e30b6e6 /src/handlers/frontend_builder.rs | |
| parent | dab09c4e4d1e4b21216b630bb44e57f597dfe85b (diff) | |
Feat: Add card content for story
- Refactoring: Add filepath formatting method
- Add extra error context in story file sync
- Add specific product as parameter to product specific card content
trait method
- TODO: Add pdf icon and epub icon to story card content
- Update tailwind config to look in all .rs files in src/
Diffstat (limited to 'src/handlers/frontend_builder.rs')
| -rw-r--r-- | src/handlers/frontend_builder.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/handlers/frontend_builder.rs b/src/handlers/frontend_builder.rs index 4a9ea67..515277e 100644 --- a/src/handlers/frontend_builder.rs +++ b/src/handlers/frontend_builder.rs @@ -75,7 +75,7 @@ fn card<T: PageBuilder + ProductMarker>(specific_product: SpecificProduct<T>) -> (specific_product.product.description) } div { - (specific_product.detail.product_specific_card_content()) + (specific_product.detail.product_specific_card_content(&specific_product)) } div class="flex flex-row space-x-5 mt-9 text-xs" { span {"Upload: " (upload_date)} @@ -114,5 +114,8 @@ pub async fn build_page<T: Sized + ProductMarker + PageBuilder + ProductDatabase pub trait PageBuilder { fn page_title() -> String; - fn product_specific_card_content(&self) -> Markup; + fn product_specific_card_content<T: PageBuilder + ProductMarker>( + &self, + specific_product: &SpecificProduct<T>, + ) -> Markup; } |
