Skip to content

Commit

Permalink
Version 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rxtur committed Oct 28, 2017
1 parent a15f531 commit a017813
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 27 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The goal of this project is to "blogify" ASP.NET applications; Blogifier.Core bu

## Demo site

The [demo site](http://blogifier.azurewebsites.net) is a playground you can use to check out Blogifier features. You can register new user and write post to test admin panel.
The [demo site](http://blogifiercore.azurewebsites.net) is a playground you can use to check out Blogifier features. You can register new user and write post to test admin panel.

![demo site](https://user-images.githubusercontent.com/1932785/30626484-dfc57f74-9d8f-11e7-9896-4dedcaad641b.PNG)

Expand All @@ -31,7 +31,7 @@ Designed for cross-platform development, every build pushed to Windows and Linux
```
Install-Package Blogifier.Core
```
3. Configure services and application in Startup.cs to use Blogifier:
3. Configure services and application in Startup.cs to use Blogifier (example for MS SQL Server):
```csharp
public void ConfigureServices(IServiceCollection services)
{
Expand Down
Binary file modified samples/WebApp/Data/core.db
Binary file not shown.
23 changes: 13 additions & 10 deletions samples/WebApp/Views/Blogifier/Admin/Custom/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,19 @@
<span class="item-info-date" aria-label="Publish date">@publishedLbl</span>
</div>
<span class="item-status @publishedClass"><i class="fa fa-circle"></i></span>
<button class="btn-unstyled item-favorite" onclick="postsController.featured('@item.BlogPostId', this)">
@if (item.IsFeatured)
{
<i class="fa fa-star"></i>
}
else
{
<i class="fa fa-star-o"></i>
}
</button>
@if (Model.Profile.IsAdmin)
{
<button class="btn-unstyled item-favorite" onclick="postsController.featured('@item.BlogPostId', this)">
@if (item.IsFeatured)
{
<i class="fa fa-star"></i>
}
else
{
<i class="fa fa-star-o"></i>
}
</button>
}
<a class="item-show" href="~/@ApplicationSettings.BlogRoute@item.Slug" target="_blank" role="button"><i class="fa fa-external-link-square"></i></a>
</li>
}
Expand Down
4 changes: 2 additions & 2 deletions samples/WebApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"Blogifier": {
"BlogRoute": "blog/",
"SingleBlog": false,
"Title": "Blogifier.Core Demo",
"Description": "This is a demo site to showcase Blogifier.Core features and capabilities",
"Title": "Blogifier.Core",
"Description": "Blogifier.Core sample application",
"AdminTheme": "Standard",
"BlogTheme": "OneTwo"
}
Expand Down
6 changes: 3 additions & 3 deletions src/Blogifier.Core/Blogifier.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyVersion>1.2.5.0</AssemblyVersion>
<FileVersion>1.2.5.0</FileVersion>
<Version>1.2.5.0</Version>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<FileVersion>1.3.0.0</FileVersion>
<Version>1.3.0.0</Version>
<Authors>blogifierdotnet</Authors>
<Company>Blogifier</Company>
<Description>Blogifier.Core will add full-featured, multi-user blog to your ASP.NET Core application. Along with administration panel to create, update and publish posts, upload files and images, expose RSS feed to subscribers and more.</Description>
Expand Down
4 changes: 4 additions & 0 deletions src/Blogifier.Core/Controllers/Api/PostsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ public IActionResult Unpublish(int id)
[HttpPut("featured/{id:int}")]
public IActionResult Featured(int id, string act = "add")
{
var profile = GetProfile();
if (!profile.IsAdmin)
return Unauthorized();

var post = _db.BlogPosts.Single(p => p.Id == id);
if (post == null)
return NotFound();
Expand Down
23 changes: 13 additions & 10 deletions src/Blogifier.Core/Views/Blogifier/Admin/Standard/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,19 @@
<span class="item-info-date" aria-label="Publish date">@publishedLbl</span>
</div>
<span class="item-status @publishedClass"><i class="fa fa-circle"></i></span>
<button class="btn-unstyled item-favorite" onclick="postsController.featured('@item.BlogPostId', this)">
@if (item.IsFeatured)
{
<i class="fa fa-star"></i>
}
else
{
<i class="fa fa-star-o"></i>
}
</button>
@if (Model.Profile.IsAdmin)
{
<button class="btn-unstyled item-favorite" onclick="postsController.featured('@item.BlogPostId', this)">
@if (item.IsFeatured)
{
<i class="fa fa-star"></i>
}
else
{
<i class="fa fa-star-o"></i>
}
</button>
}
<a class="item-show" href="~/@ApplicationSettings.BlogRoute@item.Slug" target="_blank" role="button"><i class="fa fa-external-link-square"></i></a>
</li>
}
Expand Down

0 comments on commit a017813

Please sign in to comment.