feat(index): enable conditional rendering for steps and features sections
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m21s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m21s
- 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.
This commit is contained in:
@@ -131,7 +131,10 @@
|
||||
|
||||
@* ═══════════════════════════════════════════════
|
||||
2. HOW IT WORKS — 3 numbered steps
|
||||
(controlled by LandingSettings.StepsEnabled; default off)
|
||||
═══════════════════════════════════════════════ *@
|
||||
@if (_settings?.StepsEnabled == true)
|
||||
{
|
||||
<section class="section-landing">
|
||||
<MudContainer MaxWidth="MaxWidth.Large">
|
||||
<div class="text-center mb-8 fade-in-up">
|
||||
@@ -157,10 +160,14 @@
|
||||
</MudGrid>
|
||||
</MudContainer>
|
||||
</section>
|
||||
}
|
||||
|
||||
@* ═══════════════════════════════════════════════
|
||||
3. FEATURES — 6 cards with icons
|
||||
(controlled by LandingSettings.FeaturesEnabled; default off)
|
||||
═══════════════════════════════════════════════ *@
|
||||
@if (_settings?.FeaturesEnabled == true)
|
||||
{
|
||||
<section class="section-landing" style="background:var(--mud-palette-background-gray);">
|
||||
<MudContainer MaxWidth="MaxWidth.Large">
|
||||
<div class="text-center mb-8 fade-in-up">
|
||||
@@ -188,6 +195,7 @@
|
||||
</MudGrid>
|
||||
</MudContainer>
|
||||
</section>
|
||||
}
|
||||
|
||||
@* ═══════════════════════════════════════════════
|
||||
4. STATS — Counter cards
|
||||
|
||||
@@ -344,8 +344,10 @@ public partial class Index : IDisposable
|
||||
public string? HeroButtonPrimaryText { get; set; }
|
||||
public string? HeroButtonSecondaryText { get; set; }
|
||||
public List<TrustBadgeItem>? TrustBadges { get; set; }
|
||||
public bool? StepsEnabled { get; set; }
|
||||
public string? StepsTitle { get; set; }
|
||||
public List<StepItem>? Steps { get; set; }
|
||||
public bool? FeaturesEnabled { get; set; }
|
||||
public string? FeaturesTitle { get; set; }
|
||||
public List<FeatureItem>? Features { get; set; }
|
||||
public string? StatsTitle { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user