list.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {{ define "navbar" }}
  2. {{ partial "navigators/navbar.html" . }}
  3. {{ end }}
  4. {{ define "sidebar" }}
  5. {{ $homePage:="#" }}
  6. {{ if hugo.IsMultilingual }}
  7. {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
  8. {{ end }}
  9. <section class="sidebar-section" id="sidebar-section">
  10. <div class="sidebar-holder">
  11. <div class="sidebar" id="sidebar">
  12. <form class="mx-auto" method="get" action="{{ "search" | relLangURL }}">
  13. <input type="text" name="keyword" value="" placeholder="{{ i18n "search" }}" data-search="" id="search-box" />
  14. </form>
  15. <div class="sidebar-tree">
  16. <ul class="tree" id="tree">
  17. <li id="list-heading"><a href="{{ .Type | relLangURL }}" data-filter="all">{{ i18n .Type }}</a></li>
  18. <div class="subtree taxonomy-terms">
  19. {{ $context := . }}
  20. {{ partial "navigators/taxonomies.html" (dict "context" $context "taxo" "categories" "title" ( humanize "categories" ) ) }}
  21. </div>
  22. </ul>
  23. </div>
  24. </div>
  25. </div>
  26. </section>
  27. {{ end }}
  28. {{ define "content" }}
  29. <section class="content-section" id="content-section">
  30. <div class="content container-fluid" id="content">
  31. <div class="container-fluid post-card-holder" id="post-card-holder">
  32. {{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
  33. {{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
  34. {{ $paginator := .Paginate $posts $numShow }}
  35. {{ range $paginator.Pages }}
  36. {{ if .Layout }}
  37. {{/* ignore the search.md file*/}}
  38. {{ else }}
  39. {{ partial "cards/post.html" . }}
  40. {{ end }}
  41. {{ end }}
  42. </div>
  43. <div class="paginator">
  44. {{ partial "pagination.html" . }}
  45. </div>
  46. </div>
  47. </section>
  48. {{ end }}