You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {{ define "main" }}
  2. <main class="cf ph3 ph5-l pv3 pv4-l f4 tc center measure-wide lh-copy mid-gray">
  3. {{ .Content }}
  4. </main>
  5. <div class="pa3 pa4-ns w-70 center">
  6. <h1 class="flex-none db">Recent Articles</h1>
  7. <div class="flex">
  8. {{ $section := where .Data.Pages "Section" "article" }}
  9. <section class="w-60 pa4 bg-white">
  10. {{ range sort (first 1 $section) "Date" "desc" }}
  11. {{ if .Date }}
  12. <date class="f6">
  13. {{ .Date.Format "January 2, 2006" }}
  14. </date>
  15. {{ end }}
  16. <h2 class="f3 near-black">
  17. <a href="{{ .URL }}" class="link black dim">
  18. {{ .Title }}
  19. </a>
  20. </h2>
  21. <div class="nested-links f5 nested-copy-line-height">
  22. <p>
  23. {{ .Summary }}
  24. </p>
  25. </div>
  26. {{ end }}
  27. </section>
  28. <section class="w-30 ph4">
  29. {{ range sort (first 4 (after 1 $section)) "Date" "desc" }}
  30. <h2 class="f5 fw4 mb4">
  31. <a href="{{ .URL }}" class="link black dim">
  32. {{ .Title }}
  33. </a>
  34. </h2>
  35. {{ end }}
  36. </section>
  37. </div>
  38. </div>
  39. {{ end }}