nav.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <header class="navbar-affixed-top" data-spy="affix" data-offset-top="62">
  2. <div class="navbar navbar-default yamm" role="navigation" id="navbar">
  3. <div class="container">
  4. <div class="navbar-header">
  5. <a class="navbar-brand home" href="{{ "/" | relURL }}">
  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. <span class="logo_text">AI Video</span>
  10. </a>
  11. <div class="navbar-buttons">
  12. <button type="button" class="navbar-toggle btn-template-main" data-toggle="collapse" data-target="#navigation">
  13. <span class="sr-only">{{ i18n "navToggle" }}</span>
  14. <i class="fas fa-align-justify"></i>
  15. </button>
  16. </div>
  17. </div>
  18. <!--/.navbar-header -->
  19. <div class="navbar-collapse collapse" id="navigation">
  20. <ul class="nav navbar-nav navbar-right">
  21. {{ $current := . }}
  22. {{ range .Site.Menus.main }}
  23. {{ $topLevel := replace .URL "/" "" }}
  24. <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 }}">
  25. {{ if .HasChildren }}
  26. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
  27. <ul class="dropdown-menu">
  28. {{ range .Children }}
  29. <li><a href="{{ .URL }}">{{ .Name }}</a></li>
  30. {{ end }}
  31. </ul>
  32. {{ else }}
  33. <a href="{{ .URL }}">{{ .Name }}</a>
  34. {{ end }}
  35. </li>
  36. {{ end }}
  37. </ul>
  38. </div>
  39. <!--/.nav-collapse -->
  40. <div class="collapse clearfix" id="search">
  41. <form class="navbar-form" role="search">
  42. <div class="input-group">
  43. <input type="text" class="form-control" placeholder="Search">
  44. <span class="input-group-btn">
  45. <button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
  46. </span>
  47. </div>
  48. </form>
  49. </div>
  50. <!--/.nav-collapse -->
  51. </div>
  52. </div>
  53. </header>
  54. <!-- *** NAVBAR END ***-->