@@{ var _isBlog = page.storage === 'page', _posts = _isBlog ? posts : [ page ]; }
@if (showHeader) { @include("header") } @@if (_isBlog) { @if (paginationType === 'top' || paginationType === 'both') { @include("pagination") } }
@for(var i = 0; i < grid.items.length; i++) { @@for(var j = 0; j < _posts.length; j++) { @@{ var _post = _posts[j], _pathToPost = _isBlog ? pathToRoot + _post.filePath : '#'; }
@{ var gridItemClass = grid.items[i].classNames }
@include("article") @@if (!_isBlog && _post.comments) { @include("comments") }
} }
@@if (_isBlog) { @if(paginationType === 'bottom' || paginationType === 'both') { @include("pagination") } }