trends.html 890 B

123456789101112131415161718192021222324252627
  1. <!-- 趨勢日報內容 -->
  2. {{ if isset .Site.Params "trends" }}
  3. {{ if .Site.Params.trends.enable }}
  4. {{ if gt (len .Site.Data.trends) 0 }}
  5. <section class="bar background-gray mb-0">
  6. <div class="container">
  7. <div class="heading text-center">
  8. <h2>趨勢排行</h2>
  9. </div>
  10. <div class="col-md-12">
  11. <div class="row row__rank">
  12. {{ range $index, $element := sort .Site.Data.trends "weight" }}
  13. <div class="col-6 col-md-3 rank">
  14. <div class="box-simple rank__box">
  15. <span class="rank__num">{{ $element.weight | markdownify }}</span>
  16. <h3 class="rank__word">{{ $element.name | markdownify }}</h3>
  17. </div>
  18. </div>
  19. {{ end }}
  20. </div>
  21. </div>
  22. </div>
  23. </section>
  24. {{ end }}
  25. {{ end }}
  26. {{ end }}