Ui improvements and bug fixes

This commit is contained in:
2026-03-08 14:51:39 -04:00
parent adf3183cb8
commit b46c70a221
7 changed files with 294 additions and 21 deletions

View File

@@ -514,10 +514,13 @@ module CommunityLanding
show_desc = @s.groups_show_description rescue true
desc_max = (@s.groups_description_max_length rescue 100).to_i
min_h = @s.splits_min_height rescue 0
html = +""
groups_bg_img = (@s.splits_background_image_url.presence rescue nil)
section_style_parts = []
section_style_parts << "background: url('#{groups_bg_img}') center/cover no-repeat;" if groups_bg_img
section_style_parts << "min-height: #{min_h}px;" if min_h.to_i > 0
section_attr = section_style_parts.any? ? " style=\"#{section_style_parts.join(' ')}\"" : ""
html << "<section class=\"cl-spaces cl-anim\" id=\"cl-splits\"#{section_attr}><div class=\"cl-container\">\n"

View File

@@ -222,6 +222,7 @@ module CommunityLanding
["#cl-about", safe_hex(:about_bg_dark), safe_hex(:about_bg_light)],
["#cl-participation", safe_hex(:participation_bg_dark), safe_hex(:participation_bg_light)],
["#cl-topics", safe_hex(:topics_bg_dark), safe_hex(:topics_bg_light)],
["#cl-splits", safe_hex(:splits_bg_dark), safe_hex(:splits_bg_light)],
["#cl-app-cta", safe_hex(:app_cta_bg_dark), safe_hex(:app_cta_bg_light)],
["#cl-footer", safe_hex(:footer_bg_dark), safe_hex(:footer_bg_light)],
]
@@ -237,6 +238,11 @@ module CommunityLanding
end
end
faq_mh = (@s.faq_mobile_max_height rescue 0).to_i
if faq_mh > 0
css << "@media (max-width: 767px) { .cl-faq { max-height: #{faq_mh}px; overflow-y: auto; } }\n"
end
css.present? ? "<style>\n#{css}</style>\n" : ""
end