focus.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="focus-content">
  2. <h3 class="post-block-title">
  3. <span>焦點新聞</span>
  4. </h3>
  5. {{ range first 3 (where .Site.Pages "Params.type" "focus") }}
  6. <a href="{{ .Permalink }}">
  7. <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
  8. </a>
  9. <h2 class="post-title mt-3">
  10. <a href="{{ .Permalink }}">{{ .Params.title }}</a>
  11. </h2>
  12. <section class="news-info mb-5">
  13. {{ range (.GetTerms "categories") }}
  14. <div href="{{ .Permalink }}">{{ .LinkTitle }}</div>
  15. {{ end }}
  16. <div>{{ .Date | time.Format ":date_long" }}</div>
  17. </section>
  18. {{ end }}
  19. <!-- {{ $t := $.Site.GetPage "/focus" }}
  20. {{ range $index, $element := first 3 ( where $t.Pages "Params.display" true) }}
  21. <a href="{{ .Permalink }}">
  22. <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
  23. </a>
  24. <section class="news-info">
  25. {{ range (.GetTerms "categories") }}
  26. <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
  27. {{ end }}
  28. <small>{{ .Date | time.Format ":date_long" }}</small>
  29. </section>
  30. <h2 class="post-title mb-3">
  31. <a href="{{ .Permalink }}">{{ .Params.title }}</a>
  32. </h2>
  33. {{ end }} -->
  34. </div>