From bb789e443ee7857ae15a9069e3049c8cfac3f8dc Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Sun, 4 Oct 2026 23:34:22 +0330 Subject: [PATCH] feat(index): enable conditional rendering for steps and features sections - Added support for conditional rendering of the steps and features sections on the landing page, controlled by the new `StepsEnabled` and `FeaturesEnabled` properties in the Index.razor.cs file. - This enhancement allows for more dynamic content presentation based on user settings, improving the overall user experience. --- src/FrontOffice.Main/Pages/Index.razor | 8 ++++++++ src/FrontOffice.Main/Pages/Index.razor.cs | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/FrontOffice.Main/Pages/Index.razor b/src/FrontOffice.Main/Pages/Index.razor index a652f1b..64741df 100644 --- a/src/FrontOffice.Main/Pages/Index.razor +++ b/src/FrontOffice.Main/Pages/Index.razor @@ -131,7 +131,10 @@ @* ═══════════════════════════════════════════════ 2. HOW IT WORKS — 3 numbered steps + (controlled by LandingSettings.StepsEnabled; default off) ═══════════════════════════════════════════════ *@ +@if (_settings?.StepsEnabled == true) +{
@@ -157,10 +160,14 @@
+} @* ═══════════════════════════════════════════════ 3. FEATURES — 6 cards with icons + (controlled by LandingSettings.FeaturesEnabled; default off) ═══════════════════════════════════════════════ *@ +@if (_settings?.FeaturesEnabled == true) +{
@@ -188,6 +195,7 @@
+} @* ═══════════════════════════════════════════════ 4. STATS — Counter cards diff --git a/src/FrontOffice.Main/Pages/Index.razor.cs b/src/FrontOffice.Main/Pages/Index.razor.cs index 4062577..56f6c17 100644 --- a/src/FrontOffice.Main/Pages/Index.razor.cs +++ b/src/FrontOffice.Main/Pages/Index.razor.cs @@ -344,8 +344,10 @@ public partial class Index : IDisposable public string? HeroButtonPrimaryText { get; set; } public string? HeroButtonSecondaryText { get; set; } public List? TrustBadges { get; set; } + public bool? StepsEnabled { get; set; } public string? StepsTitle { get; set; } public List? Steps { get; set; } + public bool? FeaturesEnabled { get; set; } public string? FeaturesTitle { get; set; } public List? Features { get; set; } public string? StatsTitle { get; set; }