Browse Source

Cms Kit revisions

pull/8028/head
Armağan Ünlü 6 years ago
parent
commit
fd85ee64c0
  1. 20
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml
  2. 30
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml
  3. 26
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml
  4. 18
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml
  5. 11
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPostComment/Default.cshtml
  6. 57
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml
  7. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml
  8. 9
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/default.css
  9. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml
  10. 3
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.css
  11. 33
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml
  12. 4
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/default.css
  13. 86
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml
  14. 27
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml
  15. 3
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/blogPost.css
  16. 6
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/index.css
  17. 3
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml
  18. 6
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/index.css
  19. 5
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj

20
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml

@ -25,16 +25,20 @@
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName }) @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
} }
<div id="CmsKitBlogPostsWrapper"> <abp-card class="mb-4">
<abp-card> <abp-card-body>
<abp-card-body> <div id="CmsKitBlogPostsWrapper">
<abp-row> <abp-row>
<abp-column> <abp-column>
@await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent)) @await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent))
</abp-column> </abp-column>
</abp-row> </abp-row>
</abp-card-body> </div>
</abp-card> </abp-card-body>
</abp-card>
<abp-table striped-rows="true" id="BlogPostsTable" class="nowrap"></abp-table>
</div> <abp-card>
<abp-card-body>
<abp-table striped-rows="true" id="BlogPostsTable" class="nowrap"></abp-table>
</abp-card-body>
</abp-card>

30
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml

@ -15,14 +15,14 @@
PageLayout.Content.Title = L["Comments"].Value; PageLayout.Content.Title = L["Comments"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:CMS"].Value); PageLayout.Content.BreadCrumb.Add(L["Menu:CMS"].Value);
PageLayout.Content.MenuItemName = CmsKitAdminMenus.Comments.CommentsMenu; PageLayout.Content.MenuItemName = CmsKitAdminMenus.Comments.CommentsMenu;
var defaultStartDate = DateTime.Now.AddDays(-7).Date.ToShortDateString(); var defaultStartDate = DateTime.Now.AddDays(-7).Date.ToShortDateString();
} }
@section styles{ @section styles{
<abp-style-bundle> <abp-style-bundle>
<abp-style src="/Pages/CmsKit/Comments/index.css" /> <abp-style src="/Pages/CmsKit/Comments/index.css" />
</abp-style-bundle> </abp-style-bundle>
} }
@section scripts { @section scripts {
@ -31,9 +31,9 @@
</abp-script-bundle> </abp-script-bundle>
} }
<div id="CmsKitCommentsWrapper"> <abp-card class="mb-4">
<abp-card> <abp-card-body>
<abp-card-body> <div id="CmsKitCommentsWrapper">
<abp-row> <abp-row>
<abp-column> <abp-column>
<form id="CmsKitCommentsFilterForm" method="post"> <form id="CmsKitCommentsFilterForm" method="post">
@ -47,13 +47,13 @@
</abp-column> </abp-column>
</abp-column> </abp-column>
<abp-column size-lg="_2" size-md="_6"> <abp-column size-lg="_2" size-md="_6">
<abp-input asp-for="@Model.EntityType" label="@L["EntityType"].Value" type="text"/> <abp-input asp-for="@Model.EntityType" label="@L["EntityType"].Value" type="text" />
</abp-column> </abp-column>
<abp-column size-lg="_2" size-md="_6"> <abp-column size-lg="_2" size-md="_6">
<abp-input asp-for="@Model.EntityId" label="@L["EntityId"].Value" type="text"/> <abp-input asp-for="@Model.EntityId" label="@L["EntityId"].Value" type="text" />
</abp-column> </abp-column>
<abp-column size-lg="_2" size-md="_12"> <abp-column size-lg="_2" size-md="_12">
<abp-input asp-for="@Model.Author" label="@L["Username"].Value" type="text"/> <abp-input asp-for="@Model.Author" label="@L["Username"].Value" type="text" />
</abp-column> </abp-column>
<abp-column size-lg="_2" size-md="_12"> <abp-column size-lg="_2" size-md="_12">
<abp-button class="mt-md-4" size="Block" button-type="Primary" type="submit"> <abp-button class="mt-md-4" size="Block" button-type="Primary" type="submit">
@ -64,8 +64,12 @@
</form> </form>
</abp-column> </abp-column>
</abp-row> </abp-row>
</abp-card-body> </div>
</abp-card> </abp-card-body>
</abp-card>
<abp-table striped-rows="true" id="CommentsTable" class="nowrap"></abp-table>
</div> <abp-card>
<abp-card-body>
<abp-table striped-rows="true" id="CommentsTable" class="nowrap"></abp-table>
</abp-card-body>
</abp-card>

26
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml

@ -1,6 +1,6 @@
@page @page
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageToolbar @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageToolbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageSearchBox @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageSearchBox
@using Volo.CmsKit.Admin.Web.Pages @using Volo.CmsKit.Admin.Web.Pages
@using Volo.CmsKit.Admin.Web.Menus @using Volo.CmsKit.Admin.Web.Menus
@using Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages @using Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages
@ -16,23 +16,27 @@
} }
@section scripts { @section scripts {
<abp-script src="/Pages/CmsKit/Pages/index.js"/> <abp-script src="/Pages/CmsKit/Pages/index.js" />
} }
@section content_toolbar { @section content_toolbar {
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new {pageName = typeof(IndexModel).FullName}) @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
} }
<div id="CmsKitPagesWrapper"> <abp-card class="mb-4">
<abp-card> <abp-card-body>
<abp-card-body> <div id="CmsKitPagesWrapper">
<abp-row> <abp-row>
<abp-column> <abp-column>
@await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent)) @await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent))
</abp-column> </abp-column>
</abp-row> </abp-row>
</abp-card-body> </div>
</abp-card> </abp-card-body>
</abp-card>
<abp-table striped-rows="true" id="PagesTable" class="nowrap"></abp-table>
</div> <abp-card>
<abp-card-body>
<abp-table striped-rows="true" id="PagesTable" class="nowrap"></abp-table>
</abp-card-body>
</abp-card>

18
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml

@ -23,16 +23,20 @@
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName }) @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
} }
<div id="CmsKitTagsWrapper"> <abp-card class="mb-4">
<abp-card> <abp-card-body>
<abp-card-body> <div id="CmsKitTagsWrapper">
<abp-row> <abp-row>
<abp-column> <abp-column>
@await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent)) @await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent))
</abp-column> </abp-column>
</abp-row> </abp-row>
</abp-card-body> </div>
</abp-card> </abp-card-body>
<abp-table striped-rows="true" id="TagsTable"></abp-table> </abp-card>
</div>
<abp-card>
<abp-card-body>
<abp-table striped-rows="true" id="TagsTable"></abp-table>
</abp-card-body>
</abp-card>

11
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPostComment/Default.cshtml

@ -7,16 +7,9 @@
@model DefaultBlogPostCommentViewComponent.DefaultBlogPostCommentViewModel @model DefaultBlogPostCommentViewComponent.DefaultBlogPostCommentViewModel
<abp-card>
<abp-card-body>
<span class="area-title pt-0 pb-3">
@L["Comments"]
</span>
@await Component.InvokeAsync(typeof(CommentingViewComponent), new @await Component.InvokeAsync(typeof(CommentingViewComponent), new
{ {
entityType = Model.EntityType, entityType = Model.EntityType,
entityId = Model.EntityId entityId = Model.EntityId
}) })
</abp-card-body>
</abp-card>

57
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml

@ -25,7 +25,7 @@
} }
@{ @{
Func<dynamic, IHtmlContent> GetCommentArea(Guid? repliedCommentId, bool cancelButton = false) => Func<dynamic, IHtmlContent> GetCommentArea(Guid? repliedCommentId, bool cancelButton = false) =>
@<div class="cms-comment-form-area bg-light card p-3 mx-0 @(repliedCommentId.HasValue ? "my-1" : "mb-0")" @<div class="cms-comment-form-area bg-light card p-3 mx-0 @(repliedCommentId.HasValue ? "my-3" : "mt-3")"
data-reply-id="@(repliedCommentId?.ToString() ?? "")" data-reply-id="@(repliedCommentId?.ToString() ?? "")"
style="@(string.IsNullOrEmpty(repliedCommentId?.ToString() ?? "") ? "" : "display:none")"> style="@(string.IsNullOrEmpty(repliedCommentId?.ToString() ?? "") ? "" : "display:none")">
<form class="cms-comment-form"> <form class="cms-comment-form">
@ -113,7 +113,7 @@
</div>; </div>;
} }
<div class="cms-comment-area" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId"> <div class="cms-comment-area mb-5" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId">
@if (CurrentUser.IsAuthenticated) @if (CurrentUser.IsAuthenticated)
{ {
<div id="@($"cms-comment_{Model.EntityType}_{Model.EntityId}")"> <div id="@($"cms-comment_{Model.EntityType}_{Model.EntityId}")">
@ -129,28 +129,28 @@
@foreach (var comment in Model.Comments) @foreach (var comment in Model.Comments)
{ {
<div class="comment"> <div class="comment">
<div class="card p-3 mx-0 my-4"> <div class="card p-3 mx-0 my-3">
<h5> <h5>
@GetCommentTitle(comment.Author, comment.CreationTime).Invoke(null) @GetCommentTitle(comment.Author, comment.CreationTime).Invoke(null)
</h5> </h5>
@GetCommentContentArea(comment.Id, comment.Text).Invoke(null) @GetCommentContentArea(comment.Id, comment.Text).Invoke(null)
<div class="form-row mt-2"> <div class="form-row mt-2">
<div class="col"> <div class="col">
<div class="my-2 "> <div class="my-2 ">
@GetCommentActionArea(comment.Id, comment.Author.Id, false).Invoke(null) @GetCommentActionArea(comment.Id, comment.Author.Id, false).Invoke(null)
</div>
</div> </div>
</div> <div class="col-auto">
<div class="col-auto"> <div class="reaction-in-comment">
<div class="reaction-in-comment"> @if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
@if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>()) {
{ @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = comment.Id.ToString() })
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = comment.Id.ToString() }) }
} </div>
</div> </div>
</div> </div>
</div>
@GetEditArea(comment.Id, comment.Text).Invoke(null) @GetEditArea(comment.Id, comment.Text).Invoke(null)
@if (comment.Replies.Any()) @if (comment.Replies.Any())
@ -165,21 +165,21 @@
@GetCommentContentArea(reply.Id, reply.Text).Invoke(null) @GetCommentContentArea(reply.Id, reply.Text).Invoke(null)
<div class="form-row mt-2"> <div class="form-row mt-2">
<div class="col"> <div class="col">
<div class="my-2 "> <div class="my-2 ">
@GetCommentActionArea(reply.Id, reply.Author.Id, true).Invoke(null) @GetCommentActionArea(reply.Id, reply.Author.Id, true).Invoke(null)
</div>
</div> </div>
</div> <div class="col-auto">
<div class="col-auto"> <div class="reaction-in-comment">
<div class="reaction-in-comment"> @if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
@if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>()) {
{ @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = reply.Id.ToString() })
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = reply.Id.ToString() }) }
} </div>
</div> </div>
</div> </div>
</div>
@GetEditArea(reply.Id, reply.Text).Invoke(null) @GetEditArea(reply.Id, reply.Text).Invoke(null)
</div> </div>
@ -190,7 +190,7 @@
<div class=" mt-2"> <div class=" mt-2">
@if (CurrentUser.IsAuthenticated) @if (CurrentUser.IsAuthenticated)
{ {
<a href="#" class="comment-links comment-reply-link btn btn-primary btn-sm" data-reply-id="@comment.Id.ToString()"> <a href="#" class="comment-links comment-reply-link btn btn-primary btn-sm" data-reply-id="@comment.Id.ToString()">
<i class="fa fa-reply mr-1"></i> @L["Reply"] <i class="fa fa-reply mr-1"></i> @L["Reply"]
</a> </a>
} }
@ -210,3 +210,4 @@
</div> </div>
} }
</div> </div>

2
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml

@ -6,7 +6,7 @@
@inject IHtmlLocalizer<CmsKitResource> L @inject IHtmlLocalizer<CmsKitResource> L
<div class="p-3 my-3 card"> <div class="p-3 my-3 card">
<div class="row"> <div class="row form-row">
<div class="col-auto text-left"> <div class="col-auto text-left">
<span class="area-title"> <span class="area-title">
Rating Rating

9
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/default.css

@ -58,4 +58,13 @@ span.area-title {
font-weight: 600; font-weight: 600;
padding: 3px; padding: 3px;
display: block; display: block;
}
.reaction-in-comment .card {
border: 0 !important;
padding: 0 !important;
margin: 0 !important;
}
.popover {
min-width: 276px;
} }

2
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml

@ -7,7 +7,7 @@
<div class="p-3 my-3 card"> <div class="p-3 my-3 card">
<div class="row"> <div class="row form-row">
<div class="col-auto text-left"> <div class="col-auto text-left">
<span class="area-title"> <span class="area-title">
Reactions Reactions

3
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.css

@ -14,4 +14,7 @@ span.area-title {
font-weight: 600; font-weight: 600;
padding: 3px; padding: 3px;
display: block; display: block;
}
.popover {
min-width: 276px;
} }

33
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml

@ -2,27 +2,16 @@
@model TagViewComponent.TagViewModel @model TagViewComponent.TagViewModel
<div> <div class="my-3">
<div class="p-3 my-3 card"> <div class="cms-tags-area">
<div class="row"> @if (Model.Tags != null)
<div class="col-auto text-left"> {
<span class="area-title"> foreach (var tag in Model.Tags)
Tags {
<span class="badge badge-light px-3 py-2 cmskit-tag font-weight-normal">
@tag.Name
</span> </span>
</div> }
<div class="col text-right"> }
<div class="cms-tags-area">
@if (Model.Tags != null)
{
foreach (var tag in Model.Tags)
{
<span class="badge badge-light px-3 py-2 cmskit-tag font-weight-normal">
@tag.Name
</span>
}
}
</div>
</div>
</div>
</div> </div>
</div> </div>

4
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/default.css

@ -8,3 +8,7 @@ span.area-title {
padding: 3px; padding: 3px;
display: block; display: block;
} }
.popover {
min-width: 276px;
}

86
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml

@ -14,14 +14,14 @@
@section styles{ @section styles{
<abp-style src="/Pages/Public/CmsKit/Blogs/blogPost.css"/> <abp-style src="/Pages/Public/CmsKit/Blogs/blogPost.css" />
} }
@{ @{
string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.BlogPost.Title; string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.BlogPost.Title;
} }
<abp-card> <abp-card class="mb-4">
<img src="/api/cms-kit/media/@Model.BlogPost.CoverImageMediaId" class="card-img-top" onerror="this.src='@dummyImageSource'" /> <img src="/api/cms-kit/media/@Model.BlogPost.CoverImageMediaId" class="card-img-top" onerror="this.src='@dummyImageSource'" />
<abp-card-body> <abp-card-body>
<abp-row> <abp-row>
@ -32,54 +32,62 @@
<small style="opacity:.65;">@Model.BlogPost.CreationTime</small> <small style="opacity:.65;">@Model.BlogPost.CreationTime</small>
</p> </p>
@Html.Raw(Model.BlogPost.Content) @Html.Raw(Model.BlogPost.Content)
<p> <p class="mb-3">
@if (Model.BlogPost.LastModificationTime != null) @if (Model.BlogPost.LastModificationTime != null)
{ {
<small style="opacity:.65;">@L["LastModification"].Value : @Model.BlogPost.LastModificationTime</small> <small style="opacity:.65;">@L["LastModification"].Value : @Model.BlogPost.LastModificationTime</small>
} }
</p> </p>
<hr />
@if (GlobalFeatureManager.Instance.IsEnabled<TagsFeature>())
{
if (Model.TagsFeature?.IsEnabled == true)
{
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
})
}
}
</div> </div>
</abp-row> </abp-row>
</abp-card-body>
</abp-card>
<abp-row class="form-row">
<abp-column size-lg="_6" size-md="_12">
@if (GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
{
if (Model.ReactionsFeature?.IsEnabled == true)
{
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
})
}
}
@if (GlobalFeatureManager.Instance.IsEnabled<TagsFeature>()) </abp-column>
{ <abp-column size-lg="_6" size-md="_12">
if (Model.TagsFeature?.IsEnabled == true) @if (GlobalFeatureManager.Instance.IsEnabled<RatingsFeature>())
{ {
@await Component.InvokeAsync(typeof(TagViewComponent), new if (Model.RatingsFeature?.IsEnabled == true)
{ {
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, @await Component.InvokeAsync(typeof(RatingViewComponent), new
entityId = Model.BlogPost.Id.ToString() {
}) entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
} entityId = Model.BlogPost.Id.ToString()
} })
}
}
</abp-column>
</abp-row>
</abp-card-body>
</abp-card>
@if (GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
{
if (Model.ReactionsFeature?.IsEnabled == true)
{
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
})
}
}
@if (GlobalFeatureManager.Instance.IsEnabled<RatingsFeature>())
{
if (Model.RatingsFeature?.IsEnabled == true)
{
@await Component.InvokeAsync(typeof(RatingViewComponent), new
{
entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType,
entityId = Model.BlogPost.Id.ToString()
})
}
}
@if (GlobalFeatureManager.Instance.IsEnabled<CommentsFeature>()) @if (GlobalFeatureManager.Instance.IsEnabled<CommentsFeature>())
{ {

27
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml

@ -7,6 +7,9 @@
@model IndexModel @model IndexModel
@section styles{
<abp-style src="/Pages/Public/CmsKit/Blogs/index.css" />
}
@{ @{
const string dummyImageSource = "https://dummyimage.com/320x180/a3a3a3/fff.png"; const string dummyImageSource = "https://dummyimage.com/320x180/a3a3a3/fff.png";
} }
@ -23,18 +26,18 @@
else else
{ {
<img src="@(dummyImageSource)?text=@blog.Title" class="card-img-top" /> <img src="@(dummyImageSource)?text=@blog.Title" class="card-img-top" />
} }
<abp-card-body class="p-4"> <abp-card-body class="p-4">
<h5>@blog.Title</h5> <h5>@blog.Title</h5>
<p class="mb-2"> <p class="mb-2">
<span class="font-weight-bold">@@@blog.Author?.UserName</span> <span class="font-weight-bold">@@@blog.Author?.UserName</span>
<small style="opacity:.65;">@blog.CreationTime</small> <small style="opacity:.65;">@blog.CreationTime</small>
</p> </p>
<p style="min-height: 60px;">@blog.ShortDescription</p> <p style="min-height: 60px;">@blog.ShortDescription</p>
<a href="/blogs/@Model.BlogSlug/@blog.Slug" class="btn btn-block btn-light"> <a href="/blogs/@Model.BlogSlug/@blog.Slug" class="btn btn-block btn-light">
@L["Read"] @L["Read"]
</a> </a>
</abp-card-body> </abp-card-body>
</abp-card> </abp-card>
</abp-column> </abp-column>

3
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/blogPost.css

@ -18,3 +18,6 @@ span.area-title {
padding: 3px; padding: 3px;
display: block; display: block;
} }
.popover {
min-width: 276px;
}

6
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/index.css

@ -0,0 +1,6 @@
.card-img-top {
}
.popover {
min-width: 276px;
}

3
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml

@ -5,6 +5,9 @@
@model Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages.IndexModel @model Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages.IndexModel
@inject IHtmlLocalizer<CmsKitResource> L @inject IHtmlLocalizer<CmsKitResource> L
@section styles{
<abp-style src="/Pages/Public/CmsKit/Pages/index.css" />
}
@await Component.InvokeAsync(typeof(DefaultPageViewComponent), @await Component.InvokeAsync(typeof(DefaultPageViewComponent),
new new
{ {

6
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/index.css

@ -0,0 +1,6 @@
.card-img-top {
}
.popover {
min-width: 276px;
}

5
modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj

@ -29,4 +29,9 @@
<Content Remove="Components\**\*.css" /> <Content Remove="Components\**\*.css" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Remove="Pages\Public\CmsKit\Blogs\index.css" />
<None Remove="Pages\Public\CmsKit\Pages\index.css" />
</ItemGroup>
</Project> </Project>

Loading…
Cancel
Save