Move cultivar image into right column card (same as species)

This commit is contained in:
2026-03-15 16:36:25 +01:00
parent cd129e3de5
commit 5a37190fd3
+29 -25
View File
@@ -458,31 +458,6 @@ pub fn CultivarDetail(slug: String) -> Element {
p { class: "name-common", "{common_name}" }
}
if let Some(ref key) = sp_img_key {
div { class: "species-image-wrap",
img { class: "species-image", src: "/img/{key}", alt: "{c.name}" }
if let Some(ref img) = sp_primary_img {
div { class: "image-attribution",
if let Some(ref caption) = img.caption {
span { "{caption}" }
}
if let Some(ref lic) = img.license {
if img.caption.is_some() {
" | "
}
span { "{lic}" }
}
if let Some(ref url) = img.source_url {
if img.caption.is_some() || img.license.is_some() {
" | "
}
a { href: "{url}", target: "_blank", class: "attribution-link", "Source" }
}
}
}
}
}
// Week-based planting calendar (full width)
div { class: "detail-card", style: "margin-top: 1.25rem;",
div { class: "detail-card-header", "Planting Calendar" }
@@ -677,6 +652,35 @@ pub fn CultivarDetail(slug: String) -> Element {
// === RIGHT COLUMN ===
div { class: "detail-col",
// Image card
if let Some(ref key) = sp_img_key {
div { class: "detail-card",
div { class: "detail-card-header", "Image" }
div { class: "image-card-body",
img { class: "species-image", src: "/img/{key}", alt: "{c.name}" }
if let Some(ref img) = sp_primary_img {
div { class: "image-attribution",
if let Some(ref caption) = img.caption {
span { "{caption}" }
}
if let Some(ref lic) = img.license {
if img.caption.is_some() {
" | "
}
span { "{lic}" }
}
if let Some(ref url) = img.source_url {
if img.caption.is_some() || img.license.is_some() {
" | "
}
a { href: "{url}", target: "_blank", class: "attribution-link", "Source" }
}
}
}
}
}
}
// Card 4: Growing Information
div { class: "detail-card",
div { class: "detail-card-header", "Growing Information" }