list.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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">
  25. {{ partial "navigators/sidebar.html" (dict "menuName" "sidebar" "menuItems" site.Menus.sidebar "ctx" .) }}
  26. </div>
  27. </ul>
  28. </div>
  29. </div>
  30. </div>
  31. </section>
  32. {{ end }}
  33. {{ define "content" }}
  34. <section class="content-section" id="content-section">
  35. <div class="content container-fluid" id="content">
  36. <div class="container-fluid post-card-holder" id="post-card-holder">
  37. {{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
  38. {{ $paginator := .Paginate $posts 12 }}
  39. {{ range $paginator.Pages }}
  40. {{ if .Layout }}
  41. {{/* ignore the search.md file*/}}
  42. {{ else }}
  43. {{ partial "cards/post.html" . }}
  44. {{ end }}
  45. {{ end }}
  46. </div>
  47. <div class="paginator">
  48. {{ template "_internal/pagination.html" . }}
  49. </div>
  50. </div>
  51. </section>
  52. {{ end }}
  53. {{ define "scripts" }}
  54. <script src="{{ "/js/list.js" | relURL }}"></script>
  55. {{ end }}