|
|
@ -2,16 +2,25 @@ |
|
|
@inherits Volo.Blogging.Pages.Blog.BloggingPage |
|
|
@inherits Volo.Blogging.Pages.Blog.BloggingPage |
|
|
@using Microsoft.AspNetCore.Authorization |
|
|
@using Microsoft.AspNetCore.Authorization |
|
|
@using Microsoft.AspNetCore.Http.Extensions |
|
|
@using Microsoft.AspNetCore.Http.Extensions |
|
|
|
|
|
@using Microsoft.Extensions.Options |
|
|
@using Volo.Abp.Users |
|
|
@using Volo.Abp.Users |
|
|
@using Volo.Blogging |
|
|
@using Volo.Blogging |
|
|
@using Volo.Blogging.Pages.Blog.Posts |
|
|
@using Volo.Blogging.Pages.Blog.Posts |
|
|
@using Volo.Blogging.Areas.Blog.Helpers.TagHelpers |
|
|
@using Volo.Blogging.Areas.Blog.Helpers.TagHelpers |
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs |
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs |
|
|
@inject IAuthorizationService Authorization |
|
|
@inject IAuthorizationService Authorization |
|
|
|
|
|
@inject IOptionsSnapshot<BloggingTwitterOptions> twitterOptions |
|
|
@model DetailModel |
|
|
@model DetailModel |
|
|
@{ |
|
|
@{ |
|
|
ViewBag.Title = Model.Post.Title; |
|
|
ViewBag.Title = Model.Post.Title; |
|
|
ViewBag.Description = Model.Post.Description; |
|
|
ViewBag.Description = Model.Post.Description; |
|
|
|
|
|
|
|
|
|
|
|
ViewBag.TwitterCard = "summary_large_image"; |
|
|
|
|
|
ViewBag.TwitterSite = string.IsNullOrWhiteSpace(twitterOptions.Value.Site) ? "" : twitterOptions.Value.Site; |
|
|
|
|
|
ViewBag.TwitterTitle = Model.Post.Title; |
|
|
|
|
|
ViewBag.TwitterDescription = Model.Post.Description; |
|
|
|
|
|
ViewBag.TwitterImage = $"{Request.Scheme}://{Request.Host}{Request.PathBase}{Model.Post.CoverImage}"; |
|
|
|
|
|
|
|
|
var hasCommentingPermission = CurrentUser.IsAuthenticated; //TODO: Apply real policy! |
|
|
var hasCommentingPermission = CurrentUser.IsAuthenticated; //TODO: Apply real policy! |
|
|
} |
|
|
} |
|
|
@section scripts { |
|
|
@section scripts { |
|
|
|