-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🚧 feat: wip * refactor * 🚧 feat: wip * use [email protected]
- Loading branch information
Showing
49 changed files
with
628 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
src/MASA.OfficialWebsite.WebApp/Components/Layout/AppBar.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/MASA.OfficialWebsite.WebApp/Components/Layout/FollowUsBtn.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@rendermode @(new InteractiveServerRenderMode(prerender: false)) | ||
@inherits MInteractivePopup | ||
|
||
<div class="mt-2 @Class" style="@Style" id="follow-us-image"> | ||
<img src="@Image" /> | ||
</div> | ||
|
||
@code { | ||
|
||
[Parameter] [EditorRequired] public string Image { get; set; } = null!; | ||
|
||
[Parameter] public string? Style { get; set; } | ||
|
||
[Parameter] public string? Class { get; set; } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 11 additions & 47 deletions
58
src/MASA.OfficialWebsite.WebApp/Components/Layout/MobileAppBar.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,21 @@ | ||
<AppBar Class="hidden-md-and-up" BarHeight="48" LogoHeight="30"> | ||
<MButton Icon OnClick="() => _drawer = true"> | ||
@inject NavigationManager Navigation | ||
|
||
<AppBar Class="hidden-md-and-up" BarHeight="48" LogoHeight="30"> | ||
<MButton Icon Href="@Navigation.GetUriWithQueryParameter(nameof(Aside), true)"> | ||
<MIcon>mdi-menu</MIcon> | ||
</MButton> | ||
</AppBar> | ||
|
||
<MNavigationDrawer @bind-Value="_drawer" Fixed Temporary Right Width="315"> | ||
<MList Class="menu-list mt-1" Style="height: 100%; overflow-y: auto; padding-top:24px;" Elevation="0" Subheader TwoLine Routable> | ||
@foreach (var item in NavItems) | ||
{ | ||
@if (item.IsSubheader) | ||
{ | ||
<MSubheader Style="height: auto" | ||
Class="subtitle3 emphasis--text"> | ||
@item.Subheader | ||
</MSubheader> | ||
} | ||
else | ||
{ | ||
<MListItem Href="@item.Href" Disabled="@item.Disabled" ActiveClass="primary--text" Class="home-menu-hover"> | ||
@if (item.Image is not null) | ||
{ | ||
<MListItemAvatar Tile Size="40" Class="mt-0 mb-0"> | ||
<MImage Src="@item.Image" | ||
alt="@item.Title" | ||
Height="@item.Size" | ||
Width="@item.Size" | ||
Contain | ||
Eager /> | ||
</MListItemAvatar> | ||
} | ||
<MListItemContent > | ||
<MListItemTitle Class="h8 regular--text"> | ||
@if (item.Disabled) | ||
{ | ||
<div style="color: #A3AED0;">@item.Title</div> | ||
} | ||
else | ||
{ | ||
<div style="color: #485585;">@item.Title</div> | ||
} | ||
</MListItemTitle> | ||
<MListItemSubtitle Class="body2 regular3--text">@item.Subtitle</MListItemSubtitle> | ||
</MListItemContent> | ||
</MListItem> | ||
} | ||
} | ||
</MList> | ||
</MNavigationDrawer> | ||
@if (Aside) | ||
{ | ||
<MobileNavigationDrawer NavItems="NavItems" /> | ||
} | ||
|
||
@code { | ||
|
||
private bool? _drawer; | ||
|
||
[Parameter] public List<NavItem> NavItems { get; set; } = new(); | ||
|
||
[SupplyParameterFromQuery] | ||
private bool Aside { get; set; } | ||
|
||
} |
86 changes: 86 additions & 0 deletions
86
src/MASA.OfficialWebsite.WebApp/Components/Layout/MobileNavigationDrawer.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
@rendermode InteractiveServer | ||
@inject NavigationManager Navigation | ||
|
||
<MNavigationDrawer Value="@_drawer" | ||
ValueChanged="ValueChanged" | ||
Fixed | ||
Temporary | ||
Right | ||
Width="315" | ||
NoSsr> | ||
<MList Class="mt-1" Style="height: 100%; overflow-y: auto; padding-top:24px;" Elevation="0" Subheader TwoLine Routable> | ||
@foreach (var item in NavItems) | ||
{ | ||
@if (item.IsSubheader) | ||
{ | ||
<MSubheader Style="height: auto" | ||
Class="subtitle3 emphasis--text"> | ||
@item.Subheader | ||
</MSubheader> | ||
} | ||
else | ||
{ | ||
<MListItem Href="@item.Href" Disabled="@item.Disabled" ActiveClass="primary--text" Class="home-menu-hover"> | ||
@if (item.Image is not null) | ||
{ | ||
<MListItemAvatar Tile Size="40" Class="mt-0 mb-0"> | ||
<MImage Src="@item.Image" | ||
alt="@item.Title" | ||
Height="@item.Size" | ||
Width="@item.Size" | ||
Contain | ||
Eager /> | ||
</MListItemAvatar> | ||
} | ||
<MListItemContent > | ||
<MListItemTitle Class="h8 regular--text"> | ||
@if (item.Disabled) | ||
{ | ||
<div style="color: #A3AED0;">@item.Title</div> | ||
} | ||
else | ||
{ | ||
<div style="color: #485585;">@item.Title</div> | ||
} | ||
</MListItemTitle> | ||
<MListItemSubtitle Class="body2 regular3--text">@item.Subtitle</MListItemSubtitle> | ||
</MListItemContent> | ||
</MListItem> | ||
} | ||
} | ||
</MList> | ||
</MNavigationDrawer> | ||
|
||
@code { | ||
|
||
[Parameter] public List<NavItem> NavItems { get; set; } = new(); | ||
|
||
private bool? _drawer = false; | ||
|
||
protected override async Task OnAfterRenderAsync(bool firstRender) | ||
{ | ||
if (firstRender) | ||
{ | ||
await Task.Delay(100); | ||
_drawer = true; | ||
StateHasChanged(); | ||
} | ||
} | ||
|
||
private async Task ValueChanged(bool? val) | ||
{ | ||
var prevDrawer = _drawer; | ||
|
||
_drawer = val; | ||
|
||
StateHasChanged(); | ||
|
||
await Task.Delay(300); | ||
|
||
if (prevDrawer is true && _drawer is false) | ||
{ | ||
Navigation.NavigateTo(Navigation.GetUriWithQueryParameter("Aside", (bool?)null)); | ||
} | ||
} | ||
|
||
} |
59 changes: 0 additions & 59 deletions
59
src/MASA.OfficialWebsite.WebApp/Components/Layout/QQChatBtn.razor
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.