25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

71 lines
2.5 KiB

  1. <div class="top-row ps-3 navbar navbar-dark">
  2. <div class="container-fluid">
  3. <a class="navbar-brand" href="">حق تو</a>
  4. <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
  5. <span class="navbar-toggler-icon"></span>
  6. </button>
  7. </div>
  8. </div>
  9. <div @onclick="ToggleNavMenu">
  10. <nav class="flex-column">
  11. <div class="nav-item px-3">
  12. <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
  13. <span class="oi oi-home" aria-hidden="true"></span> خانه
  14. </NavLink>
  15. </div>
  16. <div class="nav-item px-3">
  17. <NavLink class="nav-link" href="Subjects">
  18. <span class="oi oi-list-rich" aria-hidden="true"></span> موضوعات
  19. </NavLink>
  20. </div>
  21. <div class="nav-item px-3">
  22. <NavLink class="nav-link" href="Words/word">
  23. <span class="oi oi-list-rich" aria-hidden="true"></span>دیکشنری
  24. </NavLink>
  25. </div>
  26. <div class="nav-item px-3">
  27. <NavLink class="nav-link" href="Words/bills">
  28. <span class="oi oi-list-rich" aria-hidden="true"></span>لوایح و اسناد
  29. </NavLink>
  30. </div>
  31. <div class="nav-item px-3">
  32. <NavLink class="nav-link" href="Questions">
  33. <span class="oi oi-list-rich" aria-hidden="true"></span> سوالات
  34. </NavLink>
  35. </div>
  36. <div class="nav-item px-3">
  37. <NavLink class="nav-link" href="SuitTrees">
  38. <span class="oi oi-list-rich" aria-hidden="true"></span> درختان شکایت
  39. </NavLink>
  40. </div>
  41. <div class="nav-item px-3">
  42. <NavLink class="nav-link" @onclick="Signout">
  43. <span class="oi oi-account-logout" aria-hidden="true"></span> خروج
  44. </NavLink>
  45. </div>
  46. </nav>
  47. </div>
  48. @code {
  49. private bool collapseNavMenu = true;
  50. private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
  51. private void ToggleNavMenu()
  52. {
  53. collapseNavMenu = !collapseNavMenu;
  54. }
  55. private async Task Signout()
  56. {
  57. var confirm = await SwalUtils.ShowSwal(title: "", message: "از خروج اطمینان دارید؟", icon: SweetAlertIcon.Question);
  58. if (!confirm.IsConfirmed)
  59. return;
  60. await LocalStorage.RemoveItemAsync(Statics.LoginTokenKey);
  61. NavManager.NavigateTo("/Login");
  62. }
  63. }