{{ $len := len .articles }}
{{ $lang := .lang }}
<section class="page">
    <div class="container">
        <div class="row">
            <div class="page-content col-md-12">{{ range $index, $article := .articles }}
                <div class="col-md-4">
                    <div class="blog-box grid-blog">
                        {{ if $article.Image }}<img src="{{ $article.Image }}">{{ end }}
                        <div class="col-md-12 blog-info">
                            <span class="data">{{ $article.PublishTime }}</span>
                            <h4>{{ $article.Title }}</h4>
                            {{ if $article.PreviewText }}<p>{{ noescape $article.PreviewText }}</p>{{ end }}
                            {{ $link := concat "/article/" $article.URL }}
                            <a href="{{ link $lang $link }}" class="blog-link">{{ trans $lang "read"}}</a>
                        </div>
                    </div>
                </div>
            {{ if gridsep $index $len }}</div>
            </div>
            <div class="row">
                <div class="page-content col-md-12">
            {{ end }}
            {{ end }}
            </div>
        </div>
    </div>
</section>