"
+ html << "\n"
+ html << "
\n"
html << "#{e(display_name)}\n"
html << "#{group.user_count} members\n"
+ html << "
\n"
html << "\n"
end
@@ -397,12 +413,11 @@ module CommunityLanding
# ── Shared helpers ──
- def stat_card(icon_svg, count, label)
+ def stat_card(icon_svg, count, label, icon_shape = "circle")
+ shape_class = icon_shape == "rounded" ? "cl-stat-icon--rounded" : "cl-stat-icon--circle"
"
\n" \
- "
\n" \
- "
#{icon_svg}\n" \
+ "
#{icon_svg}
\n" \
"
#{e(label)}\n" \
- "
\n" \
"
0\n" \
"
\n"
end
diff --git a/lib/community_landing/style_builder.rb b/lib/community_landing/style_builder.rb
index fdb7c60..0b268f1 100644
--- a/lib/community_landing/style_builder.rb
+++ b/lib/community_landing/style_builder.rb
@@ -22,7 +22,15 @@ module CommunityLanding
app_g1 = hex(@s.app_cta_gradient_start) || accent
app_g2 = hex(@s.app_cta_gradient_mid) || accent_hover
app_g3 = hex(@s.app_cta_gradient_end) || accent_hover
+ stat_icon_bg = hex(@s.stat_icon_bg_color.presence) rescue nil
+ stat_counter = hex(@s.stat_counter_color.presence) rescue nil
+ space_card_bg = hex(@s.groups_card_bg_color.presence) rescue nil
accent_rgb = hex_to_rgb(accent)
+ stat_icon_rgb = hex_to_rgb(stat_icon)
+
+ stat_icon_bg_val = stat_icon_bg || "rgba(#{stat_icon_rgb}, 0.1)"
+ stat_counter_val = stat_counter || "var(--cl-text-strong)"
+ space_card_bg_val = space_card_bg || "var(--cl-card)"
about_bg_extra = about_bg_img ? ", url('#{about_bg_img}') center/cover no-repeat" : ""
@@ -38,6 +46,9 @@ module CommunityLanding
--cl-border-hover: rgba(#{accent_rgb}, 0.25);
--cl-orb-1: rgba(#{accent_rgb}, 0.12);
--cl-stat-icon-color: #{stat_icon};
+ --cl-stat-icon-bg: #{stat_icon_bg_val};
+ --cl-stat-counter-color: #{stat_counter_val};
+ --cl-space-card-bg: #{space_card_bg_val};
--cl-about-gradient: linear-gradient(135deg, #{about_g1}, #{about_g2}, #{about_g3})#{about_bg_extra};
--cl-app-gradient: linear-gradient(135deg, #{app_g1}, #{app_g2}, #{app_g3});
}
@@ -52,6 +63,9 @@ module CommunityLanding
--cl-border-hover: rgba(#{accent_rgb}, 0.3);
--cl-orb-1: rgba(#{accent_rgb}, 0.08);
--cl-stat-icon-color: #{stat_icon};
+ --cl-stat-icon-bg: #{stat_icon_bg_val};
+ --cl-stat-counter-color: #{stat_counter_val};
+ --cl-space-card-bg: #{space_card_bg_val};
--cl-about-gradient: linear-gradient(135deg, #{about_g1}, #{about_g2}, #{about_g3})#{about_bg_extra};
--cl-app-gradient: linear-gradient(135deg, #{app_g1}, #{app_g2}, #{app_g3});
}