u
This commit is contained in:
@@ -106,32 +106,6 @@
|
|||||||
</MudItem>
|
</MudItem>
|
||||||
</MudGrid>
|
</MudGrid>
|
||||||
|
|
||||||
<!-- Newsletter Subscription -->
|
|
||||||
<MudDivider Class="my-6" />
|
|
||||||
<MudGrid Justify="Justify.Center" Class="mb-6">
|
|
||||||
<MudItem xs="12" md="8" lg="6">
|
|
||||||
<MudPaper Elevation="2" Class="pa-4 rounded-2xl newsletter-section">
|
|
||||||
<MudText Typo="Typo.h6" Class="fw-700 mb-2" Align="Align.Center">عضویت در خبرنامه</MudText>
|
|
||||||
<MudText Typo="Typo.body2" Class="mb-3" Align="Align.Center">
|
|
||||||
از آخرین اخبار، آموزشها و تخفیفهای ویژه باخبر شوید
|
|
||||||
</MudText>
|
|
||||||
<MudStack Row="true" Spacing="2" Justify="Justify.Center" Class="newsletter-form">
|
|
||||||
<MudTextField @bind-Value="_newsletterEmail"
|
|
||||||
Placeholder="آدرس ایمیل شما"
|
|
||||||
Variant="Variant.Outlined"
|
|
||||||
Class="flex-grow-1"
|
|
||||||
Style="max-width: 300px;" />
|
|
||||||
<MudButton Color="Color.Primary"
|
|
||||||
Variant="Variant.Filled"
|
|
||||||
OnClick="SubscribeNewsletter"
|
|
||||||
Class="newsletter-btn">
|
|
||||||
عضویت
|
|
||||||
</MudButton>
|
|
||||||
</MudStack>
|
|
||||||
</MudPaper>
|
|
||||||
</MudItem>
|
|
||||||
</MudGrid>
|
|
||||||
|
|
||||||
<!-- Bottom Footer -->
|
<!-- Bottom Footer -->
|
||||||
<MudDivider Class="mb-4" />
|
<MudDivider Class="mb-4" />
|
||||||
<MudGrid Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
<MudGrid Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||||
|
|||||||
@@ -5,37 +5,4 @@ namespace FrontOffice.Main.Shared;
|
|||||||
|
|
||||||
public partial class Footer
|
public partial class Footer
|
||||||
{
|
{
|
||||||
private string? _newsletterEmail;
|
|
||||||
|
|
||||||
private void SubscribeNewsletter()
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(_newsletterEmail))
|
|
||||||
{
|
|
||||||
Snackbar.Add("لطفاً آدرس ایمیل معتبر وارد کنید.", Severity.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!IsValidEmail(_newsletterEmail))
|
|
||||||
{
|
|
||||||
Snackbar.Add("فرمت ایمیل صحیح نیست.", Severity.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Implement newsletter subscription logic
|
|
||||||
Snackbar.Add("با موفقیت در خبرنامه عضو شدید.", Severity.Success);
|
|
||||||
_newsletterEmail = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsValidEmail(string email)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var addr = new System.Net.Mail.MailAddress(email);
|
|
||||||
return addr.Address == email;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -110,18 +110,6 @@ html, body {
|
|||||||
color: var(--mud-palette-primary);
|
color: var(--mud-palette-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.newsletter-section {
|
|
||||||
background: var(--mud-palette-background-grey);
|
|
||||||
}
|
|
||||||
|
|
||||||
.newsletter-form {
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newsletter-btn {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-legal {
|
.footer-legal {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
@@ -131,15 +119,6 @@ html, body {
|
|||||||
justify-content: flex-start !important;
|
justify-content: flex-start !important;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.newsletter-form {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newsletter-btn {
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode adjustments */
|
/* Dark mode adjustments */
|
||||||
@@ -147,8 +126,4 @@ html, body {
|
|||||||
background: var(--mud-palette-dark-background);
|
background: var(--mud-palette-dark-background);
|
||||||
border-top-color: var(--mud-palette-dark-divider);
|
border-top-color: var(--mud-palette-dark-divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mud-theme-dark .newsletter-section {
|
|
||||||
background: var(--mud-palette-dark-surface);
|
|
||||||
}
|
|
||||||
/*#endregion*/
|
/*#endregion*/
|
||||||
|
|||||||
Reference in New Issue
Block a user