Add dedicated Companion Planting page
Backend: new GET /api/v1/companions endpoint returning all companion relationships with joined species names, slugs and images. Adds CompanionWithNames model and list_all DB query. Frontend: new /companions route with search bar, beneficial (green) and antagonistic (red) sections, species thumbnails, mechanism text, source links, and species detail links. Full DE/EN i18n support.
This commit is contained in:
@@ -31,6 +31,8 @@ pub enum Route {
|
||||
SupplierList {},
|
||||
#[route("/suppliers/:slug")]
|
||||
SupplierDetail { slug: String },
|
||||
#[route("/companions")]
|
||||
CompanionList {},
|
||||
#[route("/search")]
|
||||
SearchPage {},
|
||||
#[route("/sources")]
|
||||
@@ -80,6 +82,7 @@ fn Layout() -> Element {
|
||||
NavLink { to: Route::SpeciesList {}, label: t(l, "nav.species") }
|
||||
NavLink { to: Route::CultivarList {}, label: t(l, "nav.cultivars") }
|
||||
NavLink { to: Route::SupplierList {}, label: t(l, "nav.suppliers") }
|
||||
NavLink { to: Route::CompanionList {}, label: t(l, "nav.companions") }
|
||||
NavLink { to: Route::SearchPage {}, label: t(l, "nav.search") }
|
||||
NavLink { to: Route::Sources {}, label: t(l, "nav.sources") }
|
||||
}
|
||||
@@ -140,6 +143,7 @@ fn NotFound(segments: Vec<String>) -> Element {
|
||||
}
|
||||
|
||||
// Re-export page components for the router
|
||||
pub use crate::pages::companions::CompanionList;
|
||||
pub use crate::pages::cultivars::{CultivarDetail, CultivarList};
|
||||
pub use crate::pages::families::{FamilyDetail, FamilyList};
|
||||
pub use crate::pages::home::Home;
|
||||
|
||||
Reference in New Issue
Block a user