From 7d61b8e9434e9cf45d7704b0fd5d5c538c82f791 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?=
<98148844+onurpicakci@users.noreply.github.com>
Date: Mon, 8 May 2023 11:23:25 +0300
Subject: [PATCH] cms-kit: detail page edited and member page deficiencies
completed
---
.../Blogging/Localization/Resources/en.json | 3 ++-
.../Pages/Blogs/Posts/Detail.cshtml | 24 ++++++++++-------
.../Pages/Blogs/Posts/detail.js | 15 +++++++----
.../Pages/Blogs/Shared/Styles/blog.css | 26 +++++++++++++++++--
.../Pages/Members/Index.cshtml | 6 ++++-
.../Volo.Blogging.Web/Pages/Members/Index.js | 12 +++++++++
6 files changed, 67 insertions(+), 19 deletions(-)
create mode 100644 modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.js
diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json
index d9c7595247..989926f760 100644
--- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json
+++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en.json
@@ -72,6 +72,7 @@
"UserName": "Username",
"FullURL": "Full URL",
"JobTitle": "Job Title",
- "PersonalWebsite": "PERSONAL WEBSITE"
+ "PersonalWebsite": "PERSONAL WEBSITE",
+ "EditProfile": "Edit Profile"
}
}
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
index 37780167bb..790b04ccdf 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
@@ -52,7 +52,7 @@
-
+
@@ -114,9 +114,9 @@
-
+
+
@@ -130,8 +130,8 @@
-
-
+
+
@if (Model.Post.Writer != null)
{
@@ -159,10 +159,14 @@
@Model.Post.Writer.JobTitle
}
+ @if (CurrentUser.UserName == Model.Post.Writer.UserName)
+ {
+
@L["EditProfile"]
+ }
Last Blog Posts
- @for (var index = 0; index < Model.LatestPosts.Count && index < 4; index++)
+ @for (var index = 0; index < Model.LatestPosts.Count && index < 5; index++)
{
if (Model.LatestPosts[index].Id != Model.Post.Id)
{
@@ -178,12 +182,12 @@
@if (post.Writer != null)
{
-
+
}
-
@@ -487,7 +491,7 @@ else
-
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/detail.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/detail.js
index b6d1a2d975..59a148ef91 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/detail.js
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/detail.js
@@ -49,12 +49,17 @@
encodeURI(pageHeader + ' | ' + blogName) +
'&'
);
-
- $(".copy-link").click(function() {
- var copiedLink = $(this);
- });
};
-
+
+ $('#CopyLink').click(function (event) {
+ event.preventDefault();
+ var $temp = $('');
+ $('body').append($temp);
+ $temp.val(window.location.href).select();
+ document.execCommand('copy');
+ $temp.remove();
+ });
+
$('div .replyForm').hide();
$('div .editForm').hide();
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css
index 66328cb885..b24425f547 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css
@@ -321,8 +321,30 @@ div.vs-blog {
div.vs-blog > .form-group {
margin: 0 !important; }
.last-post-title{
- font-size: 0.9rem;
- font-weight: 550;
+ font-size: 15px;
+ line-height: 20px;
+ font-weight: 700;
+ letter-spacing: 0px;
text-decoration: none;
color: black;
}
+.last-post-image{
+ width: 30px;
+ height: 30px;
+ border-top-left-radius: 50%;
+ border-top-right-radius: 50%;
+ border-bottom-right-radius: 50%;
+ border-bottom-left-radius: 50%;
+}
+.last-post-name{
+ padding-right: 2px;
+ max-height: 16px;
+ padding-top: 0.5em;
+ padding-right: 0.5em;
+}
+#CopyLink{
+ padding: 0;
+ border: none;
+ background: none;
+}
+
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml
index 58ab94f310..d8fba6b491 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml
@@ -15,6 +15,10 @@
ViewBag.Title = @Model.User.UserName.ToUpper() + " - " + L["Blogs"].Value;
}
+@section scripts {
+
+}
+
@section styles {
}
@@ -146,7 +150,7 @@
{