index.html 1.2 KB

12345678910111213141516171819202122232425262728
  1. {{ $len := len .articles }}
  2. {{ $lang := .lang }}
  3. <section class="page">
  4. <div class="container">
  5. <div class="row">
  6. <div class="page-content col-md-12">{{ range $index, $article := .articles }}
  7. <div class="col-md-4">
  8. <div class="blog-box grid-blog">
  9. {{ if $article.Image }}<img src="{{ $article.Image }}">{{ end }}
  10. <div class="col-md-12 blog-info">
  11. <span class="data">{{ $article.PublishTime }}</span>
  12. <h4>{{ $article.Title }}</h4>
  13. {{ if $article.PreviewText }}<p>{{ noescape $article.PreviewText }}</p>{{ end }}
  14. {{ $link := concat "/articles/" $article.URL }}
  15. <a href="{{ link $lang $link }}" class="blog-link">{{ trans $lang "read"}}</a>
  16. </div>
  17. </div>
  18. </div>
  19. {{ if gridsep $index $len }}</div>
  20. </div>
  21. <div class="row">
  22. <div class="page-content col-md-12">
  23. {{ end }}
  24. {{ end }}
  25. </div>
  26. </div>
  27. </div>
  28. </section>