diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml index 09f3f7f447..b819b0a161 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Index.cshtml +++ b/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(AbpPageSearchBoxViewComponent)) - - - - -
\ No newline at end of file +
+ + + + + + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml index 8841d656b0..44fd02e9d8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Comments/Index.cshtml +++ b/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.BreadCrumb.Add(L["Menu:CMS"].Value); PageLayout.Content.MenuItemName = CmsKitAdminMenus.Comments.CommentsMenu; - + var defaultStartDate = DateTime.Now.AddDays(-7).Date.ToShortDateString(); } @section styles{ - + } @section scripts { @@ -31,9 +31,9 @@ } -
- - + + +
@@ -47,13 +47,13 @@ - + - + - + @@ -64,8 +64,12 @@
- - - - -
\ No newline at end of file +
+ + + + + + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml index c85d4759ba..ffb1e156e0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Index.cshtml @@ -1,6 +1,6 @@ @page @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.Menus @using Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages @@ -16,23 +16,27 @@ } @section scripts { - + } @section content_toolbar { - @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new {pageName = typeof(IndexModel).FullName}) + @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName }) } -
- - + + +
@await Component.InvokeAsync(typeof(AbpPageSearchBoxViewComponent)) - - - - -
\ No newline at end of file +
+ + + + + + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml index b568c2737c..e76f0ad9f5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/Index.cshtml +++ b/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(AbpPageSearchBoxViewComponent)) - - - -
+
+ + + + + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 5638d92fa8..03a402f78a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -45,6 +45,7 @@ "LastModification": "Last Modification", "LoginToAddComment": "Login to add comment", "LoginToRate": "Login to rate", + "LoginToReact": "Login to react", "LoginToReply": "Login to reply", "Menu:CMS": "CMS", "Message": "Message", @@ -82,7 +83,9 @@ "Permission:TagManagement.Delete": "Delete", "Permission:TagManagement.Update": "Update", "PickYourReaction": "Pick your reaction", + "Rating": "Rating", "RatingUndoMessage": "Your rating will be undo.", + "Reactions": "Reactions", "Read": "Read", "RepliesToThisComment": "Replies to this comment", "Reply": "Reply", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json index 73c02088ea..51699884a8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json @@ -13,13 +13,13 @@ "CmsKit.Ratings": "Puanlama", "CmsKit.Reactions": "Tepkiler", "CmsKit.Tags": "Etiketler", - "CmsKit:Comments:0001": "{0} ögesi yorumlanabilir değil.", "CmsKit:0002": "İçerik zaten mevcut!", "CmsKit:0003": "{0} ögesi etiketlenebilir değil.", "CmsKit:BlogPost:0001": "Aynı url etiketi zaten mevcut.", + "CmsKit:Comments:0001": "{0} ögesi yorumlanabilir değil.", "CmsKit:Media:0002": "Bu öge için medya eklenemez.", - "CmsKit:Reaction:0001": "Bu ögeye tepki verilemez.", "CmsKit:Page:0001": "Girilen url ({0}) kullanımdadır.", + "CmsKit:Reaction:0001": "Bu ögeye tepki verilemez.", "CmsKit:Tag:0002": "Bu öge etiketlenebilir değil.", "CommentAuthorizationExceptionMessage": "Bu yorumları görebilmek için yetki gerekir.", "CommentDeletionConfirmationMessage": "Bu yorum ve buna yapılan tüm yorumlan silinecektir!", @@ -44,6 +44,7 @@ "LastModification": "Son Güncellenme", "LoginToAddComment": "Yorum yapmak için giriş yap", "LoginToRate": "Oylamak için giriş yapın", + "LoginToReact": "Reaksiyon vermek için giriş yap", "LoginToReply": "Cevap vermek için giriş yap", "Menu:CMS": "CMS", "Message": "Mesaj", @@ -72,7 +73,9 @@ "Permission:TagManagement.Delete": "Etiket Silme", "Permission:TagManagement.Update": "Etiket Güncelleme", "PickYourReaction": "Tepkinizi seçin", + "Rating": "Puan", "RatingUndoMessage": "Oylamanız geri alınacak.", + "Reactions": "Reaksiyonlar", "Read": "Oku", "RepliesToThisComment": "Bu yoruma yapılan yorumlar", "Reply": "Cevapla", diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPost/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPost/Default.cshtml deleted file mode 100644 index 46f7749d8b..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPost/Default.cshtml +++ /dev/null @@ -1,28 +0,0 @@ -@model Volo.CmsKit.Public.Blogs.BlogPostPublicDto -@using Volo.CmsKit.Localization -@using Microsoft.Extensions.Localization - -@inject IStringLocalizer L - -@{ - const string dummyImageSource = "https://dummyimage.com/300x200/a3a3a3/fff.png"; -} - - - - - @Model.Title - @Model.Author?.UserName - - @Html.Raw(Model.Content) - - - @Model.CreationTime - @if (Model.LastModificationTime != null) - { - @L["LastModification"].Value : @Model.LastModificationTime - } - - - - diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPost/DefaultBlogPostViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPost/DefaultBlogPostViewComponent.cs deleted file mode 100644 index 90dc2a6ab0..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPost/DefaultBlogPostViewComponent.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.AspNetCore.Mvc; -using Volo.CmsKit.Public.Blogs; - -namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Blogs.BlogPost -{ - [ViewComponent(Name = "CmsDefaultBlogPost")] - public class DefaultBlogPostViewComponent : AbpViewComponent - { - protected IBlogPostPublicAppService BlogPostPublicAppService { get; } - - public DefaultBlogPostViewComponent(IBlogPostPublicAppService blogPostPublicAppService) - { - BlogPostPublicAppService = blogPostPublicAppService; - } - - public virtual async Task InvokeAsync(string blogSlug, string blogPostSlug) - { - var blogPost = await BlogPostPublicAppService.GetAsync(blogSlug, blogPostSlug); - - return View("~/Pages/CmsKit/Shared/Components/Blogs/BlogPost/Default.cshtml", blogPost); - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPostComment/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPostComment/Default.cshtml index c34f64eb0c..aac65629f4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPostComment/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Blogs/BlogPostComment/Default.cshtml @@ -7,16 +7,9 @@ @model DefaultBlogPostCommentViewComponent.DefaultBlogPostCommentViewModel - - - - @L["Comments"] - - + @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = Model.EntityType, entityId = Model.EntityId - }) - - \ No newline at end of file + }) \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml index 1dc4ca37ff..062afddc4d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml @@ -25,7 +25,7 @@ } @{ Func GetCommentArea(Guid? repliedCommentId, bool cancelButton = false) => - @
@@ -113,7 +113,7 @@
; } -
+
@if (CurrentUser.IsAuthenticated) {
@@ -129,28 +129,28 @@ @foreach (var comment in Model.Comments) {
-
+
@GetCommentTitle(comment.Author, comment.CreationTime).Invoke(null)
@GetCommentContentArea(comment.Id, comment.Text).Invoke(null) -
-
-
- @GetCommentActionArea(comment.Id, comment.Author.Id, false).Invoke(null) +
+
+
+ @GetCommentActionArea(comment.Id, comment.Author.Id, false).Invoke(null) +
-
-
-
- @if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled()) - { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = comment.Id.ToString() }) - } +
+
+ @if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = comment.Id.ToString() }) + } +
-
@GetEditArea(comment.Id, comment.Text).Invoke(null) @if (comment.Replies.Any()) @@ -165,21 +165,21 @@ @GetCommentContentArea(reply.Id, reply.Text).Invoke(null) -
-
-
- @GetCommentActionArea(reply.Id, reply.Author.Id, true).Invoke(null) +
+
+
+ @GetCommentActionArea(reply.Id, reply.Author.Id, true).Invoke(null) +
-
-
-
- @if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled()) - { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = reply.Id.ToString() }) - } +
+
+ @if (cmsKitUiOptions.Value.CommentsOptions.IsReactionsEnabled && GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "comment", entityId = reply.Id.ToString() }) + } +
-
@GetEditArea(reply.Id, reply.Text).Invoke(null)
@@ -190,7 +190,7 @@
@if (CurrentUser.IsAuthenticated) { - + @L["Reply"] } @@ -210,3 +210,4 @@
}
+ \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml index de6424d083..4a64c1c4a8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml @@ -5,57 +5,68 @@ @model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating.RatingViewModel @inject IHtmlLocalizer L -
-
- @if (CurrentUser.IsAuthenticated) - { - - @(Model.CurrentRating != null ? Model.CurrentRating + " " : 0 + "") - @if (Model.CurrentRating != null) - { - - @L["Undo"] - - } - if (Model.Ratings != null) - { - - - +
+
+
+ + @L["Rating"] + +
+
+
+ @if (CurrentUser.IsAuthenticated) + { + @if (Model.CurrentRating != null) + { + + @L["Undo"] + + } + if (Model.Ratings != null) + { + + + -
\ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/default.css b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/default.css index eb46cf8f04..e8aa16162a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/default.css +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/default.css @@ -49,4 +49,22 @@ } .rating-undo-link:hover { text-decoration:none; +} +.reaction-in-comment span.area-title { + display: none; +} + +span.area-title { + font-weight: 600; + padding: 3px; + display: block; +} +.reaction-in-comment .card { + border: 0 !important; + padding: 0 !important; + margin: 0 !important; +} + +.popover { + min-width: 276px; } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml index b95d679fda..8aaac7d8db 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml @@ -1,17 +1,32 @@ @inject ICurrentUser CurrentUser +@inject IHtmlLocalizer L @using Volo.Abp.Users +@using Volo.CmsKit.Localization +@using Microsoft.AspNetCore.Mvc.Localization @model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewComponent.ReactionSelectionViewModel -@if (CurrentUser.IsAuthenticated || Model.Reactions.Count(r => r.Count > 0) > 0) -{ -
-
+ +
+
+
+ + @L["Reactions"] + +
+
+ @foreach (var reaction in Model.Reactions.Where(r => r.Count > 0)) + { + + + @(reaction.Count) + + } @if (CurrentUser.IsAuthenticated) { - - + + } - @foreach (var reaction in Model.Reactions.Where(r => r.Count > 0)) + else { - - - @(reaction.Count) +
"> + }
-} +
\ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionViewComponent.cs index ff10ea662c..46869a3399 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/ReactionSelectionViewComponent.cs @@ -4,6 +4,7 @@ using JetBrains.Annotations; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI; using Volo.Abp.AspNetCore.Mvc.UI.Widgets; using Volo.CmsKit.Public.Reactions; using Volo.CmsKit.Web; @@ -23,12 +24,16 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelectio protected CmsKitUiOptions Options { get; } + public AbpMvcUiOptions AbpMvcUiOptions { get; } + public ReactionSelectionViewComponent( IReactionPublicAppService reactionPublicAppService, - IOptions options) + IOptions options, + IOptions abpMvcUiOptions) { ReactionPublicAppService = reactionPublicAppService; Options = options.Value; + AbpMvcUiOptions = abpMvcUiOptions.Value; } public virtual async Task InvokeAsync( @@ -37,11 +42,15 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelectio { var result = await ReactionPublicAppService.GetForSelectionAsync(entityType, entityId); + var loginUrl = + $"{AbpMvcUiOptions.LoginUrl}?returnUrl={HttpContext.Request.Path.ToString()}&returnUrlHash=#cms-rating_{entityType}_{entityId}"; + var viewModel = new ReactionSelectionViewModel { EntityType = entityType, EntityId = entityId, - Reactions = new List() + Reactions = new List(), + LoginUrl = loginUrl }; foreach (var reactionDto in result.Items) @@ -67,6 +76,8 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelectio public string EntityId { get; set; } public List Reactions { get; set; } + + public string LoginUrl { get; set; } } public class ReactionViewModel diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.css b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.css index 7ce8d0fc02..2bea61970d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.css +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.css @@ -5,4 +5,16 @@ width: 25%; display: inline-block; float: left; +} +.reaction-in-comment span.area-title { + display: none; +} + +span.area-title { + font-weight: 600; + padding: 3px; + display: block; +} +.popover { + min-width: 276px; } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml index f7c61dbc81..bb7b95e08f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml @@ -2,12 +2,16 @@ @model TagViewComponent.TagViewModel -@if (Model.Tags != null) -{ - foreach (var tag in Model.Tags) - { - - @tag.Name - - } -} \ No newline at end of file +
+
+ @if (Model.Tags != null) + { + foreach (var tag in Model.Tags) + { + + @tag.Name + + } + } +
+
\ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs index c40408117a..33031c4c21 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs @@ -5,12 +5,17 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Widgets; using Volo.CmsKit.Public.Tags; using Volo.CmsKit.Tags; namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Tags { - [ViewComponent(Name = "CmsTags")] + [Widget( + StyleFiles = new[] + { + "/Pages/CmsKit/Shared/Components/Tags/default.css" + })] public class TagViewComponent : AbpViewComponent { protected readonly ITagAppService TagAppService; diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/default.css b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/default.css new file mode 100644 index 0000000000..3465bb45be --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/default.css @@ -0,0 +1,14 @@ + +.reaction-in-comment span.area-title { + display: none; +} + +span.area-title { + font-weight: 600; + padding: 3px; + display: block; +} + +.popover { + min-width: 276px; +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml index 8ad6dd9ca3..491ae75e8d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml @@ -1,6 +1,5 @@ @page -@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Blogs.BlogPost @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Blogs.BlogPostComment @using Volo.CmsKit.Public.Web.Pages @using Volo.Abp.GlobalFeatures @@ -13,49 +12,82 @@ @model Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Blogs.BlogPostModel -@await Component.InvokeAsync(typeof(DefaultBlogPostViewComponent), new -{ - Model.BlogSlug, - Model.BlogPostSlug -}) -@if (GlobalFeatureManager.Instance.IsEnabled()) -{ - if (Model.TagsFeature?.IsEnabled == true) - { - @await Component.InvokeAsync(typeof(TagViewComponent), new - { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) - } +@section styles{ + } -@if (GlobalFeatureManager.Instance.IsEnabled()) -{ - if (Model.ReactionsFeature?.IsEnabled == true) - { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new - { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) - } +@{ + string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.BlogPost.Title; } -@if (GlobalFeatureManager.Instance.IsEnabled()) -{ - if (Model.RatingsFeature?.IsEnabled == true) - { - @await Component.InvokeAsync(typeof(RatingViewComponent), new - { - entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, - entityId = Model.BlogPost.Id.ToString() - }) - } -} + + + + +
+

@Model.BlogPost.Title

+

+ @@@Model.BlogPost.Author?.UserName + @Model.BlogPost.CreationTime +

+ @Html.Raw(Model.BlogPost.Content) +

+ @if (Model.BlogPost.LastModificationTime != null) + { + @L["LastModification"].Value : @Model.BlogPost.LastModificationTime + } +

+
+ + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + if (Model.TagsFeature?.IsEnabled == true) + { + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = Volo.CmsKit.Blogs.BlogPostConsts.EntityType, + entityId = Model.BlogPost.Id.ToString() + }) + } + } +
+
+ + + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + 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()) + { + 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()) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml index b58e6d1543..c3cc22b91d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml @@ -7,53 +7,45 @@ @model IndexModel +@section styles{ + +} @{ - const string dummyImageSource = "https://dummyimage.com/300x200/a3a3a3/fff.png"; + const string dummyImageSource = "https://dummyimage.com/320x180/a3a3a3/fff.png"; } @foreach (var blog in Model.Blogs.Items) { - + - - - @blog.Title - - - @@@blog.Author?.UserName - - - - @if (blog.CoverImageMediaId != null) - { - - } - else - { - - } - - @blog.ShortDescription - - - - - - + @if (blog.CoverImageMediaId != null) + { + + } + else + { + + } + +
@blog.Title
+

+ @@@blog.Author?.UserName + @blog.CreationTime +

+

@blog.ShortDescription

+ + @L["Read"] +
- - - @blog.CreationTime - -
}
- + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/blogPost.css b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/blogPost.css new file mode 100644 index 0000000000..f4543f9870 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/blogPost.css @@ -0,0 +1,23 @@ +.card-body img { + max-width: 100%; + border-radius: 4px; + margin: 20px 0; +} + +.badge.badge-light { + color: #757575; + background: #f2f2f2; +} + +.reaction-in-comment span.area-title { + display: none; +} + +span.area-title { + font-weight: 600; + padding: 3px; + display: block; +} +.popover { + min-width: 276px; +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/index.css b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/index.css new file mode 100644 index 0000000000..48e71edcf9 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml index 426b5ebacf..7503bcfaa4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml +++ b/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 @inject IHtmlLocalizer L +@section styles{ + +} @await Component.InvokeAsync(typeof(DefaultPageViewComponent), new { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/index.css b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/index.css new file mode 100644 index 0000000000..48e71edcf9 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Properties/launchSettings.json b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Properties/launchSettings.json deleted file mode 100644 index 60e2c66615..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:60873/", - "sslPort": 44300 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Volo.CmsKit.Public.Web": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" - } - } -} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj index 5f19bdd904..2003412559 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Volo.CmsKit.Public.Web.csproj @@ -29,4 +29,9 @@ + + + + +