Browse Source

refactoring

pull/16503/head
Onur Pıçakcı 3 years ago
parent
commit
eaec068e1b
  1. 4
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
  2. 112
      modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml

4
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml

@ -131,7 +131,7 @@
</section> </section>
</div> </div>
<div class="col-12 col-md-4 col-lg-3"> <div class="col-12 col-md-4 col-lg-3">
<div class="card list-group"> <div class="list-group">
<div class="col-auto pe-2"> <div class="col-auto pe-2">
@if (Model.Post.Writer != null) @if (Model.Post.Writer != null)
{ {
@ -165,7 +165,7 @@
} }
</div> </div>
<hr/> <hr/>
<p class="fs-4 fw-bold text-dark">Last Blog Posts</p> <p class="fs-3 fw-bold text-dark">More from Blog</p>
@for (var index = 0; index < Model.LatestPosts.Count && index < 5; index++) @for (var index = 0; index < Model.LatestPosts.Count && index < 5; index++)
{ {
if (Model.LatestPosts[index].Id != Model.Post.Id) if (Model.LatestPosts[index].Id != Model.Post.Id)

112
modules/blogging/src/Volo.Blogging.Web/Pages/Members/Index.cshtml

@ -98,54 +98,63 @@
</div> </div>
</div> </div>
</div> </div>
@if (Model.Posts is not null && Model.Posts.Any()) <div class="col-md-8">
{
<div class="col-md-8">
<abp-tabs> <abp-tabs>
<abp-tab name="all-posts" title="Blog Posts"> @if (Model.Posts is not null && Model.Posts.Any())
<div class="mt-4 pt-3"> {
@foreach (var post in Model.Posts) <abp-tab name="all-posts" title="Blog Posts">
{ <div class="mt-4 pt-3">
<div class="post-item"> @foreach (var post in Model.Posts)
<div class="post-type-cont"> {
<div class="post-item">
<a href="@Model.GetMemberProfileUrl(Model.User)" class="text-decoration-none"> <div class="post-type-cont">
<img gravatar-email="@Model.User.Email" default-image="Identicon" class="post-member-img rounded-circle d-block"/>
</a> <a href="@Model.GetMemberProfileUrl(Model.User)" class="text-decoration-none">
<span class="post-type"> <img gravatar-email="@Model.User.Email" default-image="Identicon" class="post-member-img rounded-circle d-block"/>
<i class="fas fa-pen-nib"></i> </a>
@L["Blog"].Value.ToUpper() <span class="post-type">
</span> <i class="fas fa-pen-nib"></i>
</div> @L["Blog"].Value.ToUpper()
<div class="post-detail-cont"> </span>
<div class="post-info fs-12 mb-2"> </div>
<a href="@Model.GetMemberProfileUrl(Model.User)" class="text-decoration-none"> <div class="post-detail-cont">
<span class="text-dark dot">@Model.User.UserName</span> <div class="post-info fs-12 mb-2">
</a> <a href="@Model.GetMemberProfileUrl(Model.User)" class="text-decoration-none">
<span class="text-dark-200 dot">@post.CreationTime.ToString("MMMM yyyy")</span> <span class="text-dark dot">@Model.User.UserName</span>
<span class="text-dark-200">@post.ReadCount.ToString() @L["Views"]</span> </a>
</div> <span class="text-dark-200 dot">@post.CreationTime.ToString("MMMM yyyy")</span>
<h3 class="post-title mb-3"> <span class="text-dark-200">@post.ReadCount.ToString() @L["Views"]</span>
<a href="@Model.GetBlogPostUrl(post)"> </div>
@post.Title <h3 class="post-title mb-3">
</a> <a href="@Model.GetBlogPostUrl(post)">
</h3> @post.Title
<p class="post-desc"> </a>
<a href="@Model.GetBlogPostUrl(post)"> </h3>
@post.Description.TruncateWithPostfix(150) <p class="post-desc">
</a> <a href="@Model.GetBlogPostUrl(post)">
<a href="@Model.GetBlogPostUrl(post)" class="readMore">@L["ReadMore"]</a> @post.Description.TruncateWithPostfix(150)
</p> </a>
</div> <a href="@Model.GetBlogPostUrl(post)" class="readMore">@L["ReadMore"]</a>
<div class="post-img-cont"> </p>
<div class="post-list-span text-center post"> </div>
<img src="@post.CoverImage" class="box-articles"> <div class="post-img-cont">
</div> <div class="post-list-span text-center post">
</div> <img src="@post.CoverImage" class="box-articles">
</div> </div>
} </div>
</div> </div>
</abp-tab> }
</div>
</abp-tab>
}
else
{
<div class="col-md-8">
<div class="mt-5 pt-6">
<p>@L["MemberNotPublishedPostYet"]</p>
</div>
</div>
}
@if (CurrentUser.UserName == Model.User.UserName) @if (CurrentUser.UserName == Model.User.UserName)
{ {
<abp-tab name="edit-profile" title="Edit Profile"> <abp-tab name="edit-profile" title="Edit Profile">
@ -184,15 +193,6 @@
} }
</abp-tabs> </abp-tabs>
</div> </div>
}
else
{
<div class="col-md-8">
<div class="mt-5 pt-6">
<p>@L["MemberNotPublishedPostYet"]</p>
</div>
</div>
}
</div> </div>
</div> </div>
</main> </main>
Loading…
Cancel
Save