# frozen_string_literal: true module CommunityLanding class PageBuilder include Helpers SECTION_MAP = { "hero" => :render_hero, "stats" => :render_stats, "about" => :render_about, "participation" => :render_participation, "topics" => :render_topics, "groups" => :render_groups, "app_cta" => :render_app_cta, }.freeze def initialize(data:, css:, js:) @data = data @css = css @js = js @s = SiteSetting @styles = StyleBuilder.new(@s) end def build html = +"" html << render_head html << "
\n" html << render_preloader if (@s.preloader_enabled rescue false) if @s.dynamic_background_enabled html << "