header.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {{ $colorScheme := default "dark" .Site.Params.header.colorScheme }}
  2. <div>
  3. <img class="img-fluid" src="/img/banner1.jpg" alt="">
  4. </div>
  5. <header class="blog-header">
  6. <nav class="navbar navbar-expand-md navbar-{{ $colorScheme }} py-3">
  7. <div class="container-fluid ">
  8. <a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}">
  9. {{ partial "brand" . }}
  10. </a>
  11. {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
  12. {{ if gt (len $taxonomy) 0 }}
  13. {{ if eq $taxonomyname "categories" }}
  14. <h3 class="post-block-title my-4">
  15. <span></span>
  16. </h3>
  17. {{ else }}
  18. <!-- <h3 class="post-block-title my-4">
  19. <span></span>
  20. </h3> -->
  21. {{ end }}
  22. <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
  23. <ul class="navbar-nav mb-2 mb-lg-0">
  24. {{ range $name, $value := $taxonomy }}
  25. <li class="nav-item" role="presentation">
  26. <a class="nav-link"
  27. href="{{ printf $taxonomyname | relLangURL }}/{{ $name | urlize }}/">{{$name }}</a>
  28. </li>
  29. {{ end }}
  30. </ul>
  31. </div>
  32. </nav>
  33. {{ end }}
  34. {{ end }}
  35. </header>