Skip to content

Commit

Permalink
Clean up styles (#35)
Browse files Browse the repository at this point in the history
* add migration
* update nuget packages
* styling and layout
  • Loading branch information
petervandenhout authored Aug 10, 2019
1 parent 17e16c5 commit 9f9eec5
Show file tree
Hide file tree
Showing 54 changed files with 618 additions and 243 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
@{
Layout = "~/Pages/Shared/_SiteLayout.cshtml";
Layout = "~/Pages/Shared/_Layout.cshtml";
}
@section head {
@RenderSection("head", required: false)
}
@section scripts {
@RenderSection("scripts", required: false)
}

@RenderBody()
10 changes: 10 additions & 0 deletions samples/Opw.PineBlog.Sample/Areas/Blog/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@{
Layout = "~/Pages/Shared/_Layout.cshtml";
}
@section head {
@RenderSection("head", required: false)
}
@section scripts {
@RenderSection("scripts", required: false)
}
@RenderBody()
15 changes: 0 additions & 15 deletions samples/Opw.PineBlog.Sample/Pages/Shared/_Footer.cshtml

This file was deleted.

34 changes: 0 additions & 34 deletions samples/Opw.PineBlog.Sample/Pages/Shared/_Header.cshtml

This file was deleted.

6 changes: 2 additions & 4 deletions samples/Opw.PineBlog.Sample/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Merriweather:700">
<link rel="stylesheet" href="~/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/font-awesome.min.css">
<link rel="stylesheet" href="~/themes/default/css/theme.css">
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Merriweather:700">
Expand All @@ -21,7 +20,6 @@
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous">
<link rel="stylesheet" href="~/css/font-awesome.min.css" asp-append-version="true">
<link rel="stylesheet" href="~/themes/default/css/theme.min.css" asp-append-version="true">
</environment>

@RenderSection("head", required: false)
Expand All @@ -31,13 +29,14 @@
<link rel="shortcut icon" href="~/favicon.ico">
</head>
<body>
<partial name="_CookieConsentPartial" />

@RenderBody()

<environment include="Development">
<script src="~/js/jquery.js"></script>
<script src="~/js/popper.min.js"></script>
<script src="~/js/bootstrap.js"></script>
<script src="~/themes/default/js/theme.min.js" asp-append-version="true"></script>
</environment>
<environment exclude="Development">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
Expand All @@ -56,7 +55,6 @@
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous">
</script>
<script src="~/themes/default/js/theme.min.js" asp-append-version="true"></script>
</environment>

@RenderSection("scripts", required: false)
Expand Down
18 changes: 0 additions & 18 deletions samples/Opw.PineBlog.Sample/Pages/Shared/_SiteLayout.cshtml

This file was deleted.

1 change: 1 addition & 0 deletions samples/Opw.PineBlog.Sample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authentication.Cookies;
using Opw.PineBlog.RazorPages;

namespace Opw.PineBlog.Sample
{
Expand Down
5 changes: 2 additions & 3 deletions samples/Opw.PineBlog.Sample/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
//"DefaultConnection": "Server=.\\SQLEXPRESS; Database=pineblog-sqldb; Trusted_Connection=True;",
//"DefaultConnection": "Server=.\\SQLEXPRESS; Database=pineblog-db; Trusted_Connection=True;",
"DefaultConnection": "Server=inMemory; Database=pineblog-db;"
},
"PineBlogOptions": {
Expand All @@ -12,8 +12,7 @@
"CreateAndSeedDatabases": true,
"AzureStorageConnectionString": "UseDevelopmentStorage=true",
"AzureStorageBlobContainerName": "pineblog",
"FileBaseUrl": "http://127.0.0.1:10000/devstoreaccount1",
"CoverImagesPath": "covers"
"FileBaseUrl": "http://127.0.0.1:10000/devstoreaccount1"
},
"Logging": {
"LogLevel": {
Expand Down
9 changes: 7 additions & 2 deletions src/Opw.PineBlog.Abstractions/Models/PostListType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ namespace Opw.PineBlog.Models
/// </summary>
public enum PostListType
{
/// <summary>
/// Not set.
/// </summary>
NotSet = 0,

/// <summary>
/// Default post list.
/// </summary>
Blog,
Blog = 1,

/// <summary>
/// Post list filtered on category.
/// </summary>
Category,
Category = 2,

///// <summary>
///// Search results
Expand Down
10 changes: 5 additions & 5 deletions src/Opw.PineBlog.Abstractions/PineBlogOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public class PineBlogOptions
public string CategoryUrlPartFormat { get; set; }
public bool CreateAndSeedDatabases { get; set; }

/// <summary>
/// The version of the current running code.
/// </summary>
public string Version { get; set; }

/// <summary>
/// Cover URL.
/// </summary>
Expand All @@ -34,11 +39,6 @@ public class PineBlogOptions
/// </summary>
public string FileBaseUrl { get; set; }

/// <summary>
/// The path for the folder where the cover images are stored.
/// </summary>
public string CoverImagesPath { get; set; }

/// <summary>
/// Database connection string.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/Opw.PineBlog.Core/Opw.PineBlog.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand All @@ -24,11 +24,11 @@
<PackageReference Include="MediatR" Version="7.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="10.0.3" />
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
<PackageReference Include="MimeMapping" Version="1.0.1.12" />
<PackageReference Include="MimeMapping" Version="1.0.1.14" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Opw.PineBlog.Core/Opw.PineBlog.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<dependency id="Microsoft.EntityFrameworkCore" version="2.2.6" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Options" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Options.ConfigurationExtensions" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="MimeMapping" version="1.0.1.12" exclude="Build,Analyzers" />
<dependency id="Microsoft.Azure.Storage.Blob" version="10.0.3" exclude="Build,Analyzers" />
<dependency id="MimeMapping" version="1.0.1.14" exclude="Build,Analyzers" />
<dependency id="Microsoft.Azure.Storage.Blob" version="11.0.0" exclude="Build,Analyzers" />

<!-- Opw dependencies -->
<!--<dependency id="FluentValidation" version="8.4.0" exclude="Build,Analyzers" />-->
Expand Down
4 changes: 2 additions & 2 deletions src/Opw.PineBlog.Core/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static IServiceCollection AddPineBlogCore(this IServiceCollection service
services.AddOptions();
services.Configure<PineBlogOptions>(configuration.GetSection(nameof(PineBlogOptions)));

// TODO: only add MediatR if it has not been added yet
services.AddMediatR(typeof(AddPostCommand).Assembly);
if (services.BuildServiceProvider().GetService<IMediator>() == null)
services.AddMediatR(typeof(AddPostCommand).Assembly);
ServiceRegistrar.AddMediatRClasses(services, new[] { typeof(AddPostCommand).Assembly });

services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RequestValidationBehavior<,>));
Expand Down
Loading

0 comments on commit 9f9eec5

Please sign in to comment.