nav.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <header class="navbar-affixed-top navbar-fixed-top" data-spy="affix" data-offset-top="62">
  2. <div class="navbar navbar-default yamm" role="navigation" id="navbar">
  3. <div class="container-fluid">
  4. <div class="navbar-header">
  5. <a class="navbar-brand home" href="/">
  6. <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm logo">
  7. <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm logo-sm">
  8. <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
  9. </a>
  10. <div class="navbar-buttons">
  11. <button type="button" class="navbar-toggle btn-template-main" data-toggle="collapse" data-target="#navigation">
  12. <span class="sr-only">{{ i18n "navToggle" }}</span>
  13. <i class="fas fa-align-justify"></i>
  14. </button>
  15. </div>
  16. <!-- <ul class="language-list">
  17. <li><a href="{{ "/" | relURL }}">{{ $.Site.Params.languageName}}</a></li>
  18. <li><a href="{{ "/" | relURL }}">{{ $.Site.Params.languageNamezh }}</a></li>
  19. </ul> -->
  20. </div>
  21. <!--/.navbar-header -->
  22. <div class="navbar-collapse collapse" id="navigation">
  23. <ul class="nav navbar-nav navbar-left">
  24. {{ $current := . }}
  25. {{ range .Site.Menus.main }}
  26. {{ $topLevel := replace .URL "/" "" }}
  27. <li class="dropdown{{ if eq $current.RelPermalink .URL | or (eq $current.Type $topLevel) | or (and (eq (default (trim .URL "/") .Identifier) "blog") (in (slice "taxonomy" "taxonomyTerm") $current.Kind)) }} active{{ end }}">
  28. {{ if .HasChildren }}
  29. <a href="#" class="dropdown-toggle main-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
  30. <ul class="dropdown-menu">
  31. {{ range .Children }}
  32. <li><a href="{{ .URL }}">{{ .Name }}</a></li>
  33. {{ end }}
  34. </ul>
  35. {{ else }}
  36. <a href="{{ .URL }}" class="main-link">{{ .Name }}</a>
  37. {{ end }}
  38. </li>
  39. {{ end }}
  40. </ul>
  41. <ul class="nav navbar-nav navbar-right">
  42. <li><a href="https://video.choozmo.com/login.html" class="signin-link">登入</a></li>
  43. <li><a href="https://video.choozmo.com/register.html" class="signup-link">註冊</a></li>
  44. </ul>
  45. </div>
  46. <!--/.nav-collapse -->
  47. <div class="collapse clearfix" id="search">
  48. <form class="navbar-form" role="search">
  49. <div class="input-group">
  50. <input type="text" class="form-control" placeholder="Search">
  51. <span class="input-group-btn">
  52. <button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
  53. </span>
  54. </div>
  55. </form>
  56. </div>
  57. <!--/.nav-collapse -->
  58. </div>
  59. </div>
  60. </header>
  61. <!-- *** NAVBAR END ***-->