Move cultivar image into right column card (same as species)
This commit is contained in:
@@ -458,31 +458,6 @@ pub fn CultivarDetail(slug: String) -> Element {
|
|||||||
p { class: "name-common", "{common_name}" }
|
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)
|
// Week-based planting calendar (full width)
|
||||||
div { class: "detail-card", style: "margin-top: 1.25rem;",
|
div { class: "detail-card", style: "margin-top: 1.25rem;",
|
||||||
div { class: "detail-card-header", "Planting Calendar" }
|
div { class: "detail-card-header", "Planting Calendar" }
|
||||||
@@ -677,6 +652,35 @@ pub fn CultivarDetail(slug: String) -> Element {
|
|||||||
// === RIGHT COLUMN ===
|
// === RIGHT COLUMN ===
|
||||||
div { class: "detail-col",
|
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
|
// Card 4: Growing Information
|
||||||
div { class: "detail-card",
|
div { class: "detail-card",
|
||||||
div { class: "detail-card-header", "Growing Information" }
|
div { class: "detail-card-header", "Growing Information" }
|
||||||
|
|||||||
Reference in New Issue
Block a user