nav.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <nav class="navbar navbar-expand-xl navbar-light bg-light">
  2. <div class="container-fluid justify-content-between justify-content-xl-start">
  3. <a class="navbar-brand home" href="/">
  4. <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="d-none d-lg-block logo">
  5. <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="d-block d-lg-none logo-sm">
  6. <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
  7. </a>
  8. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
  9. aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  10. <span class="navbar-toggler-icon"></span>
  11. </button>
  12. <div class="collapse navbar-collapse w-100" id="navbarSupportedContent">
  13. <ul class="navbar-nav me-auto mb-2 mb-lg-0 mt-4 mt-lg-0">
  14. {{ $currentPage := . }}
  15. {{ range .Site.Menus.main }}
  16. {{ if .HasChildren }}
  17. <li class="nav-item dropdown">
  18. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
  19. aria-expanded="false">
  20. {{ .Pre }}
  21. <span>{{ .Name }}</span>
  22. </a>
  23. <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
  24. {{ range .Children }}
  25. <li class="{{ if $currentPage.IsMenuCurrent " main" . }}active{{ end }}">
  26. <a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a>
  27. </li>
  28. {{ end }}
  29. </ul>
  30. </li>
  31. {{ else }}
  32. <li class="nav-item">
  33. <a class="nav-link" href="{{ .URL }}">
  34. {{ .Pre }}
  35. <span>{{ .Name }}</span>
  36. </a>
  37. </li>
  38. {{ end }}
  39. {{ end }}
  40. </ul>
  41. <ul class="nav navbar-nav navbar-right flex-column flex-xl-row ms-auto mb-3 mb-xl-0">
  42. <li class="me-2 mb-3 mb-xl-0">
  43. <button class="language-btn" onclick="toggleLang()">
  44. 中 / en
  45. </button>
  46. </li>
  47. <li class="me-3 mb-4 mb-xl-0">
  48. <a href="/virtual-host-solution/" class="solution-link">客製化 AI 主持人報價</a>
  49. </li>
  50. <li>
  51. <a href="https://cloud.choozmo.com/login" target="_blank" class="signin-link">開始製作 AI 主播影片</a>
  52. </li>
  53. <!-- <li><a href="https://video.choozmo.com/register.html" class="signup-link">註冊</a></li> -->
  54. </ul>
  55. <!-- <ul class="navbar-nav me-auto mb-2 mb-lg-0">
  56. <li class="nav-item">
  57. <a class="nav-link active" aria-current="page" href="#">Home</a>
  58. </li>
  59. <li class="nav-item">
  60. <a class="nav-link" href="#">Link</a>
  61. </li>
  62. <li class="nav-item dropdown">
  63. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  64. Dropdown
  65. </a>
  66. <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
  67. <li><a class="dropdown-item" href="#">Action</a></li>
  68. <li><a class="dropdown-item" href="#">Another action</a></li>
  69. <li><hr class="dropdown-divider"></li>
  70. <li><a class="dropdown-item" href="#">Something else here</a></li>
  71. </ul>
  72. </li>
  73. <li class="nav-item">
  74. <a class="nav-link disabled">Disabled</a>
  75. </li>
  76. </ul> -->
  77. <!-- <form class="d-flex">
  78. <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
  79. <button class="btn btn-outline-success" type="submit">Search</button>
  80. </form> -->
  81. </div>
  82. </div>
  83. </nav>