feat(index): add configuration options for landing page sections
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m47s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m47s
- Introduced new settings in appsettings files to control the visibility of the steps and features sections on the landing page, allowing for dynamic content presentation. - Updated Index.razor and Index.razor.cs to utilize these settings, enhancing user experience by enabling or disabling sections based on configuration.
This commit is contained in:
@@ -131,9 +131,9 @@
|
|||||||
|
|
||||||
@* ═══════════════════════════════════════════════
|
@* ═══════════════════════════════════════════════
|
||||||
2. HOW IT WORKS — 3 numbered steps
|
2. HOW IT WORKS — 3 numbered steps
|
||||||
(controlled by LandingSettings.StepsEnabled; default off)
|
(appsettings Landing:ShowStepsSection; default false)
|
||||||
═══════════════════════════════════════════════ *@
|
═══════════════════════════════════════════════ *@
|
||||||
@if (_settings?.StepsEnabled == true)
|
@if (_showStepsSection)
|
||||||
{
|
{
|
||||||
<section class="section-landing">
|
<section class="section-landing">
|
||||||
<MudContainer MaxWidth="MaxWidth.Large">
|
<MudContainer MaxWidth="MaxWidth.Large">
|
||||||
@@ -164,9 +164,9 @@
|
|||||||
|
|
||||||
@* ═══════════════════════════════════════════════
|
@* ═══════════════════════════════════════════════
|
||||||
3. FEATURES — 6 cards with icons
|
3. FEATURES — 6 cards with icons
|
||||||
(controlled by LandingSettings.FeaturesEnabled; default off)
|
(appsettings Landing:ShowFeaturesSection; default false)
|
||||||
═══════════════════════════════════════════════ *@
|
═══════════════════════════════════════════════ *@
|
||||||
@if (_settings?.FeaturesEnabled == true)
|
@if (_showFeaturesSection)
|
||||||
{
|
{
|
||||||
<section class="section-landing" style="background:var(--mud-palette-background-gray);">
|
<section class="section-landing" style="background:var(--mud-palette-background-gray);">
|
||||||
<MudContainer MaxWidth="MaxWidth.Large">
|
<MudContainer MaxWidth="MaxWidth.Large">
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ public partial class Index : IDisposable
|
|||||||
|
|
||||||
private bool _isAuthenticated;
|
private bool _isAuthenticated;
|
||||||
private string _twentyCardPortalUrl = string.Empty;
|
private string _twentyCardPortalUrl = string.Empty;
|
||||||
|
private bool _showStepsSection;
|
||||||
|
private bool _showFeaturesSection;
|
||||||
|
|
||||||
// ── CMS page data ──
|
// ── CMS page data ──
|
||||||
private PageSettingsDto? _pageData;
|
private PageSettingsDto? _pageData;
|
||||||
@@ -53,6 +55,9 @@ public partial class Index : IDisposable
|
|||||||
MainService.OnChangeHandler += OnStateChanged;
|
MainService.OnChangeHandler += OnStateChanged;
|
||||||
_isAuthenticated = await AuthService.IsAuthenticatedAsync();
|
_isAuthenticated = await AuthService.IsAuthenticatedAsync();
|
||||||
_twentyCardPortalUrl = Configuration["TwentyCard:CreditPortalUrl"] ?? string.Empty;
|
_twentyCardPortalUrl = Configuration["TwentyCard:CreditPortalUrl"] ?? string.Empty;
|
||||||
|
// appsettings Landing:* — default false (hidden). Set true to restore sections.
|
||||||
|
_showStepsSection = Configuration.GetValue("Landing:ShowStepsSection", false);
|
||||||
|
_showFeaturesSection = Configuration.GetValue("Landing:ShowFeaturesSection", false);
|
||||||
|
|
||||||
// Load landing page settings from CMS
|
// Load landing page settings from CMS
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
"TwentyCard": {
|
"TwentyCard": {
|
||||||
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
||||||
},
|
},
|
||||||
|
"Landing": {
|
||||||
|
"ShowStepsSection": false,
|
||||||
|
"ShowFeaturesSection": false
|
||||||
|
},
|
||||||
"EncryptionSettings": {
|
"EncryptionSettings": {
|
||||||
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
||||||
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
"TwentyCard": {
|
"TwentyCard": {
|
||||||
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
||||||
},
|
},
|
||||||
|
"Landing": {
|
||||||
|
"ShowStepsSection": false,
|
||||||
|
"ShowFeaturesSection": false
|
||||||
|
},
|
||||||
"EncryptionSettings": {
|
"EncryptionSettings": {
|
||||||
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
||||||
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
"TwentyCard": {
|
"TwentyCard": {
|
||||||
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
||||||
},
|
},
|
||||||
|
"Landing": {
|
||||||
|
"ShowStepsSection": false,
|
||||||
|
"ShowFeaturesSection": false
|
||||||
|
},
|
||||||
"EncryptionSettings": {
|
"EncryptionSettings": {
|
||||||
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
||||||
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
||||||
|
|||||||
Reference in New Issue
Block a user