@page @inherits Volo.Blogging.Pages.Blog.BloggingPage @using Microsoft.AspNetCore.Authorization @using Volo.Abp.AspNetCore.Mvc.UI.Packages.OwlCarousel @using Volo.Blogging @using Volo.Blogging.Pages.Blog.Posts @inject IAuthorizationService Authorization @model Volo.Blogging.Pages.Blog.Posts.IndexModel @{ ViewBag.PageTitle = "Blog"; } @section scripts { } @section styles { }
@for (var index = 0; index < Model.Posts.Count && index < 1; index++) { var post = Model.Posts[index]; }
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Create)) { @L["CreateANewPost"] }
@for (var index = 0; index < Model.Posts.Count && index < 3; index++) { var post = Model.Posts[index]; }
@if (Model.Posts.Count > 3) {

@L["LastPosts"]

@for (var index = 3; index < Model.Posts.Count; index++) { var post = Model.Posts[index]; var oddPost = index % 2 == 1; }
}
@if (Model.PopularTags.Count > 0) {

@L["PopularTags"]

}