index.html 1.1 KB

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