Bug fixes and tweaks

Both hero_card_enabled and hero_image_first were crashing on the same line — they both use << to append to hero_classes. The single fix +"cl-hero" makes the string mutable, so both appends on lines 144 and 145 now work.
This commit is contained in:
2026-03-08 06:16:58 -04:00
parent 082371d728
commit 2cd36ca2b3
2 changed files with 14 additions and 4 deletions

View File

@@ -140,7 +140,7 @@ module CommunityLanding
hero_style_parts << "border-bottom: 1px #{hero_border} var(--cl-border);" if hero_border.present? && hero_border != "none"
hero_style_parts << "min-height: #{hero_min_h}px;" if hero_min_h.to_i > 0
hero_attr = hero_style_parts.any? ? " style=\"#{hero_style_parts.join(' ')}\"" : ""
hero_classes = "cl-hero"
hero_classes = +"cl-hero"
hero_classes << " cl-hero--card" if hero_card
hero_classes << " cl-hero--image-first" if hero_img_first
html << "<section class=\"#{hero_classes}\" id=\"cl-hero\"#{hero_attr}>\n"