Skip to content

Commit

Permalink
Added sample style for mongo blog.
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Feb 27, 2017
1 parent f83310a commit 3f38fdd
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,5 @@ paket-files/
*.sln.iml

# ABP
build/outputs
build/outputs
src/AbpDesk/AbpDesk.Web.Mvc/Logs
16 changes: 11 additions & 5 deletions src/AbpDesk/AbpDesk.MongoBlog/Areas/Blog/Views/Posts/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<h2>Blog Posts</h2>

@section styles {
<link rel="stylesheet" type="text/css" href="~/Areas/Blog/Views/Posts/Index.css" />
}

<ul class="blog-post-list">
@foreach (var post in Model)
{
Expand All @@ -13,11 +17,13 @@
}
else
{
<h5>Comments</h5>
foreach (var comment in post.Comments)
{
<p><strong>@comment.Name</strong>: @comment.Message</p>
}
<div class="post-comments">
<h5>Comments</h5>
@foreach (var comment in post.Comments)
{
<p class="post-comment"><strong>@comment.Name</strong>: @comment.Message</p>
}
</div>
}
}
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.blog-post-list .post-comments {
margin-left: 10px;
border-left: 5px solid #ddd;
padding-left: 10px; }
.blog-post-list .post-comments .post-comment {
margin-bottom: 0.2em; }

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/AbpDesk/AbpDesk.MongoBlog/Areas/Blog/Views/Posts/Index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.blog-post-list {
.post-comments {
margin-left: 10px;
border-left: 5px solid #ddd;
padding-left: 10px;

.post-comment {
margin-bottom: 0.2em;
}
}
}
6 changes: 6 additions & 0 deletions src/AbpDesk/AbpDesk.MongoBlog/compilerconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"outputFile": "Areas/Blog/Views/Posts/Index.css",
"inputFile": "Areas/Blog/Views/Posts/Index.scss"
}
]
49 changes: 49 additions & 0 deletions src/AbpDesk/AbpDesk.MongoBlog/compilerconfig.json.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"compilers": {
"less": {
"autoPrefix": "",
"cssComb": "none",
"ieCompat": true,
"strictMath": false,
"strictUnits": false,
"relativeUrls": true,
"rootPath": "",
"sourceMapRoot": "",
"sourceMapBasePath": "",
"sourceMap": false
},
"sass": {
"includePath": "",
"indentType": "space",
"indentWidth": 2,
"outputStyle": "nested",
"Precision": 5,
"relativeUrls": true,
"sourceMapRoot": "",
"sourceMap": false
},
"stylus": {
"sourceMap": false
},
"babel": {
"sourceMap": false
},
"coffeescript": {
"bare": false,
"runtimeMode": "node",
"sourceMap": false
}
},
"minifiers": {
"css": {
"enabled": true,
"termSemicolons": true,
"gzip": false
},
"javascript": {
"enabled": true,
"termSemicolons": true,
"gzip": false
}
}
}
2 changes: 1 addition & 1 deletion src/AbpDesk/AbpDesk.Web.Mvc/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
.AddDebug()
.AddSerilog(new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.RollingFile("logs.txt")
.WriteTo.RollingFile("Logs/logs.txt")
.CreateLogger()
);

Expand Down
Binary file modified src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll
Binary file not shown.

0 comments on commit 3f38fdd

Please sign in to comment.