news-main.html 820 B

1234567891011121314151617181920212223242526
  1. <div class="news-main">
  2. {{ range first 1 (where .Site.Pages "Params.type" "main") }}
  3. <!-- <div>
  4. <h2 class="post-title my-0 my-lg-3">
  5. <a href="{{ .Params.url }}">{{ .Params.title }}</a>
  6. </h2>
  7. </div> -->
  8. <a href="{{ .Permalink }}">
  9. <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
  10. </a>
  11. <div class="post-container">
  12. <h2 class="post-title my-lg-3">
  13. <a href="{{ .Params.url }}">{{ .Params.title }}</a>
  14. </h2>
  15. <section class="news-info">
  16. {{ range (.GetTerms "categories") }}
  17. <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
  18. {{ end }}
  19. <small>{{ .Date | time.Format ":date_long" }}</small>
  20. </section>
  21. </div>
  22. <p class="post-depiction">
  23. <a href="{{ .Params.url }}" style="color:#000;">{{ .Summary }}</a>
  24. </p>
  25. {{ end }}
  26. </div>