news-featured.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div class="news-featured">
  2. <h3 class="post-block-title">
  3. <span>為您精選</span>
  4. </h3>
  5. {{ range first 5 (where .Site.Pages "Params.type" "featured") }}
  6. <a href="{{ .Permalink }}">
  7. <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
  8. </a>
  9. <section class="news-info">
  10. {{ range (.GetTerms "categories") }}
  11. <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
  12. {{ end }}
  13. <small>{{ .Date | time.Format ":date_long" }}</small>
  14. </section>
  15. <h2 class="post-title mb-3">
  16. <a href="{{ .Params.url }}">{{ .Params.title }}</a>
  17. </h2>
  18. <!-- <div class="col-12 col-sm-6 col-md-4 col-xl-3">
  19. <div class="card h-100">
  20. <div class="card-header">
  21. <a href="{{ .RelPermalink }}">
  22. <h2 class="card-title text-center mb-0">
  23. {{ .Title }}
  24. </h2>
  25. </a>
  26. </div>
  27. <a href="{{ .RelPermalink }}" class="h-100">
  28. <div class="card-body h-100 d-flex flex-column justify-content-center">
  29. <section class="d-flex">
  30. <h4>電話:</h4>
  31. <h4>{{ .Params.phone }}</h4>
  32. </section>
  33. <section class="d-flex">
  34. <h4 class="m-0">地址:</h4>
  35. <h4 class="m-0">{{ .Params.address }}</h4>
  36. </section>
  37. {{ range .Params.tags }}
  38. <span class="badge bg-secondary">{{.}}</span>
  39. {{ end }}
  40. </div>
  41. </a>
  42. </div>
  43. </div> -->
  44. {{ end }}
  45. </div>