list.html 2.1 KB

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