<%# locals: (portal:, global_config:) %> <% socials = portal.social_profiles social_definitions = [ { key: 'facebook', icon: 'i-ri-facebook-circle-fill', label: 'Facebook', base_url: 'https://facebook.com/' }, { key: 'x', icon: 'i-ri-twitter-x-fill', label: 'X', base_url: 'https://x.com/' }, { key: 'instagram', icon: 'i-ri-instagram-fill', label: 'Instagram', base_url: 'https://instagram.com/' }, { key: 'linkedin', icon: 'i-ri-linkedin-box-fill', label: 'LinkedIn', base_url: 'https://linkedin.com/' }, { key: 'youtube', icon: 'i-ri-youtube-fill', label: 'YouTube', base_url: 'https://youtube.com/' }, { key: 'tiktok', icon: 'i-ri-tiktok-fill', label: 'TikTok', base_url: 'https://tiktok.com/' }, { key: 'github', icon: 'i-ri-github-fill', label: 'GitHub', base_url: 'https://github.com/' }, { key: 'whatsapp', icon: 'i-ri-whatsapp-fill', label: 'WhatsApp', base_url: 'https://wa.me/' } ] active_socials = social_definitions.filter_map do |social| handle = socials[social[:key]].to_s.strip social.merge(url: "#{social[:base_url]}#{handle}") if handle.present? end show_branding = !portal.account.feature_enabled?('disable_branding') %> <% if show_branding || active_socials.any? %> <% end %>