Browse Source

Fixed blog comments and added blog styles

tags/2.0.3
Teknikode 4 years ago
parent
commit
98569322a9

+ 1
- 0
Teknik/Areas/Blog/BlogAreaRegistration.cs View File

@@ -66,6 +66,7 @@ namespace Teknik.Areas.Blog
"~/Areas/Blog/Scripts/Blog.js"));
// Register Style Bundles
BundleTable.Bundles.Add(new StyleBundle("~/Content/blog").Include(
"~/Areas/Blog/Content/Blog.css",
"~/Content/bootstrap-markdown.min.css"));
}
}

+ 90
- 0
Teknik/Areas/Blog/Content/Blog.css View File

@@ -0,0 +1,90 @@
/* Pagination */
.pager {
margin-bottom: 60px;
text-align: left;
}
.pager > li > a {
width: 140px;
padding: 10px 20px;
text-align: center;
border-radius: 30px;
}

/*
* Blog name and description
*/

.blog-header {
padding-top: 20px;
padding-bottom: 20px;
}
.blog-title {
margin-top: 30px;
margin-bottom: 0;
font-size: 60px;
font-weight: normal;
}
.blog-description {
font-size: 20px;
}

/*
* Main column and sidebar layout
*/

.blog-main {
font-size: 18px;
line-height: 1.5;
}
/*
* Blog posts
*/

.blog-post {
margin-bottom: 60px;
}
.blog-post-sm {
margin-bottom: 5px;
}
.blog-post-title {
margin-bottom: 5px;
font-size: 40px;
}
.blog-post-title-sm {
margin-bottom: 5px;
font-size: 18px;
line-height: 1;
}
/*.blog-post-title a {
color: rgb(51, 51, 51);
}*/
.blog-post-meta {
margin-bottom: 20px;
}
.blog-post-meta-sm {
margin-bottom: 5px;
font-size: 12px;
line-height: 1;
}

.post-comment {
margin-bottom: 20px;
}
.post-comment-title {
margin-bottom: 5px;
font-size: 40px;
}

.post-comment-meta {
margin-bottom: 20px;
}

/*
* Markdown Edits
*/
blockquote {
border-left: 2px dotted #888;
padding-left: 5px;
background: #d0f0ff;
}

+ 1
- 1
Teknik/Areas/Blog/Scripts/Blog.js View File

@@ -96,7 +96,7 @@
$("#edit_comment_postid").val(commentID);
$.ajax({
type: "POST",
url: getCommentContentURL,
url: getCommentArticleURL,
data: { commentID: commentID },
success: function (html) {
if (html.result) {

+ 2
- 2
Teknik/Areas/Blog/Views/Blog/Blog.cshtml View File

@@ -17,8 +17,8 @@

var getCommentsURL = '@Url.Action("GetComments", "Blog", new { area = "Blog" })';
var getCommentArticleURL = '@Url.Action("GetCommentArticle", "Blog", new { area = "Blog" })';
var addCommentURL = '@Url.Action("CreatePost", "Blog", new { area = "Blog" })';
var editCommentURL = '@Url.Action("EditPost", "Blog", new { area = "Blog" })';
var addCommentURL = '@Url.Action("CreateComment", "Blog", new { area = "Blog" })';
var editCommentURL = '@Url.Action("EditComment", "Blog", new { area = "Blog" })';
var deleteCommentURL = '@Url.Action("DeleteComment", "Blog", new { area = "Blog" })';
</script>


+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Comment.cshtml View File

@@ -16,7 +16,7 @@
<div class="col-sm-8 col-sm-offset-2">
<div class="post-comment">
<p class="post-comment-meta text-muted">
<a href="@Url.Action("Index", "Profile", new { area = "Profile", username = Model.Post.Blog.User.Username })">@Model.Post.Blog.User.Username</a> replied at @Model.DatePosted.ToString("H:m:s tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")
<a href="@Url.Action("Index", "Profile", new { area = "Profile", username = Model.Post.Blog.User.Username })">@Model.Post.Blog.User.Username</a> replied at @Model.DatePosted.ToString("HH:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")
@if (Model.Post.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin"))
{
<br />

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/ViewPost.cshtml View File

@@ -16,7 +16,7 @@
var deletePostURL = '@Url.Action("DeletePost", "Blog", new { area = "Blog" })';

var getCommentsURL = '@Url.Action("GetComments", "Blog", new { area = "Blog" })';
var getCommentContentURL = '@Url.Action("GetCommentContent", "Blog", new { area = "Blog" })';
var getCommentArticleURL = '@Url.Action("GetCommentArticle", "Blog", new { area = "Blog" })';
var addCommentURL = '@Url.Action("CreateComment", "Blog", new { area = "Blog" })';
var editCommentURL = '@Url.Action("EditComment", "Blog", new { area = "Blog" })';
var deleteCommentURL = '@Url.Action("DeleteComment", "Blog", new { area = "Blog" })';

+ 1
- 0
Teknik/Teknik.csproj View File

@@ -185,6 +185,7 @@
<Compile Include="App_Start\SubdomainRouteExtension.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\Blog\Content\Blog.css" />
<Content Include="Areas\Blog\Scripts\Blog.js" />
<Content Include="Areas\Contact\Scripts\Contact.js" />
<Content Include="Areas\Home\Scripts\Home.js" />

Loading…
Cancel
Save