diff --git a/README.md b/README.md index 2a7bef99e..5c6cd21be 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Welcome to Piranha.Core [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ba7cbafe380b4c2796b731562c5166e0)](https://www.codacy.com/app/tidyui/piranha.core?utm_source=github.com&utm_medium=referral&utm_content=PiranhaCMS/piranha.core&utm_campaign=Badge_Grade) +[![CodeFactor](https://www.codefactor.io/repository/github/piranhacms/piranha.core/badge)](https://www.codefactor.io/repository/github/piranhacms/piranha.core) [![Total alerts](https://img.shields.io/lgtm/alerts/g/PiranhaCMS/piranha.core.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/PiranhaCMS/piranha.core/alerts/) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/PiranhaCMS/piranha.core.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/PiranhaCMS/piranha.core/context:javascript) [![Gitter chat](https://badges.gitter.im/PiranhaCMS/Piranha.png)](https://gitter.im/PiranhaCMS/Piranha) diff --git a/core/Piranha.AspNetCore.Identity/DefaultIdentitySeed.cs b/core/Piranha.AspNetCore.Identity/DefaultIdentitySeed.cs index a9c72bf86..f070a73bf 100644 --- a/core/Piranha.AspNetCore.Identity/DefaultIdentitySeed.cs +++ b/core/Piranha.AspNetCore.Identity/DefaultIdentitySeed.cs @@ -47,7 +47,7 @@ public DefaultIdentitySeed(IDb db, UserManager userManager) /// public async Task CreateAsync() { - if (_db.Users.Any()) + if (!_db.Users.Any()) { var user = new User { diff --git a/core/Piranha.AspNetCore/HttpCaching.cs b/core/Piranha.AspNetCore/HttpCaching.cs index eebdc3454..6d0c47cb8 100644 --- a/core/Piranha.AspNetCore/HttpCaching.cs +++ b/core/Piranha.AspNetCore/HttpCaching.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using Microsoft.AspNetCore.Http; @@ -37,9 +37,7 @@ public static bool IsCached(HttpContext context, HttpCacheInfo serverInfo) if (clientInfo.LastModified.HasValue) { return clientInfo.LastModified.Value >= serverInfo.LastModified.Value; - } - return false; } @@ -76,8 +74,8 @@ public static HttpCacheInfo Get(HttpContext context) { info.LastModified = DateTime.Parse(lastMod); } - catch - { + catch + { info.LastModified = null; } } diff --git a/core/Piranha.Azure.BlobStorage/BlobStorage.cs b/core/Piranha.Azure.BlobStorage/BlobStorage.cs index 417cf379f..6e6a67a68 100644 --- a/core/Piranha.Azure.BlobStorage/BlobStorage.cs +++ b/core/Piranha.Azure.BlobStorage/BlobStorage.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using Microsoft.WindowsAzure.Storage; @@ -34,27 +34,36 @@ public class BlobStorage : IStorage private string _containerUrl; /// - /// Default constructor. + /// Creates a new Blog Storage service from the given credentials. /// - public BlobStorage(StorageCredentials credentials, string containerName = "uploads") + public BlobStorage(StorageCredentials credentials, string containerName = "uploads") { _storage = new CloudStorageAccount(credentials, true); _containerName = containerName; } + /// + /// Creates a new Blob Storage service from the given connection string. + /// + public BlobStorage(string connectionString, string containerName = "uploads") + { + _storage = CloudStorageAccount.Parse(connectionString); + _containerName = containerName; + } + /// /// Opens a new storage session. /// /// A new open session - public async Task OpenAsync() + public async Task OpenAsync() { var session = _storage.CreateCloudBlobClient(); var container = session.GetContainerReference(_containerName); - if (!await container.ExistsAsync()) + if (!await container.ExistsAsync()) { await container.CreateAsync(); - await container.SetPermissionsAsync(new BlobContainerPermissions() + await container.SetPermissionsAsync(new BlobContainerPermissions() { PublicAccess = BlobContainerPublicAccessType.Blob }); @@ -69,16 +78,16 @@ await container.SetPermissionsAsync(new BlobContainerPermissions() /// /// The media resource id /// The public url - public string GetPublicUrl(string id) + public string GetPublicUrl(string id) { - if (!string.IsNullOrWhiteSpace(id)) + if (!string.IsNullOrWhiteSpace(id)) { - if (string.IsNullOrEmpty(_containerUrl)) + if (string.IsNullOrEmpty(_containerUrl)) { var session = _storage.CreateCloudBlobClient(); var container = session.GetContainerReference(_containerName); - _containerUrl = container.Uri.AbsoluteUri; + _containerUrl = container.Uri.AbsoluteUri; } return _containerUrl + "/" + id; } diff --git a/core/Piranha.Azure.BlobStorage/BlobStorageExtensions.cs b/core/Piranha.Azure.BlobStorage/BlobStorageExtensions.cs index 79fc63c21..bd1e6fa24 100644 --- a/core/Piranha.Azure.BlobStorage/BlobStorageExtensions.cs +++ b/core/Piranha.Azure.BlobStorage/BlobStorageExtensions.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using Microsoft.Extensions.DependencyInjection; @@ -30,4 +30,20 @@ public static IServiceCollection AddPiranhaBlobStorage(this IServiceCollection s return services; } + + /// + /// Adds the services for the Azure BlobStorage service. + /// + /// The current service collection + /// The connection string + /// The optional container name + /// The optional service scope. Default is singleton + /// The service collection + public static IServiceCollection AddPiranhaBlobStorage(this IServiceCollection services, + string connectionString, string containerName = "uploads", ServiceLifetime scope = ServiceLifetime.Singleton) + { + services.Add(new ServiceDescriptor(typeof(IStorage), sp => new BlobStorage(connectionString, containerName), scope)); + + return services; + } } diff --git a/core/Piranha.Azure.BlobStorage/Piranha.Azure.BlobStorage.csproj b/core/Piranha.Azure.BlobStorage/Piranha.Azure.BlobStorage.csproj index f49284b19..3d99e5a0d 100644 --- a/core/Piranha.Azure.BlobStorage/Piranha.Azure.BlobStorage.csproj +++ b/core/Piranha.Azure.BlobStorage/Piranha.Azure.BlobStorage.csproj @@ -1,7 +1,7 @@  netstandard2.0 - 5.3.0 + 5.3.1 Piranha CMS Piranha.Azure.BlogStorage Piranha.Azure @@ -10,6 +10,7 @@ - + + diff --git a/core/Piranha.ImageSharp/Piranha.ImageSharp.csproj b/core/Piranha.ImageSharp/Piranha.ImageSharp.csproj index b7134cfb7..a0ea8c31b 100644 --- a/core/Piranha.ImageSharp/Piranha.ImageSharp.csproj +++ b/core/Piranha.ImageSharp/Piranha.ImageSharp.csproj @@ -7,7 +7,7 @@ Piranha.ImageSharp - + diff --git a/core/Piranha.Manager/Areas/Manager/Controllers/PostController.cs b/core/Piranha.Manager/Areas/Manager/Controllers/PostController.cs index 485431cbe..d74e2f406 100644 --- a/core/Piranha.Manager/Areas/Manager/Controllers/PostController.cs +++ b/core/Piranha.Manager/Areas/Manager/Controllers/PostController.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System; @@ -240,7 +240,6 @@ public IActionResult AddRegion([FromBody]Models.PageRegionModel model) return new NotFoundResult(); } - [HttpPost] [Route("manager/post/alias")] [Authorize(Policy = Permission.PostsEdit)] diff --git a/core/Piranha.Manager/Areas/Manager/Models/PageListModel.cs b/core/Piranha.Manager/Areas/Manager/Models/PageListModel.cs index 02c7152f7..fd209fc47 100644 --- a/core/Piranha.Manager/Areas/Manager/Models/PageListModel.cs +++ b/core/Piranha.Manager/Areas/Manager/Models/PageListModel.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System; @@ -16,7 +16,7 @@ namespace Piranha.Areas.Manager.Models { public class PageListModel { - public class SiteInfo + public class SiteInfo { public string Id { get; set; } public string Title { get; set; } @@ -44,14 +44,13 @@ public class SiteInfo /// public string SiteId { get; set; } - /// /// Gets/sets the current site title. /// public string SiteTitle { get; set; } /// - /// Gets/sets if the user should be able + /// Gets/sets if the user should be able /// to edit the site content. /// public bool HasSiteContent { get; set; } @@ -75,7 +74,7 @@ public class SiteInfo /// The optional site id /// The optional page id /// The model - public static PageListModel Get(IApi api, Guid? siteId, string pageId = null) + public static PageListModel Get(IApi api, Guid? siteId, string pageId = null) { var model = new PageListModel(); @@ -83,10 +82,10 @@ public static PageListModel Get(IApi api, Guid? siteId, string pageId = null) api.Sites.GetById(siteId.Value) : api.Sites.GetDefault(); var defaultSite = api.Sites.GetDefault(); - if (site == null) - { - site = defaultSite; - } + if (site == null) + { + site = defaultSite; + } model.SiteId = site.Id == defaultSite.Id ? "" : site.Id.ToString(); model.SiteTitle = site.Title; @@ -95,14 +94,14 @@ public static PageListModel Get(IApi api, Guid? siteId, string pageId = null) model.PageId = pageId; model.PageTypes = api.PageTypes.GetAll().ToList(); model.Sitemap = api.Sites.GetSitemap(site.Id, onlyPublished: false); - model.Sites = api.Sites.GetAll().Select(s => new SiteInfo + model.Sites = api.Sites.GetAll().Select(s => new SiteInfo { Id = s.Id.ToString(), Title = s.Title, IsDefault = s.IsDefault }).ToList(); - using (var config = new Config(api)) + using (var config = new Config(api)) { model.ExpandedLevels = config.ManagerExpandedSitemapLevels; } diff --git a/core/Piranha.Manager/assets/css/style.css b/core/Piranha.Manager/assets/css/style.css index d4f008e6c..f08a566d3 100644 --- a/core/Piranha.Manager/assets/css/style.css +++ b/core/Piranha.Manager/assets/css/style.css @@ -12040,9 +12040,9 @@ span.CodeMirror-selectedtext { * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ .dd { position: relative; @@ -12091,7 +12091,6 @@ span.CodeMirror-selectedtext { padding: 4px 0; } .dd-item > button { - _display: block; display: none; position: relative; cursor: pointer; @@ -12340,7 +12339,7 @@ body.collapsed .navmenu-inverse span.title { } .navmenu-inverse { width: 220px; - border: none 0px; + border: none 0; } .navmenu-inverse .navmenu-brand { text-align: center; @@ -13228,7 +13227,7 @@ li.sitemap-item .actions.one { margin: 0; } .custom-editor { - padding: 0px 15px; + padding: 0 15px; } .custom-editor .custom-editor-list { background: #f8f8f8; @@ -13375,7 +13374,7 @@ li.sitemap-item .actions.one { font-weight: 300; } #page-blocks [contenteditable]:focus { - outline: 0px solid transparent; + outline: 0 solid transparent; } #page-blocks .sortable-placeholder { padding: 0; @@ -13970,7 +13969,7 @@ li.sitemap-item .actions.one { z-index: 1000000; position: fixed; left: 15px; - bottom: 0px; + bottom: 0; max-width: 500px; } .notification-alert { diff --git a/core/Piranha.Manager/assets/css/style.min.css b/core/Piranha.Manager/assets/css/style.min.css index 3e0466e02..7be745cd9 100644 --- a/core/Piranha.Manager/assets/css/style.min.css +++ b/core/Piranha.Manager/assets/css/style.min.css @@ -23,7 +23,7 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */.dd-list .dd-list{padding-left:34px;display:none}.dd-collapsed .dd-list{display:none}.dd-empty,.dd-item,.dd-placeholder{display:block;position:relative;margin:0;padding:0;min-height:43px}.dd-handle{background:#fff;display:block;color:#999;width:34px;height:43px;padding:10px;border-right:solid 2px #f2f2f2;box-sizing:border-box;cursor:pointer}.dd-handle span{padding:4px 0}.dd-item>button{display:none;position:relative;cursor:pointer;width:25px;height:20px;margin:4px 0;padding:0;text-indent:100%;border:0;background:0 0;font-weight:700}.dd-item>button:before{content:'+';display:block;position:absolute;width:100%;text-align:center;text-indent:0}.dd-item>button[data-action=collapse]:before{content:'-'}.dd-empty,.dd-placeholder{margin:4px 0;padding:0;min-height:43px;background:#f2fbff;border:1px dashed #b6bcbf;box-sizing:border-box}.dd-empty span,.dd-placeholder span{display:block;font-family:"Open Sans",Arial;font-size:16px;padding:10px 20px 10px 0;opacity:.2;text-indent:65px}.panel .table>tbody>tr.draft td:first-child a,.panel .table>tbody>tr.scheduled td:first-child a,.spinner,.table>tbody>tr.draft td:first-child a,.table>tbody>tr.scheduled td:first-child a{opacity:.5}.dd-empty{border:1px dashed #bbb;min-height:100px;background-color:#e5e5e5}.dd-dragel{position:absolute;pointer-events:none;z-index:9999}.dd-dragel>.dd-item .dd-handle{margin-top:0}body{background-color:#f2f2f2;font-family:Arial;margin-left:220px;min-width:768px;max-width:1200px}body.collapsed{margin-left:50px;min-width:718px;max-width:1370px}.content-preview img,.editor-preview-side img,.img-preview{max-width:100%}h1{text-transform:uppercase;font-family:"Open Sans",Arial;font-weight:300;font-size:32px;margin-bottom:20px}a{color:#007eaa}.container-fluid{margin-left:0}.section-title{border-bottom:solid 1px #ddd;padding-bottom:10px}.subtitle{color:#444;font-family:"Open Sans";font-weight:700;margin:-8px 0 20px 2px;text-transform:uppercase}.subtitle strong{color:#000}.label{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.img-thumbnail{border-radius:0 none}.img-preview{max-height:600px}.content-preview,.editor-preview-side{font-family:"Open Sans",Arial;font-size:15px}.content-preview h1,.content-preview h2,.content-preview h3,.content-preview h4,.content-preview h5,.content-preview h6,.editor-preview-side h1,.editor-preview-side h2,.editor-preview-side h3,.editor-preview-side h4,.editor-preview-side h5,.editor-preview-side h6{font-family:'Gentium Book Basic',serif;margin:5px 0 10px}.content-preview ol,.content-preview p,.content-preview ul,.editor-preview-side ol,.editor-preview-side p,.editor-preview-side ul{margin:0 0 20px}.post-meta{color:#999;border-left:solid 1px #999;margin-left:10px;padding-left:10px}.spinner{background:url(../img/ajax-loader.gif) 50% 50% no-repeat #fff;position:absolute;width:100%;height:100%;top:0;left:0}.breadcrumb{background:0 0;padding:0 15px}.well{border:0;box-shadow:none}.well.well-sm{padding:7px 9px 8px}.form-group .well{margin-bottom:0;min-height:35px}.alert{border-radius:0;border-width:0;transition:opacity ease-in-out .2s}.alert.alert-info{background-color:#007eaa;color:#fff}.alert.alert-info .btn-default{background:#f2f2f2;border-color:#f2f2f2}.alert.alert-success{background-color:#439700;color:#fff}.alert.alert-danger{background-color:#a94441;color:#fff}.alert.alert-warning{background-color:#f1ad4d;color:#222}.alert.alert-warning hr{border-color:#222}.alert p{line-height:29px;margin:0}.text-limit-cell{position:relative;background-color:transparent!important;height:44px}.text-limit-cell .text-limit{display:inline-block;position:absolute;max-width:90%;text-overflow:ellipsis;top:8px}.dropdown-menu>li>button{clear:both;font-weight:400;color:#333;display:block;width:100%;padding:3px 20px;text-align:left;background:#fff}.dropdown-menu>li>button:hover{background-color:#f5f5f5}body.collapsed .navmenu-inverse{width:50px}body.collapsed .navmenu-inverse .navmenu-brand{padding:10px 0}body.collapsed .navmenu-inverse .navmenu-brand .logo-small{display:block}body.collapsed .navmenu-inverse .navmenu-brand .logo-main,body.collapsed .navmenu-inverse span.title{display:none}.navmenu-inverse{width:220px;border:0}.navmenu-inverse .navmenu-brand{text-align:center;border-bottom:1px solid #444;margin:0;outline:0}.navmenu-inverse .navmenu-brand .logo-main{background:url(../img/logo-menu.png) no-repeat;background-size:contain;width:190px;height:36px;padding:9px 0;margin-left:-11px}.navmenu-inverse .navmenu-brand .logo-small{display:none;background:url(../img/logo.png) no-repeat;background-size:contain;width:50px;height:36px;margin-left:4px}.navmenu-inverse .navmenu-nav>li a:hover,.navmenu-inverse .navmenu-nav>li ul li.active a{background:#2a2a2a}.navmenu-inverse .navmenu-nav>li{font-size:15px;border-bottom:1px solid #444}.navmenu-inverse .navmenu-nav>li i{color:#f0ad4e;padding-right:8px;width:28px}.navmenu-inverse .navmenu-nav>li a{color:#ddd;font-family:"Open Sans";font-weight:300;font-size:16px}.navmenu-inverse .navmenu-nav>li ul{padding:0}.navmenu-inverse .navmenu-nav>li ul li{font-size:13px;list-style-type:none}.navmenu-inverse .navmenu-nav>li ul li a{color:#007eaa;display:block;padding:8px 0 8px 15px;font:400 15px Arial}.navmenu-inverse .navmenu-nav>li ul li a i{color:#999;font-size:16px}.navmenu-inverse .navmenu-nav>li ul li:first-child a{padding-top:10px}.navmenu-inverse .navmenu-nav>li ul li:last-child a{padding-bottom:14px}.navmenu-inverse .navmenu-nav>li ul li.active::after{content:"";display:block;width:0;height:0;border:10px solid transparent;border-right-color:#f2f2f2;position:absolute;margin-top:-28px;right:0}.navmenu-inverse .navmenu-nav>li.active a{border-bottom:1px solid #000}.nav-pills>li>a{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.nav-pills>li>a:focus,.nav-pills>li>a:hover{background:#ddd}.nav-pills>li.active a{background:#007eaa}@media only screen and (max-width:992px){body{margin-left:50px;min-width:718px;max-width:1370px}.navmenu-inverse{width:50px}.navmenu-inverse .navmenu-brand{padding:10px 0}.navmenu-inverse .navmenu-brand .logo-small{display:block}.navmenu-inverse .navmenu-brand .logo-main,.navmenu-inverse span.title{display:none}}#page-blocks .block .block-actions .btn,#page-blocks .block-extras button{min-width:34px}.panel .table td.actions.one,.panel .table th.actions.one,.table td.actions.one,.table th.actions.one{width:32px}.panel .table td.actions.two,.panel .table th.actions.two,.table td.actions.two,.table th.actions.two{width:64px}.panel .table td.actions.three,.panel .table th.actions.three,.table td.actions.three,.table th.actions.three{width:96px}.panel .table thead tr th,.table thead tr th{background:#e2e2e2;padding:12px 20px;font-family:"Open Sans",Arial;text-transform:uppercase}.panel .table thead tr th .sort,.table thead tr th .sort{cursor:pointer}.panel .table thead tr th .sort::after,.table thead tr th .sort::after{display:inline-block;padding-left:4px;font-family:"Glyphicons Halflings";font-style:normal;font-weight:400;font-size:12px;line-height:1;position:relative;top:1px;-moz-osx-font-smoothing:grayscale}.panel .table thead tr th .sort.asc::after,.table thead tr th .sort.asc::after{content:""}.panel .table thead tr th .sort.desc::after,.table thead tr th .sort.desc::after{content:""}.panel .table>tbody>tr,.table>tbody>tr{background:#fff}.panel .table>tbody>tr:hover,.table>tbody>tr:hover{background:#fafafa}.panel .table>tbody>tr:nth-child(2n+1),.table>tbody>tr:nth-child(2n+1){background:#fff}.panel .table>tbody>tr.dropping,.panel .table>tbody>tr.dropping>td:not(.text-limit-cell),.table>tbody>tr.dropping,.table>tbody>tr.dropping>td:not(.text-limit-cell){background:#f2fbff!important}.panel .table>tbody>tr>td,.table>tbody>tr>td{padding:10px 20px;border-top:4px solid #f2f2f2}.panel .table>tbody>tr>td.actions a,.table>tbody>tr>td.actions a{display:inline-block;width:16px;height:16px;font-size:14px}.panel .table>tbody>tr.detail,.table>tbody>tr.detail,li.sitemap-item .dd-toggle .fa-minus-circle,li.sitemap-item.expanded>.dd-toggle .fa-plus-circle{display:none}.panel .table>tbody>tr>td.actions a.delete,.table>tbody>tr>td.actions a.delete{background:url(../img/ico-delete-16.png) no-repeat}.panel .table>tbody>tr>td.actions a.down,.table>tbody>tr>td.actions a.down{background:url(../img/ico-arrow-down-16.png) no-repeat}.panel .table>tbody>tr>td.actions a.up,.table>tbody>tr>td.actions a.up{background:url(../img/ico-arrow-up-16.png) no-repeat}.panel .table>tbody>tr>td p.meta,.table>tbody>tr>td p.meta{color:#999;margin:4px 0 0}.panel .table>tbody>tr>td span.move,.table>tbody>tr>td span.move{color:#999;cursor:pointer}.panel .table>tbody>tr.detail>td,.table>tbody>tr.detail>td{border:0}.panel .table>tbody>tr.unpublished .meta,.table>tbody>tr.unpublished .meta{color:#f0ad4e}.panel .table>tbody>tr.saved>td,.table>tbody>tr.saved>td{background:#a3d790!important;transition:background ease-in-out .2s;-moz-transition:background ease-in-out .2s;-webkit-transition:background ease-in-out .2s;-o-transition:background ease-in-out .2s}.panel .table>tbody>tr.post-saved>td,.table>tbody>tr.post-saved>td{background:#fff;transition:background ease-in-out .4s;-moz-transition:background ease-in-out .4s;-webkit-transition:background ease-in-out .4s;-o-transition:background ease-in-out .4s}.panel .table>tbody>tr.level-1 td:first-child,.table>tbody>tr.level-1 td:first-child{padding-left:35px}.panel .table>tbody>tr.level-2 td:first-child,.table>tbody>tr.level-2 td:first-child{padding-left:50px}.panel .table>tbody>tr.level-3 td:first-child,.table>tbody>tr.level-3 td:first-child{padding-left:65px}.panel .table>tbody>tr.level-4 td:first-child,.table>tbody>tr.level-4 td:first-child{padding-left:80px}.panel .table>tbody>tr.level-5 td:first-child,.table>tbody>tr.level-5 td:first-child{padding-left:95px}.panel .table .date,.table .date{width:114px}.panel .table .medium,.table .medium{width:150px}.panel .table .well,.table .well{margin-top:10px;margin-bottom:0}.panel .table.table-main tr td,.table.table-main tr td{vertical-align:middle}.panel .table.table-main tr:hover td,.table.table-main tr:hover td{background:#fafafa}.panel .table.table-main a,.table.table-main a{font-family:"Open Sans",Arial;font-size:16px}.panel .table.table-main .dropdown-menu a,.table.table-main .dropdown-menu a{font-family:Arial;font-size:14px}.panel .table.table-main span.media-icon,.table.table-main span.media-icon{padding-right:10px;color:#999}.panel .table.table-main.table-media .dd-handle,.table.table-main.table-media .dd-handle{padding:8px 10px;position:absolute;top:0;left:0;height:40px}.panel .table.table-main.table-media .text-limit-cell,.table.table-main.table-media .text-limit-cell{padding-left:50px}.panel .table .gravatar,.table .gravatar{width:40px;margin-right:10px;border-radius:20px;-moz-border-radius:20px;-webkit-border-radius:20px;-o-border-radius:20px}ol.sitemap{padding-left:0}ol.sitemap .actions{text-align:right}ol.sitemap .actions.one{width:54px}ol.sitemap .actions.two{width:88px}ol.sitemap .actions.three{width:105px}ol.sitemap.header{background:#e2e2e2;font-family:"Open Sans",Arial;font-weight:700;text-transform:uppercase;margin:0}ol.sitemap.header div{padding:12px 20px}ol.sitemap.header .date{width:120px;padding:12px 20px}ol.sitemap.header .info{width:140px;padding:12px 20px}li.sitemap-item a{padding:10px 8px}li.sitemap-item a.last,li.sitemap-item a:last-child{padding-right:20px}li.sitemap-item a.first,li.sitemap-item a:first-child{padding-left:20px}li.sitemap-item ol{padding-left:0}li.sitemap-item .dd-toggle{background:#fff;color:#007eaa;box-sizing:border-box;float:left;height:43px;width:32px;padding:14px 10px}li.sitemap-item .dd-toggle span{cursor:pointer}li.sitemap-item.expanded>.dd-toggle .fa-minus-circle{display:inline}li.sitemap-item.expanded>.dd-list{display:block}li.sitemap-item .content{background:#fff;height:43px;padding:10px 20px 10px 0;margin:2px 0 0 66px;box-sizing:border-box}li.sitemap-item .content .title,li.sitemap-item .content a{font-family:"Open Sans",Arial;font-size:16px;padding:0!important}li.sitemap-item .content .label:first-of-type{margin-left:10px}li.sitemap-item.hover-remove{opacity:.8}li.sitemap-item li .content a{padding-left:35px}li.sitemap-item li li .content a{padding-left:50px}li.sitemap-item li li li .content a{padding-left:65px}li.sitemap-item li li li li .content a{padding-left:80px}li.sitemap-item li li li li li .content a{padding-left:95px}li.sitemap-item.unpublished .date,li.sitemap-item.unpublished>.content a{opacity:.6}li.sitemap-item .date{width:120px;padding:12px 20px}li.sitemap-item .info{width:140px;padding:12px 20px;text-overflow:ellipsis}li.sitemap-item .actions a{display:inline-block;font-size:14px;margin-top:2px}li.sitemap-item .actions a.add-after,li.sitemap-item .actions a.add-below{font-size:16px;line-height:14px;padding-top:12px}li.sitemap-item .actions.one{width:60px}.panel .table{margin-bottom:0}.panel .table thead tr th{background:0 0;border-bottom:solid 4px #f5f5f5}.table-striped>tbody>tr:nth-child(2n+1)>td{background-color:#fff}.table-striped>tbody>tr:nth-child(2n+1).active>td{background-color:#d9edf7}.table-striped>tbody>tr:nth-child(2n)>td{background-color:#fff}.table-striped>tbody>tr:nth-child(2n).active>td{background-color:#d9edf7}.form label.label-small{font-size:12px}.form .form-group .form-control{height:auto;font-size:18px;border-color:#ddd;border-radius:0;box-shadow:none}.form .form-group .form-control.input-validation-error{border:1px solid #e88;padding:5px 12px}.form .form-group .form-control.title{font-size:26px;color:#222}.form .form-group .form-control.small{font-size:14px}.form .form-group .form-control.count-me{border-bottom:0 none}.form .form-group .form-control.count-me+p{color:#999;font-size:12px;padding:4px 12px;margin:0;text-align:right;text-transform:uppercase;border:1px solid #ddd;border-top:0 none}.form .form-group textarea{resize:none}.form .form-group textarea.raw-text{font-family:Consolas,Courier,monospace;font-size:15px}.form .form-group .field-validation-error{display:block;background:#333;color:#fff;padding:4px 10px;font-size:13px;position:absolute;top:-12px;right:-8px;opacity:.9;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px}.form .form-group .form-control-feedback{top:0}.form .form-group .select2-container{width:100%;padding:1px 2px}.form .form-group .select2-container.select2-container-multi .select2-choices{background-image:none;border:0;padding:2px 5px 0}.form .form-group .select2-container.select2-container-multi .select2-choices .select2-search-choice{color:#fff;background:#444;border-color:#444;box-shadow:none;margin:4px 2px 0 12px;font-size:10px;text-transform:uppercase}.form .form-group .mce-tinymce .mce-panel .mce-btn .mce-ico,.form .table .form-group input,.form .table .form-group select,.form .table .form-group textarea,.form blockquote{font-size:14px}.form .form-group .select2-container.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close{top:2px}.form .form-group .select2-container.select2-container-multi .select2-choices .select2-search-choice:before{content:"";position:absolute;top:0;left:-20px;width:0;height:0;border:10px solid transparent;border-right-color:#444}.form .form-group .mce-tinymce{border-color:#ddd;background:#fff}.form .form-group .mce-tinymce .mce-panel{background:#fff;padding:1px 2px}.form .form-group .mce-tinymce .mce-panel .mce-btn{background:0 0;border:0;box-shadow:none}.form .form-group .mce-tinymce .mce-toolbar-grp{padding:20px;opacity:.8}.form .form-group .mce-tinymce .mce-toolbar-grp:hover{opacity:1}.form .form-group .mce-tinymce .mce-edit-area{border-top:0 none;padding:0 15px}.form .panel-white .form-group,.form .table .form-group{border:0}.form .panel-white .form-group input,.form .panel-white .form-group select,.form .table .form-group input,.form .table .form-group select{background:#eee;border-bottom:1px solid #ddd}.form .panel-white .form-group input:-moz-placeholder,.form .panel-white .form-group input:-ms-input-placeholder,.form .panel-white .form-group input::-moz-placeholder,.form .panel-white .form-group input::-webkit-input-placeholder,.form .panel-white .form-group select:-moz-placeholder,.form .panel-white .form-group select:-ms-input-placeholder,.form .panel-white .form-group select::-moz-placeholder,.form .panel-white .form-group select::-webkit-input-placeholder,.form .table .form-group input:-moz-placeholder,.form .table .form-group input:-ms-input-placeholder,.form .table .form-group input::-moz-placeholder,.form .table .form-group input::-webkit-input-placeholder,.form .table .form-group select:-moz-placeholder,.form .table .form-group select:-ms-input-placeholder,.form .table .form-group select::-moz-placeholder,.form .table .form-group select::-webkit-input-placeholder{color:#ccc}.form .table .form-group{margin-bottom:0}.form blockquote{margin-top:10px;padding:5px 0 5px 15px;color:#999}.mce-floatpanel{border-width:0!important}.btn{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.btn.btn-secondary{background:#f2f2f2;color:#333}.btn.btn-primary{background:#007eaa;border-color:#007eaa;color:#fff}.btn.btn-success{background:#439700;border-color:#439700;color:#fff}.btn.btn-info{background:#5bc0de;border-color:#5bc0de}#btn-sitepicker .btn-default{border-color:#fff}#btn-sitepicker .btn-default .btn-label{background:0 0}.btn-label{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.col-sm-12.buttons{text-align:right;margin-top:-50px;float:right;width:auto}.col-sm-12.buttons.buttons-fixed{background:#f2f2f2;background:rgba(242,242,242,.85);position:fixed;left:1152px;padding:15px;margin-top:-65px;white-space:nowrap;z-index:1800}.markdown .CodeMirror.CodeMirror-fullscreen,.markdown .editor-toolbar.fullscreen{z-index:2000}.col-sm-12.buttons.buttons-fixed #main-submit .btn-text{display:inline-block;width:64px}.col-sm-12.buttons .dropdown-menu{text-align:left}.col-sm-12.buttons .btn-icon{width:36px;padding-left:0;padding-right:0}.btn-labeled.btn-block{text-indent:-12px;line-height:32px}.btn-labeled.btn-block .btn-label{float:left;line-height:20px;text-indent:0}.region-list{margin:-15px -15px 15px}.region-list .sortable-placeholder{padding:0;min-height:43px;background:#f2fbff;border:1px dashed #b6bcbf;box-sizing:border-box}.region-list .region-list-item .region-list-heading{border-bottom:solid 1px #ddd;position:relative}.region-list .region-list-item .region-list-heading .region-tool{position:absolute;width:43px;min-height:43px;height:100%;text-align:center}.region-list .region-list-item .region-list-heading .region-tool.handle{left:0;border-right:solid 1px #ddd;padding:10px;cursor:pointer}.region-list .region-list-item .region-list-heading .region-tool.handle.no-expand{padding:20px 10px}.region-list .region-list-item .region-list-heading .region-tool.region-actions{right:0;padding:0;border-left:solid 1px #ddd}.region-list .region-list-item .region-list-heading .region-tool.region-actions.no-expand{padding:10px 0}.region-list .region-list-item .region-list-heading .region-tool.region-actions button{height:43px;padding:10px;background:0 0;border:0}.region-list .region-list-item .region-list-heading .region-content{min-height:43px;margin:0 43px;padding:4px 15px 0}.region-list .region-list-item .region-list-heading .region-content .row:first-child{margin-top:11px}.region-list .region-list-item .region-list-heading a.region-title{display:block;height:39px;padding:8px 10px}.region-list .region-list-item .region-list-body{background:#eee;padding:0 15px;border-bottom:solid 1px #ddd}.region-list .region-list-item .region-list-body .form-group:first-child{padding-top:15px}.region-list-toolbar{margin-bottom:0}.markdown{border:1px solid #ddd}.markdown .nav-tabs{margin:-1px -1px 15px;background:#fff}.markdown .content-preview{padding:5px 15px 15px}.markdown .editor-toolbar{border:0}.markdown .editor-preview-side{border-top:0 none;border-right:0 none;border-bottom:0 none;background:#fff;padding:10px 25px}.markdown .CodeMirror{border:0;border-radius:0;font-family:Consolas,Courier,monospace;font-size:14px}.region-list .markdown .nav-tabs{margin-bottom:0;border:0}.region-list .markdown .raw-text{height:230px}.region-list .markdown .content-markdown{background:#fff;border:1px solid #ddd}.region-list .markdown .content-preview{background:#fff;padding:15px 15px 0;border:1px solid #ddd;height:230px;overflow-y:scroll}.single-region .region-editor{margin:-15px -15px -30px}.single-region .region-editor .mce-tinymce{border:0!important}.single-region textarea.raw-text{border-width:0}.single-region .markdown{border:0}.single-region .markdown .content-preview{padding:0}.single-region .markdown .nav-tabs{display:none;margin:0 0 15px}.inline-search{border:0;background:#f4f4f4;margin-top:10px;border-radius:0;box-shadow:unset}.inline-search.inline-search-light{background:#fff}.list-group-header{background:#f8f8f8}.list-group-header label{margin:0}.custom-editor{padding:0 15px}.custom-editor .custom-editor-list{background:#f8f8f8;padding:0;border-right:solid 1px #ddd}.custom-editor .custom-editor-list .nav-tabs{font-size:12px;font-weight:700;text-transform:uppercase;border-bottom:0 none}.custom-editor .custom-editor-list .nav-tabs>li>a{border:0;border-radius:0;padding:15px}.custom-editor .custom-editor-list .nav-tabs>li.active>a{background:#ddd;border:0}.custom-editor .custom-editor-list .list-group .list-group-item{background:#f8f8f8;font-family:"Open Sans",Arial;font-size:16px;border:0;border-bottom:solid 1px #fff;margin-bottom:0}.custom-editor .custom-editor-list .list-group .list-group-item.active{color:#555;background:#ddd}.custom-editor .custom-editor-list .list-group .list-group-item:first-child{border-radius:0}.custom-editor .custom-editor-list .list-group .list-group-item:last-child{border-radius:0;border-bottom:0 none}.custom-editor .custom-editor-list .list-group .list-group-item small{color:#999;font-family:Arial;font-size:12px;display:block;padding:5px 0}.custom-editor .custom-editor-body{padding:15px 25px}.dropzone{margin-bottom:20px;border:2px dashed #ddd;font-family:"Open Sans",Arial;font-size:18px;color:#ddd;border-radius:8px}.dropzone .dz-message span{margin-right:5px}.form-dimmer{position:fixed;top:0;left:0;width:100%;height:100%;background:#000;opacity:.5;display:none;z-index:1900}.form-dimmer.active{display:block}@media (min-width:990px){.single-region .tab-content>.tab-pane{display:inline-block!important}.single-region .tab-content>.tab-pane.content-markdown{width:50%;border-right:solid 1px #ddd}.single-region .tab-content>.tab-pane.content-preview{float:right;width:49%;padding-left:15px;margin-top:60px}}@media (max-width:989px){.single-region .markdown .nav-tabs{display:block}}.region-description{margin:-15px 0 15px;padding:15px 15px 5px;border-bottom:1px solid #ddd;background:#eef4f8}.region-description.region-list-description{margin:-15px -15px 15px}.region-description i{font-size:20px;float:left;opacity:.25}.region-description p{margin-left:52px;opacity:.5}#page-blocks{background:url(/manager/assets/img/cream_pixels.png);padding:0}#page-blocks .block-info{color:#ccc;padding:45px 50px 30px;font-size:20px;text-align:center}#page-blocks .block-info.block-group-info{cursor:pointer}#page-blocks .page-blocks-body{background:#fff;padding:15px 30px;max-width:920px;margin:0 auto;border-left:solid 1px #e2e2e2;border-right:solid 1px #e2e2e2}#page-blocks img{max-width:100%}#page-blocks blockquote{color:#666;width:90%;margin:0 auto;padding:10px 20px;font-size:18px;font-weight:300}#page-blocks [contenteditable]:focus{outline:transparent solid 0}#page-blocks .sortable-placeholder{padding:0;min-height:100px;background:#f2fbff;border:1px dashed #b6bcbf;box-sizing:border-box}#page-blocks .block{border:1px solid #fff;padding:8px;margin:20px 0;min-height:48px;position:relative}#page-blocks .block .empty{background:url(../img/empty-twocol.png) 50% 50% no-repeat #f2f2f2;border:10px solid #f2f2f2;min-height:66px!important}#page-blocks .block .empty p:first-of-type{min-height:86px}#page-blocks .block.block-group{border:1px solid #ddd;padding:0}#page-blocks .block.block-group .block-group-heading{background:#eef4f8;padding:15px}#page-blocks .block.block-group .block-group-heading.default h3.group-title{margin-bottom:0}#page-blocks .block.block-group .block-group-heading i.group-icon{float:left;font-size:22px;margin-right:8px}#page-blocks .block.block-group .block-group-heading h3.group-title{font-size:12px;font-family:Arial,sans-serif;font-weight:700;line-height:22px;margin:0 0 15px;text-transform:uppercase}#page-blocks .block.block-group .block-group-heading .well{background:#fff;border:1px solid #ddd;border-radius:0}#page-blocks .block.block-group .block-group-heading .form-group:first-of-type{margin-top:15px}#page-blocks .block.block-group .block-group-heading .form-group:last-of-type{margin-bottom:0}#page-blocks .block.block-group .block-group-heading .block-extras{margin:-52px 103px 0 0}#page-blocks .block.block-group .block-group-heading .block-extras button,#page-blocks .block.block-group .block-group-heading .block-extras button:hover{background:#fff}#page-blocks .block.block-group .block-info{border-top:solid 1px #ddd;padding:25px 50px 10px}#page-blocks .block.block-group .block-group-body{background:#fdfdfd;padding:15px;border-top:solid 1px #ddd;display:none}#page-blocks .block.block-group>.block-actions{background:#eef4f8;float:right;padding-bottom:0;margin:0;border:0}#page-blocks .block.block-group>.block-actions .btn.btn-secondary{background:#fff}#page-blocks .block.block-group>.block-actions .btn.btn-secondary:hover{background:#fdfdfd}#page-blocks .block.block-group .block-add span{width:26px;height:26px;font-size:8px;line-height:16px;border-radius:13px;margin-left:-13px;top:0}#page-blocks .block .block-actions{background:#fff;padding:4px 8px 5px;margin:-40px -9px 0;text-align:right;border-style:solid;border-color:#ddd;border-width:1px 1px 0;display:none}#page-blocks .block .block-actions .btn.btn-secondary:hover{background:#ddd}#page-blocks .block .block-actions i.block-icon{color:#ddd;font-size:22px;padding-left:2px}#page-blocks .block .block-actions span.block-name{color:#ccc;font-weight:700;text-transform:uppercase;font-size:12px;line-height:22px;padding-left:8px}#page-blocks .block div[contenteditable=true]{min-height:30px}#page-blocks .block:hover{border-color:#ddd}#page-blocks .block:hover>.block-actions{display:block}#page-blocks .block-add-dialog{display:none;position:absolute;background:#222;color:#fff;width:400px;border-radius:4px;left:50%;margin-left:-200px;z-index:2000;transition:all ease-in-out .2s}#page-blocks .block-add-dialog label{color:#999;display:block;font-weight:300;text-transform:uppercase;font-size:11px;padding:8px 15px;border-bottom:solid 1px #444}#page-blocks .block-add-dialog a{display:inline-block;color:#fff;text-align:center;width:24%;padding:5px 0 10px;opacity:.8;font-size:13px;border-radius:4px;transition:all ease-in-out .2s}#page-blocks .block-add-dialog a i{display:block;margin-bottom:5px;font-size:18px;height:20px}#page-blocks .block-add-above .block-add-dialog::after,#page-blocks .block-add-below .block-add-dialog::before{content:"";width:0;height:0;position:absolute;margin-left:-10px;left:50%;display:block}#page-blocks .block-add-dialog a:hover{background:#333;opacity:1;transition:all ease-in-out .2s}#page-blocks .block-add-below .block-add-dialog{top:42px}#page-blocks .block-add-below .block-add-dialog::before{border:10px solid transparent;border-bottom-color:#222;margin-top:-20px}#page-blocks .block-add-above .block-add-dialog{bottom:40px}#page-blocks .block-add-above .block-add-dialog::after{border:10px solid transparent;border-top-color:#222;margin-top:0}#page-blocks .block-add{position:relative;height:2px;padding:12px 8px;opacity:.05;transition:opacity ease-in-out .2s}#page-blocks .block-add hr{margin:0;border-top:solid 2px #222}#page-blocks .block-add span{background:#222;color:#fff;width:34px;height:34px;border:5px solid #007eaa;border-radius:17px;position:absolute;left:50%;top:-4px;text-align:center;line-height:24px;font-size:11px;margin-left:-17px}#page-blocks .block-add.active,#page-blocks .block-add:hover{cursor:pointer;opacity:1;z-index:2000;transition:opacity ease-in-out .2s}#page-blocks .block-add.active .block-add-dialog{display:block;transition:all ease-in-out .2s}#page-blocks .block-editor.mce-edit-focus{outline:0}#page-blocks .block-editor p:last-child{margin-bottom:0}#page-blocks .block-image{background:#f2f2f2;position:relative;max-height:400px;min-height:200px;overflow:hidden;text-align:center}#page-blocks .block-image .block-image-picker{position:absolute;width:90%;top:50%;right:5%;background:rgba(0,0,0,.4);padding:30px 20px 10px;border-radius:5px;margin-top:-40px;opacity:0;transition:opacity ease-in-out .2s}#page-blocks .block-image:hover .block-image-picker{opacity:1;transition:opacity ease-in-out .2s}#page-blocks .block-extras{display:none;float:right;padding:4px 4px 0;margin:-39px 72px 0 0}#page-blocks .block-extras button.btn-secondary:hover{background:#ddd}#page-blocks .block:hover>.block-extras,#page-blocks .block:hover>.block-group-heading>.block-extras{display:block}#page-blocks .block:hover .block-html-swap{display:inline-block}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--single{border-radius:0;border-color:#ddd;min-height:34px}.select2-container--default .select2-selection--single{padding:2px 4px}.select2-container--default .select2-selection--single .select2-selection__arrow{height:32px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#ddd;border-color:#ddd;border-radius:2px}.select2-container--default.select2-container--focus .select2-selection--multiple,.select2-container--default.select2-container--focus .select2-selection--single{border-color:#ddd;outline:0}.panel{border:1px solid #ddd;position:relative;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.panel>.panel-heading{background:#f8f8f8;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.panel>.panel-heading .btn{margin:-2px 0 0 4px}.panel .panel-body.media-images{padding-bottom:0}.panel .panel-body.media-images img{margin-bottom:30px}.panel .panel-footer{background:#f8f8f8;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0}.panel .panel-title{font-family:"Open Sans",Arial;text-transform:uppercase;padding:4px 0}.panel .form-group{border-width:1px}.panel.panel-white{border:none;padding:20px}.panel.panel-white h3{color:#999;font-family:"Open Sans";font-weight:300;margin-top:0}.panel.panel-white .row:last-child .form-group:last-child{margin-bottom:0}.panel.panel-add>.panel-heading{padding:0}.panel.panel-add>.panel-heading .panel-title>a{display:block;padding:10px 15px}.panel.panel-add>.panel-heading .panel-title>a:focus{outline:0;text-decoration:none}.panel.panel-add>.panel-heading .panel-title>.glyphicon{padding:10px 15px}.panel.panel-primary>.panel-heading{background:#007eaa;border-color:#007eaa}.panel .gravatar{background:#fff;padding:3px;border:1px solid #ddd;position:absolute;top:44px;right:20px;z-index:100;border-radius:43px;-moz-border-radius:43px;-webkit-border-radius:43px;-o-border-radius:43px}.notification{background:#a3d790;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1050;display:none;opacity:0}.notification span{color:#fff;font-size:180px;position:absolute;width:180px;height:180px;left:50%;top:100%;margin:-90px 0 0 -90px}.pre-saved .notification{display:block;opacity:0;transition:opacity ease-in-out .2s;-moz-transition:opacity ease-in-out .2s;-webkit-transition:opacity ease-in-out .2s;-o-transition:opacity ease-in-out .2s}.pre-saved .notification span{top:100%;transition:all ease-in-out .4s;-moz-transition:all ease-in-out .4s;-webkit-transition:all ease-in-out .4s;-o-transition:all ease-in-out .4s}.saved .notification{display:block;opacity:.8;transition:opacity ease-in-out .2s;-moz-transition:opacity ease-in-out .2s;-webkit-transition:opacity ease-in-out .2s;-o-transition:opacity ease-in-out .2s}.saved .notification span{top:50%;transition:all ease-in-out .4s;-moz-transition:all ease-in-out .4s;-webkit-transition:all ease-in-out .4s;-o-transition:all ease-in-out .4s}.post-saved .notification{display:block;opacity:0;transition:opacity ease-in-out .4s;-moz-transition:opacity ease-in-out .4s;-webkit-transition:opacity ease-in-out .4s;-o-transition:opacity ease-in-out .4s}.post-saved .notification span{top:0;transition:all ease-in-out .4s;-moz-transition:all ease-in-out .4s;-webkit-transition:all ease-in-out .4s;-o-transition:all ease-in-out .4s}.modal-backdrop{z-index:2010}.modal{z-index:70000}.modal .modal-body{background:#f2f2f2}.modal .modal-body .table{margin-bottom:0}.modal .modal-body .media-info{margin:10px 0 0}.modal .modal-footer .fileinput{text-align:left}#login .container,.modal.media-preview,.preview-header,.preview-header a{text-align:center}.modal .well.well-upload{background:#fff;color:#999;border:1px dashed #ddd}.modal .well.well-upload .fileinput{margin-bottom:0}#modalMedia{z-index:65540}.overlay{position:absolute;width:75%;height:100%;top:0;right:0}.overlay .overlay-body{padding:20px}#login{margin:0;max-width:none}#login .container{max-width:360px;min-width:300px;margin:80px auto 0;padding:10px}#login .container input{padding:10px 12px;border:0;text-align:center}#login .container .btn{width:100%;padding:10px 20px}#login .container .panel.panel-white{box-shadow:1px 2px 1px rgba(0,0,0,.1);padding:0}#login .container .panel.panel-white .panel-body{padding:35px}#login .container .panel.panel-white .panel-body:first-child{background:url(../img/seigaiha-overlay.png) #116d9a;padding-bottom:10px}#login .container .panel.panel-white .account-banner{color:#fff;margin-bottom:20px;font:300 32px "Open Sans",Arial;text-transform:uppercase}#login .container .panel.panel-white .account-banner small{color:#abc;display:block;font-size:12px;font-weight:400;text-transform:none}#login .container .panel.panel-white .account-logo{background:url(../img/logo.png) 50% 0 no-repeat;height:155px;margin-bottom:20px}@keyframes notify-show-animation{0%{visibility:visible;opacity:1;max-height:0;transform:scale(0)}100%{visibility:visible;opacity:1;max-height:1000px;transform:scale(1)}}@keyframes notify-dismiss-animation{0%{opacity:1;transform:scale(1)}100%{margin:0;padding:0;opacity:0;max-height:0;transform:scale(0)}}.notifications-container{z-index:1000000;position:fixed;left:15px;bottom:0;max-width:500px}.notification-alert{width:500px;padding-left:25px;padding-right:25px;animation:notify-show-animation .3s ease}.notification-alert p>i{margin-right:6px}.notification-alert.notification-dismiss{overflow:hidden;animation:notify-dismiss-animation .3s ease;animation-fill-mode:forwards}body.live-preview{background:#999;max-width:initial;margin:0}.preview{display:flex;flex-flow:column;height:100%}.preview-header{background:#222;flex:0 1 auto;height:64px;padding:5px}.preview-header a{background:#333;color:#fff;display:inline-block;width:70px;padding:8px 2px;margin-right:5px;transition:background-color .2s ease-out}.preview-header a:hover{background:#444;transition:background-color .2s ease-out}.preview-header a i{font-size:18px}.preview-header a span{display:block;font-size:10px;text-transform:uppercase;padding-top:6px;opacity:.5}.preview-body{flex:1 1 auto}.preview-body iframe{width:100%;max-width:100%;height:calc(100% - 64px);border:0;margin:0 auto;display:block;box-shadow:0 0 10px rgba(0,0,0,.2);transition:width .2s ease-in-out} \ No newline at end of file diff --git a/core/Piranha.Manager/assets/less/blocks.less b/core/Piranha.Manager/assets/less/blocks.less index b1ca33792..ae7b76c73 100644 --- a/core/Piranha.Manager/assets/less/blocks.less +++ b/core/Piranha.Manager/assets/less/blocks.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @import "mixins.less"; @@ -29,15 +29,15 @@ background: #fff; padding: 15px 30px; max-width: 920px; - margin: 0 auto; + margin: 0 auto; border-left: solid 1px @list-color-head; border-right: solid 1px @list-color-head; - } + } img { max-width: 100%; } - + blockquote { color: #666; width: 90%; @@ -48,15 +48,15 @@ } [contenteditable]:focus { - outline: 0px solid transparent; - } - + outline: 0 solid transparent; + } + .sortable-placeholder { - padding: 0; - min-height: 100px; - background: #f2fbff; - border: 1px dashed #b6bcbf; - box-sizing: border-box; + padding: 0; + min-height: 100px; + background: #f2fbff; + border: 1px dashed #b6bcbf; + box-sizing: border-box; } .block { @@ -180,7 +180,7 @@ border-color: @border-color; border-width: 1px 1px 0 1px; display: none; - + .btn { min-width: 34px; @@ -200,17 +200,17 @@ text-transform: uppercase; font-size: 12px; line-height: 22px; - padding-left: 8px; + padding-left: 8px; } } - + div[contenteditable="true"] { min-height: 30px; } &:hover { border-color: @border-color; - + >.block-actions { display: block; } @@ -236,7 +236,7 @@ text-transform: uppercase; font-size: 11px; padding: 8px 15px; - border-bottom: solid 1px #444; + border-bottom: solid 1px #444; } a { @@ -249,7 +249,7 @@ font-size: 13px; border-radius: 4px; transition: all ease-in-out .2s; - + i { display: block; margin-bottom: 5px; @@ -272,7 +272,7 @@ &::before { .arrow-up(#222, 10px, -20px); - } + } } } @@ -282,7 +282,7 @@ &::after { .arrow-down(#222, 10px, 0); - } + } } } @@ -308,12 +308,12 @@ position: absolute; left: 50%; top: -4px; - text-align: center; - line-height: 24px; + text-align: center; + line-height: 24px; font-size: 11px; margin-left: -17px; } - + &:hover, &.active { cursor: pointer; opacity: 1; @@ -391,6 +391,6 @@ .block:hover { .block-html-swap { display: inline-block; - } + } } } diff --git a/core/Piranha.Manager/assets/less/colors.less b/core/Piranha.Manager/assets/less/colors.less index 9fb7024f9..2729b9893 100644 --- a/core/Piranha.Manager/assets/less/colors.less +++ b/core/Piranha.Manager/assets/less/colors.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @bg-color: #f2f2f2; @item-color: #eee; diff --git a/core/Piranha.Manager/assets/less/editor.less b/core/Piranha.Manager/assets/less/editor.less index 4fa4cb65d..c83135824 100644 --- a/core/Piranha.Manager/assets/less/editor.less +++ b/core/Piranha.Manager/assets/less/editor.less @@ -3,16 +3,16 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// body { color: #333; font-family: "Open Sans", Arial; font-size: 15px; line-height: 1.42857; - margin: 5px 14px; + margin: 5px 14px; } h1, h2, h3, h4, h5, h6 { @@ -44,7 +44,7 @@ hr { margin-top: 20px; margin-bottom: 20px; border: 0 none; - border-top: 1px solid #eee; + border-top: 1px solid #eee; } img { diff --git a/core/Piranha.Manager/assets/less/fonts.less b/core/Piranha.Manager/assets/less/fonts.less index 6dca2193e..fb3021a2e 100644 --- a/core/Piranha.Manager/assets/less/fonts.less +++ b/core/Piranha.Manager/assets/less/fonts.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @font-face { font-family: 'Open Sans'; diff --git a/core/Piranha.Manager/assets/less/forms.less b/core/Piranha.Manager/assets/less/forms.less index 779cb7a0c..594fa7408 100644 --- a/core/Piranha.Manager/assets/less/forms.less +++ b/core/Piranha.Manager/assets/less/forms.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @import "mixins.less"; @@ -118,7 +118,7 @@ opacity: 0.9; .border-radius(3px); } - + .form-control-feedback { top: 0; } @@ -187,7 +187,7 @@ .mce-toolbar-grp { padding: 20px; opacity: .8; - + &:hover { opacity: 1; } @@ -211,7 +211,7 @@ &::-webkit-input-placeholder, &:-moz-placeholder, &::-moz-placeholder, - &:-ms-input-placeholder { + &:-ms-input-placeholder { color: #ccc; } } @@ -294,7 +294,7 @@ padding: 15px; margin-top: -65px; white-space: nowrap; - z-index: 1800; + z-index: 1800; #main-submit { .btn-text { @@ -302,7 +302,7 @@ width: 64px; } } - } + } .dropdown-menu { text-align: left; @@ -330,11 +330,11 @@ margin: -15px -15px 15px; .sortable-placeholder { - padding: 0; - min-height: 43px; - background: #f2fbff; - border: 1px dashed #b6bcbf; - box-sizing: border-box; + padding: 0; + min-height: 43px; + background: #f2fbff; + border: 1px dashed #b6bcbf; + box-sizing: border-box; } .region-list-item { @@ -348,7 +348,7 @@ min-height: 43px; height: 100%; text-align: center; - + &.handle { left: 0; @@ -359,7 +359,7 @@ &.no-expand { padding: 20px 10px; } - } + } &.region-actions { right: 0; @@ -369,7 +369,7 @@ &.no-expand { padding: 10px 0; } - + button { height: 43px; padding: 10px; @@ -422,14 +422,14 @@ } .content-preview { - padding: 5px 15px 15px; + padding: 5px 15px 15px; } .editor-toolbar { border: 0 none; &.fullscreen { - z-index: 2000; + z-index: 2000; } } @@ -438,7 +438,7 @@ border-right: 0 none; border-bottom: 0 none; background: #fff; - padding: 10px 25px; + padding: 10px 25px; } .CodeMirror { @@ -446,7 +446,7 @@ border-radius: 0; font-family: Consolas,Courier,monospace; font-size: 14px; - + &.CodeMirror-fullscreen { z-index: 2000; } @@ -466,15 +466,15 @@ .content-markdown { background: #fff; - border: solid 1px @border-color;; + border: solid 1px @border-color; } .content-preview { background: #fff; padding: 15px 15px 0; - border: solid 1px @border-color;; + border: solid 1px @border-color; height: 230px; - overflow-y: scroll; + overflow-y: scroll; } } } @@ -491,7 +491,7 @@ textarea { &.raw-text { - border-width: 0; + border-width: 0; } } @@ -527,10 +527,10 @@ label { margin: 0; } -} +} .custom-editor { - padding: 0px 15px; + padding: 0 15px; .custom-editor-list { background: @list-color; @@ -604,7 +604,7 @@ font-size: 18px; color: @border-color; border-radius: 8px; - + .dz-message { span { margin-right: 5px; @@ -622,7 +622,7 @@ opacity: 0.5; display: none; z-index: 1900; - + &.active { display: block; } @@ -632,12 +632,12 @@ .single-region { .tab-content > .tab-pane { display: inline-block !important; - + &.content-markdown { width: 50%; border-right: solid 1px @border-color; } - + &.content-preview { float: right; width: 49%; @@ -659,7 +659,7 @@ .region-description { margin: -15px 0 15px; - padding: 15px 15px 5px;; + padding: 15px 15px 5px; border-bottom: 1px solid @border-color; background: #eef4f8; @@ -670,11 +670,11 @@ i { font-size: 20px; float: left; - opacity: .25; + opacity: .25; } p { margin-left: 52px; - opacity: .5; + opacity: .5; } } \ No newline at end of file diff --git a/core/Piranha.Manager/assets/less/general.less b/core/Piranha.Manager/assets/less/general.less index 17d79cacf..2c20e3fab 100644 --- a/core/Piranha.Manager/assets/less/general.less +++ b/core/Piranha.Manager/assets/less/general.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @import "mixins.less"; @@ -20,7 +20,7 @@ body { &.collapsed { margin-left: 50px; min-width: 718px; - max-width: 1370px; + max-width: 1370px; } } @@ -81,7 +81,7 @@ a { p, ul, ol { margin: 0 0 20px; - } + } img { max-width: 100%; diff --git a/core/Piranha.Manager/assets/less/login.less b/core/Piranha.Manager/assets/less/login.less index 8bd8cb576..bcb937258 100644 --- a/core/Piranha.Manager/assets/less/login.less +++ b/core/Piranha.Manager/assets/less/login.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @import "mixins.less"; @@ -50,7 +50,7 @@ margin-bottom: 20px; font: 300 32px "Open Sans", Arial; text-transform: uppercase; - + small { color: #abc; display: block; @@ -59,12 +59,12 @@ text-transform: none; } } - + .account-logo { background: url('../img/logo.png') 50% 0 no-repeat; height: 155px; margin-bottom: 20px; - } + } } } } diff --git a/core/Piranha.Manager/assets/less/mixins.less b/core/Piranha.Manager/assets/less/mixins.less index 855112282..a5d760a12 100644 --- a/core/Piranha.Manager/assets/less/mixins.less +++ b/core/Piranha.Manager/assets/less/mixins.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// .border-radius(@size) { border-radius: @size; diff --git a/core/Piranha.Manager/assets/less/modals.less b/core/Piranha.Manager/assets/less/modals.less index 2a2ae2f64..ad645ed0f 100644 --- a/core/Piranha.Manager/assets/less/modals.less +++ b/core/Piranha.Manager/assets/less/modals.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; diff --git a/core/Piranha.Manager/assets/less/navigation.less b/core/Piranha.Manager/assets/less/navigation.less index c9154d314..57952439e 100644 --- a/core/Piranha.Manager/assets/less/navigation.less +++ b/core/Piranha.Manager/assets/less/navigation.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "mixins.less"; @import "colors.less"; @@ -35,7 +35,7 @@ body.collapsed { .navmenu-inverse { width: 220px; - border: none 0px; + border: none 0; .navmenu-brand { text-align: center; @@ -151,14 +151,14 @@ body.collapsed { background: @link-color; } } - } + } } @media only screen and (max-width: 992px) { body { margin-left: 50px; min-width: 718px; - max-width: 1370px; + max-width: 1370px; } .navmenu-inverse { diff --git a/core/Piranha.Manager/assets/less/nestable.less b/core/Piranha.Manager/assets/less/nestable.less index b16f60691..7990cbc81 100644 --- a/core/Piranha.Manager/assets/less/nestable.less +++ b/core/Piranha.Manager/assets/less/nestable.less @@ -3,56 +3,56 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; -.dd { - position: relative; - display: block; - margin: 0; - padding: 0; - list-style: none; +.dd { + position: relative; + display: block; + margin: 0; + padding: 0; + list-style: none; } -.dd-list { - display: block; - position: relative; - margin: 0; - padding: 0; - list-style: none; +.dd-list { + display: block; + position: relative; + margin: 0; + padding: 0; + list-style: none; - .dd-list { - padding-left: 34px; + .dd-list { + padding-left: 34px; display: none; } } .dd-collapsed { - .dd-list { - display: none; + .dd-list { + display: none; } -} +} .dd-item, .dd-empty, -.dd-placeholder { - display: block; - position: relative; - margin: 0; - padding: 0; - min-height: 43px; +.dd-placeholder { + display: block; + position: relative; + margin: 0; + padding: 0; + min-height: 43px; } -.dd-handle { +.dd-handle { background: #fff; - display: block; + display: block; float: left; color: #999; width: 34px; - height: 43px; - padding: 10px; + height: 43px; + padding: 10px; border-right: solid 2px @bg-color; box-sizing: border-box; cursor: pointer; @@ -64,47 +64,46 @@ } .dd-item { - >button { - _display: block; + >button { display: none; - position: relative; - cursor: pointer; - float: left; - width: 25px; - height: 20px; - margin: 4px 0; - padding: 0; - text-indent: 100%; - white-space: nowrap; - overflow: hidden; - border: 0; - background: transparent; - text-align: center; - font-weight: bold; + position: relative; + cursor: pointer; + float: left; + width: 25px; + height: 20px; + margin: 4px 0; + padding: 0; + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + border: 0; + background: transparent; + text-align: center; + font-weight: bold; - &:before { - content: '+'; - display: block; - position: absolute; - width: 100%; - text-align: center; + &:before { + content: '+'; + display: block; + position: absolute; + width: 100%; + text-align: center; text-indent: 0; } } - >button[data-action="collapse"]:before { - content: '-'; + >button[data-action="collapse"]:before { + content: '-'; } } .dd-placeholder, -.dd-empty { - margin: 4px 0; - padding: 0; - min-height: 43px; - background: #f2fbff; - border: 1px dashed #b6bcbf; - box-sizing: border-box; +.dd-empty { + margin: 4px 0; + padding: 0; + min-height: 43px; + background: #f2fbff; + border: 1px dashed #b6bcbf; + box-sizing: border-box; span { display: block; @@ -115,18 +114,18 @@ text-indent: 65px; } } -.dd-empty { - border: 1px dashed #bbb; - min-height: 100px; +.dd-empty { + border: 1px dashed #bbb; + min-height: 100px; background-color: #e5e5e5; } -.dd-dragel { - position: absolute; - pointer-events: none; - z-index: 9999; +.dd-dragel { + position: absolute; + pointer-events: none; + z-index: 9999; - >.dd-item .dd-handle { - margin-top: 0; + >.dd-item .dd-handle { + margin-top: 0; } } diff --git a/core/Piranha.Manager/assets/less/notifications.less b/core/Piranha.Manager/assets/less/notifications.less index ea0a5a24c..2464ff297 100644 --- a/core/Piranha.Manager/assets/less/notifications.less +++ b/core/Piranha.Manager/assets/less/notifications.less @@ -3,7 +3,7 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core // @@ -42,7 +42,7 @@ z-index: 1000000; position: fixed; left: 15px; - bottom: 0px; + bottom: 0; max-width: 500px; } diff --git a/core/Piranha.Manager/assets/less/overlays.less b/core/Piranha.Manager/assets/less/overlays.less index 9a3c85fef..8707e82b0 100644 --- a/core/Piranha.Manager/assets/less/overlays.less +++ b/core/Piranha.Manager/assets/less/overlays.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// .overlay { position: absolute; diff --git a/core/Piranha.Manager/assets/less/panels.less b/core/Piranha.Manager/assets/less/panels.less index b9ec510ba..3f37fff99 100644 --- a/core/Piranha.Manager/assets/less/panels.less +++ b/core/Piranha.Manager/assets/less/panels.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @import "mixins.less"; diff --git a/core/Piranha.Manager/assets/less/preview.less b/core/Piranha.Manager/assets/less/preview.less index 76d2a5887..be03667ea 100644 --- a/core/Piranha.Manager/assets/less/preview.less +++ b/core/Piranha.Manager/assets/less/preview.less @@ -66,5 +66,5 @@ body.live-preview { display: block; box-shadow: 0 0 10px rgba(0,0,0,0.2); transition: width 0.2s ease-in-out; - } + } } diff --git a/core/Piranha.Manager/assets/less/select2.less b/core/Piranha.Manager/assets/less/select2.less index e04ac3969..220024eaa 100644 --- a/core/Piranha.Manager/assets/less/select2.less +++ b/core/Piranha.Manager/assets/less/select2.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @@ -29,7 +29,7 @@ background-color: @border-color; border-color: @border-color; border-radius: 2px; - } + } } &.select2-container--focus { diff --git a/core/Piranha.Manager/assets/less/style.less b/core/Piranha.Manager/assets/less/style.less index ee90e984c..3364fc297 100644 --- a/core/Piranha.Manager/assets/less/style.less +++ b/core/Piranha.Manager/assets/less/style.less @@ -14,9 +14,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ @import "mixins.less"; diff --git a/core/Piranha.Manager/assets/less/tables.less b/core/Piranha.Manager/assets/less/tables.less index 7762f0f39..c30a9b580 100644 --- a/core/Piranha.Manager/assets/less/tables.less +++ b/core/Piranha.Manager/assets/less/tables.less @@ -3,9 +3,9 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core -// +// @import "colors.less"; @import "mixins.less"; @@ -68,17 +68,17 @@ } &:nth-child(2n+1) { - background: #fff; + background: #fff; } &.dropping { background: #f2fbff !important; - + >td:not(.text-limit-cell) { background: #f2fbff !important; } } - + >td { padding: 10px 20px; border-top: 4px solid @bg-color; @@ -186,7 +186,7 @@ tr { td { vertical-align: middle; - } + } &:hover { td { @@ -269,12 +269,12 @@ ol.sitemap { .date { width: 120px; - padding: 12px 20px; + padding: 12px 20px; } .info { width: 140px; - padding: 12px 20px; + padding: 12px 20px; } } } @@ -313,7 +313,7 @@ li.sitemap-item { .fa-minus-circle { display: none; - } + } } &.expanded { @@ -335,7 +335,7 @@ li.sitemap-item { background: #fff; height: 43px; padding: 10px 20px 10px 0; - margin: 2px 0 0 66px; + margin: 2px 0 0 66px; box-sizing: border-box; a, .title { @@ -346,12 +346,12 @@ li.sitemap-item { .label:first-of-type { margin-left: 10px; - } + } } &.hover-remove { opacity: 0.8; - } + } li { .content a { padding-left: 35px; } @@ -398,7 +398,7 @@ li.sitemap-item { display: inline-block; font-size: 14px; margin-top: 2px; - + &.add-after, &.add-below { font-size: 16px; line-height: 14px; diff --git a/core/Piranha/Data/PageContentType.cs b/core/Piranha/Data/PageContentType.cs index ef9fe7a04..d365cd020 100644 --- a/core/Piranha/Data/PageContentType.cs +++ b/core/Piranha/Data/PageContentType.cs @@ -3,14 +3,13 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ namespace Piranha.Data { - public enum PageContentType { Page, diff --git a/core/Piranha/Models/ArchivePage.cs b/core/Piranha/Models/ArchivePage.cs index 38e951474..942e71819 100644 --- a/core/Piranha/Models/ArchivePage.cs +++ b/core/Piranha/Models/ArchivePage.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System; @@ -34,12 +34,11 @@ public ArchivePage() } } - [Obsolete] public interface IBlogPage : IArchivePage { } - + /// - /// Interface for registering the basic archive page + /// Interface for registering the basic archive page /// content type. /// public interface IArchivePage { } diff --git a/core/Piranha/Repositories/PageRepository.cs b/core/Piranha/Repositories/PageRepository.cs index 54de92a87..467b7038b 100644 --- a/core/Piranha/Repositories/PageRepository.cs +++ b/core/Piranha/Repositories/PageRepository.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System; @@ -230,7 +230,6 @@ public T GetStartpage(Guid? siteId = null) where T : Models.PageBase if (page.OriginalPageId.HasValue) { return MapOriginalPage(page); - } return _contentService.Transform(page, _api.PageTypes.GetById(page.PageTypeId), Process); } @@ -886,7 +885,6 @@ private T MapOriginalPage(Page page) where T : Models.PageBase if (originalPage == null) { return null; - } return SetOriginalPageProperties(originalPage, page); } diff --git a/core/Piranha/Repositories/PostRepository.cs b/core/Piranha/Repositories/PostRepository.cs index 0260c7542..9ac119c59 100644 --- a/core/Piranha/Repositories/PostRepository.cs +++ b/core/Piranha/Repositories/PostRepository.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System; @@ -345,7 +345,6 @@ public void Save(T model) where T : Models.PostBase if (!string.IsNullOrWhiteSpace(t.Slug)) { tag = _api.Tags.GetBySlug(model.BlogId, t.Slug); - } if (tag == null && !string.IsNullOrWhiteSpace(t.Title)) { diff --git a/core/Piranha/Runtime/MediaManager.cs b/core/Piranha/Runtime/MediaManager.cs index b5095eeef..427f224e6 100644 --- a/core/Piranha/Runtime/MediaManager.cs +++ b/core/Piranha/Runtime/MediaManager.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System.Collections.Generic; @@ -47,7 +47,7 @@ public void Add(string extension, string contentType) { Add(new MediaTypeItem { - Extension = extension, + Extension = extension.ToLower(), ContentType = contentType }); } @@ -125,7 +125,7 @@ public MediaType GetMediaType(string filename) /// The media type public string GetContentType(string filename) { - var extension = Path.GetExtension(filename); + var extension = Path.GetExtension(filename).ToLower(); MediaTypeItem item = null; if ((item = Documents.SingleOrDefault(t => t.Extension == extension)) != null) diff --git a/core/Piranha/Services/ContentService.cs b/core/Piranha/Services/ContentService.cs index f206f016f..96cf6394a 100644 --- a/core/Piranha/Services/ContentService.cs +++ b/core/Piranha/Services/ContentService.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * https://github.com/piranhacms/piranha.core - * + * */ using System; @@ -183,7 +183,6 @@ public TValue CreateRegion(Models.ContentType contentType, string region } } - /// /// Gets the enumerator for the given region collection. /// @@ -475,12 +474,12 @@ public TContent Transform(T model, Models.ContentType type, TContent dest = n ((Extend.BlockGroup)models.First(m => m.Id == parent.BlockId)) .Items.Add(model); } - else + else { throw new InvalidOperationException("Block parent is missing"); } } - else + else { models.Add(model); } @@ -488,7 +487,7 @@ public TContent Transform(T model, Models.ContentType type, TContent dest = n } return models; } - } + } /// /// Transforms the given block data into block models. @@ -865,7 +864,6 @@ private void AddComplexValue(IServiceScope scope, T model, Models.ContentType } } list.Add(obj); - } else { @@ -950,7 +948,6 @@ private object GetComplexValue(object region, string fieldId) if (fieldProp != null) { return fieldProp.GetValue(region); - } return null; } diff --git a/core/Piranha/Utils.cs b/core/Piranha/Utils.cs index e46e1c0cf..e7017db96 100644 --- a/core/Piranha/Utils.cs +++ b/core/Piranha/Utils.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using System; @@ -109,7 +109,6 @@ public static string GenerateInteralId(string str) return ti.ToTitleCase(GenerateSlug(str).Replace('-', ' ')).Replace(" ", ""); } - /// /// Generates a ETag from the given name and date. /// @@ -129,7 +128,7 @@ public static string GenerateETag(string name, DateTime date) } /// - /// + /// /// /// /// diff --git a/examples/MvcWeb/Views/Cms/Partial/Teasers.cshtml b/examples/MvcWeb/Views/Cms/Partial/Teasers.cshtml index c730ac7e3..f9fa23313 100644 --- a/examples/MvcWeb/Views/Cms/Partial/Teasers.cshtml +++ b/examples/MvcWeb/Views/Cms/Partial/Teasers.cshtml @@ -2,19 +2,19 @@ @{ } -@if (Model.Count > 0) +@if (Model.Count > 0) {
- @foreach (var teaser in Model) + @foreach (var teaser in Model) {

@teaser.Title.Value

- @if (teaser.Image.HasValue) + @if (teaser.Image.HasValue) { - + } @Html.Raw(teaser.Body)
diff --git a/examples/MvcWeb/assets/scss/_base.scss b/examples/MvcWeb/assets/scss/_base.scss index 0a5d0f007..72db7c939 100644 --- a/examples/MvcWeb/assets/scss/_base.scss +++ b/examples/MvcWeb/assets/scss/_base.scss @@ -39,7 +39,7 @@ img { img { border-left: solid 4px #f0ad4e; padding: .5rem 0 .5rem 1rem; - margin-bottom: 1rem; + margin-bottom: 1rem; } .construction { @@ -51,7 +51,7 @@ img { text-align: center; font-weight: 300; font-size: 1.2rem; - opacity: .6; + opacity: .6; } } @@ -110,18 +110,18 @@ header[role="banner"] { border-top: solid 6px #00a3d8; padding-top: 4rem; position: relative; - + &:before { content: " "; background: #00a3d8; - position: absolute; + position: absolute; height: 6px; width: 100%; top: -6px; - left: 0; + left: 0; display: block; - z-index: 2000; - } + z-index: 2000; + } } &.hero { @@ -133,13 +133,13 @@ header[role="banner"] { color: #fff; padding: 1rem 0; font-weight: 300; - font-size: .9rem; + font-size: .9rem; text-transform: uppercase; - + a { color: #fff; } - } + } } } diff --git a/examples/MvcWeb/assets/scss/_navigation.scss b/examples/MvcWeb/assets/scss/_navigation.scss index 270ce7840..b34032ca8 100644 --- a/examples/MvcWeb/assets/scss/_navigation.scss +++ b/examples/MvcWeb/assets/scss/_navigation.scss @@ -69,7 +69,7 @@ position: absolute; background: #282828; color: #bbb; - width: 100px; + width: 100px; left: 50%; bottom: -2rem; padding: 1.5rem 2rem .5rem; @@ -88,7 +88,7 @@ padding-left: 1.2rem; ul { - padding-left: 1.7rem; + padding-left: 1.7rem; } } } diff --git a/examples/MvcWeb/assets/scss/_quotes.scss b/examples/MvcWeb/assets/scss/_quotes.scss index 6c7fd00f5..143dfa4c5 100644 --- a/examples/MvcWeb/assets/scss/_quotes.scss +++ b/examples/MvcWeb/assets/scss/_quotes.scss @@ -7,7 +7,7 @@ padding: 2rem 3rem; border-radius: .5rem; margin-bottom: 3rem; - + img { width: 100%; max-width: 150px; @@ -31,11 +31,11 @@ height: 0; border: 20px solid transparent; border-top-color: transparent; - border-top-color: $color_teasers_bg;; + border-top-color: $color_teasers_bg; position: absolute; margin-top: 30px; margin-right: 60px; - right: 0; + right: 0; } } } \ No newline at end of file diff --git a/examples/MvcWeb/assets/scss/_responsive.scss b/examples/MvcWeb/assets/scss/_responsive.scss index 547a52020..3b9415624 100644 --- a/examples/MvcWeb/assets/scss/_responsive.scss +++ b/examples/MvcWeb/assets/scss/_responsive.scss @@ -8,7 +8,7 @@ right: initial; } } - + .hero { h2 { font-size: 2.7rem; @@ -16,7 +16,7 @@ p { font-size: 1.35rem; - + small { font-size: 60%; } diff --git a/examples/MvcWeb/assets/scss/_teasers.scss b/examples/MvcWeb/assets/scss/_teasers.scss index c138e15dd..40f312e27 100644 --- a/examples/MvcWeb/assets/scss/_teasers.scss +++ b/examples/MvcWeb/assets/scss/_teasers.scss @@ -8,7 +8,7 @@ background: $color_teasers_bg; border-bottom: solid 4px $color_bg; padding: 1.5rem 15px; - text-align: center; + text-align: center; } h3 { diff --git a/examples/MvcWeb/assets/scss/_type.scss b/examples/MvcWeb/assets/scss/_type.scss index 785f6509e..61d45a2b6 100644 --- a/examples/MvcWeb/assets/scss/_type.scss +++ b/examples/MvcWeb/assets/scss/_type.scss @@ -16,7 +16,7 @@ h1 { } h2 { - border-bottom: solid 1px $color_border;; + border-bottom: solid 1px $color_border; padding-bottom: 1rem; margin: .5rem 0 1.5rem; } @@ -42,7 +42,7 @@ pre { blockquote { color: #999; border: 1px solid #ddd; - border-radius: .25rem; + border-radius: .25rem; padding: 1.5rem 1.5rem .5rem; margin-bottom: 1.5rem; font-size: 1.1rem; diff --git a/examples/RazorWeb/Pages/Partial/Teasers.cshtml b/examples/RazorWeb/Pages/Partial/Teasers.cshtml index 31a9c49db..471df914d 100644 --- a/examples/RazorWeb/Pages/Partial/Teasers.cshtml +++ b/examples/RazorWeb/Pages/Partial/Teasers.cshtml @@ -2,19 +2,19 @@ @{ } -@if (Model.Count > 0) +@if (Model.Count > 0) {
- @foreach (var teaser in Model) + @foreach (var teaser in Model) {

@teaser.Title.Value

- @if (teaser.Image.HasValue) + @if (teaser.Image.HasValue) { - + } @Html.Raw(teaser.Body)
diff --git a/examples/RazorWeb/assets/scss/_base.scss b/examples/RazorWeb/assets/scss/_base.scss index 0a5d0f007..72db7c939 100644 --- a/examples/RazorWeb/assets/scss/_base.scss +++ b/examples/RazorWeb/assets/scss/_base.scss @@ -39,7 +39,7 @@ img { img { border-left: solid 4px #f0ad4e; padding: .5rem 0 .5rem 1rem; - margin-bottom: 1rem; + margin-bottom: 1rem; } .construction { @@ -51,7 +51,7 @@ img { text-align: center; font-weight: 300; font-size: 1.2rem; - opacity: .6; + opacity: .6; } } @@ -110,18 +110,18 @@ header[role="banner"] { border-top: solid 6px #00a3d8; padding-top: 4rem; position: relative; - + &:before { content: " "; background: #00a3d8; - position: absolute; + position: absolute; height: 6px; width: 100%; top: -6px; - left: 0; + left: 0; display: block; - z-index: 2000; - } + z-index: 2000; + } } &.hero { @@ -133,13 +133,13 @@ header[role="banner"] { color: #fff; padding: 1rem 0; font-weight: 300; - font-size: .9rem; + font-size: .9rem; text-transform: uppercase; - + a { color: #fff; } - } + } } } diff --git a/examples/RazorWeb/assets/scss/_navigation.scss b/examples/RazorWeb/assets/scss/_navigation.scss index 270ce7840..b34032ca8 100644 --- a/examples/RazorWeb/assets/scss/_navigation.scss +++ b/examples/RazorWeb/assets/scss/_navigation.scss @@ -69,7 +69,7 @@ position: absolute; background: #282828; color: #bbb; - width: 100px; + width: 100px; left: 50%; bottom: -2rem; padding: 1.5rem 2rem .5rem; @@ -88,7 +88,7 @@ padding-left: 1.2rem; ul { - padding-left: 1.7rem; + padding-left: 1.7rem; } } } diff --git a/examples/RazorWeb/assets/scss/_quotes.scss b/examples/RazorWeb/assets/scss/_quotes.scss index 6c7fd00f5..143dfa4c5 100644 --- a/examples/RazorWeb/assets/scss/_quotes.scss +++ b/examples/RazorWeb/assets/scss/_quotes.scss @@ -7,7 +7,7 @@ padding: 2rem 3rem; border-radius: .5rem; margin-bottom: 3rem; - + img { width: 100%; max-width: 150px; @@ -31,11 +31,11 @@ height: 0; border: 20px solid transparent; border-top-color: transparent; - border-top-color: $color_teasers_bg;; + border-top-color: $color_teasers_bg; position: absolute; margin-top: 30px; margin-right: 60px; - right: 0; + right: 0; } } } \ No newline at end of file diff --git a/examples/RazorWeb/assets/scss/_responsive.scss b/examples/RazorWeb/assets/scss/_responsive.scss index 547a52020..3b9415624 100644 --- a/examples/RazorWeb/assets/scss/_responsive.scss +++ b/examples/RazorWeb/assets/scss/_responsive.scss @@ -8,7 +8,7 @@ right: initial; } } - + .hero { h2 { font-size: 2.7rem; @@ -16,7 +16,7 @@ p { font-size: 1.35rem; - + small { font-size: 60%; } diff --git a/examples/RazorWeb/assets/scss/_teasers.scss b/examples/RazorWeb/assets/scss/_teasers.scss index c138e15dd..40f312e27 100644 --- a/examples/RazorWeb/assets/scss/_teasers.scss +++ b/examples/RazorWeb/assets/scss/_teasers.scss @@ -8,7 +8,7 @@ background: $color_teasers_bg; border-bottom: solid 4px $color_bg; padding: 1.5rem 15px; - text-align: center; + text-align: center; } h3 { diff --git a/examples/RazorWeb/assets/scss/_type.scss b/examples/RazorWeb/assets/scss/_type.scss index 785f6509e..61d45a2b6 100644 --- a/examples/RazorWeb/assets/scss/_type.scss +++ b/examples/RazorWeb/assets/scss/_type.scss @@ -16,7 +16,7 @@ h1 { } h2 { - border-bottom: solid 1px $color_border;; + border-bottom: solid 1px $color_border; padding-bottom: 1rem; margin: .5rem 0 1.5rem; } @@ -42,7 +42,7 @@ pre { blockquote { color: #999; border: 1px solid #ddd; - border-radius: .25rem; + border-radius: .25rem; padding: 1.5rem 1.5rem .5rem; margin-bottom: 1.5rem; font-size: 1.1rem; diff --git a/nuspec/Piranha.Azure.BlobStorage.nuspec b/nuspec/Piranha.Azure.BlobStorage.nuspec index 7b71ce27d..c3890bedc 100644 --- a/nuspec/Piranha.Azure.BlobStorage.nuspec +++ b/nuspec/Piranha.Azure.BlobStorage.nuspec @@ -3,13 +3,14 @@ Piranha.Azure.BlobStorage Piranha Azure BlobStorage - 5.3.0 + 5.3.1 Håkan Edling Håkan Edling false Library for storing media assets on Azure Blob Storage. - Copyright 2018 (c) Håkan Edling + Copyright 2018-2019 (c) Håkan Edling cms mvc aspnetcore netstandard + MIT http://opensource.org/licenses/MIT http://github.com/piranhacms/piranha.core http://piranhacms.org/assets/twitter-shield.png @@ -18,8 +19,9 @@ https://github.com/piranhacms/piranha.core/wiki/changelog - - + + + diff --git a/test/Piranha.Tests/Repositories/Medias.cs b/test/Piranha.Tests/Repositories/Medias.cs index 65c3d7ae6..dd5691b3c 100644 --- a/test/Piranha.Tests/Repositories/Medias.cs +++ b/test/Piranha.Tests/Repositories/Medias.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.Services; @@ -67,7 +67,7 @@ protected override void Init() { api.Media.Save(image2); image2Id = image2.Id.Value; - } + } using (var stream = File.OpenRead("../../../Assets/HLD_Screenshot_01_robot_1080.png")) { var image3 = new Models.StreamMediaContent() { @@ -77,7 +77,7 @@ protected override void Init() { api.Media.Save(image3); image3Id = image3.Id.Value; - } + } } } @@ -97,7 +97,7 @@ protected override void Cleanup() { foreach (var item in media) { api.Media.Delete(item); } - api.Media.DeleteFolder(folder); + api.Media.DeleteFolder(folder); } } } @@ -108,7 +108,6 @@ public void IsCached() { Assert.Equal(this.GetType() == typeof(MediasCached), api.IsCached); } } - [Fact] public void GetAll() { @@ -154,7 +153,7 @@ public void Move() { Assert.Equal(folder1Id, media.FolderId.Value); api.Media.Move(media, null); - } + } } [Fact] @@ -171,7 +170,7 @@ public void Insert() { image4Id = image.Id.Value; } - } + } } [Fact] @@ -186,7 +185,7 @@ public void PublicUrl() { Assert.NotNull(media); Assert.Equal($"~/uploads/{image1Id}-HLD_Screenshot_01_mech_1080.png", media.PublicUrl); } - } + } [Fact] public void PublicUrlCDN() { diff --git a/test/Piranha.Tests/Repositories/PageTypes.cs b/test/Piranha.Tests/Repositories/PageTypes.cs index da283ba60..17a2bdbb5 100644 --- a/test/Piranha.Tests/Repositories/PageTypes.cs +++ b/test/Piranha.Tests/Repositories/PageTypes.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.Models; @@ -127,7 +127,7 @@ public void IsCached() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { Assert.Equal(this.GetType() == typeof(PageTypesCached), api.IsCached); } - } + } [Fact] public void Add() { @@ -155,7 +155,6 @@ public void GetNoneById() { } } - [Fact] public void GetById() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { diff --git a/test/Piranha.Tests/Repositories/Pages.cs b/test/Piranha.Tests/Repositories/Pages.cs index b8e2b3bac..066bb4dc7 100644 --- a/test/Piranha.Tests/Repositories/Pages.cs +++ b/test/Piranha.Tests/Repositories/Pages.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Microsoft.Extensions.DependencyInjection; @@ -52,14 +52,14 @@ public class MyService : IMyService { public MyService() { Value = "My service value"; } - } + } [Piranha.Extend.FieldType(Name = "Fourth")] public class MyFourthField : Extend.Fields.SimpleField { public void Init(IMyService myService) { Value = myService.Value; } - } + } public class ComplexRegion { @@ -116,7 +116,6 @@ public class MyDIPage : Models.Page [Region] public MyFourthField Body { get; set; } } - protected override void Init() { services = new ServiceCollection() @@ -135,7 +134,7 @@ protected override void Init() { .AddType(typeof(MyCollectionPage)) .AddType(typeof(MyDIPage)); builder.Build(); - + var site = new Data.Site { Id = SITE_ID, Title = "Default Site", @@ -355,7 +354,7 @@ public void GetAllBlogs() { Assert.NotNull(pages); Assert.NotEmpty(pages); - } + } } [Fact] @@ -365,7 +364,7 @@ public void GetAllBlogsByBaseClass() { Assert.NotNull(pages); Assert.NotEmpty(pages); - } + } } [Fact] @@ -376,7 +375,7 @@ public void GetAllByMissing() { Assert.NotNull(pages); Assert.Empty(pages); } - } + } [Fact] public void GetGenericById() { @@ -410,7 +409,7 @@ public void GetBlocksById() { Assert.Equal(2, model.Blocks.Count); Assert.IsType(model.Blocks[0]); Assert.IsType(model.Blocks[1]); - } + } } [Fact] @@ -430,7 +429,7 @@ public void GetInfoById() { Assert.NotNull(model); Assert.Equal("my-first-page", model.Slug); Assert.Empty(model.Blocks); - } + } } [Fact] @@ -474,7 +473,7 @@ public void GetInfoBySlug() { Assert.Equal("my-first-page", model.Slug); Assert.Empty(model.Blocks); } - } + } [Fact] public void GetDynamicById() { @@ -647,7 +646,7 @@ public void AddHierarchical() { page.Body = "My subpage body"; api.Pages.Save(page); - + page = api.Pages.GetById(page.Id); Assert.NotNull(page); @@ -655,7 +654,7 @@ public void AddHierarchical() { var param = api.Params.GetByKey(Piranha.Config.PAGES_HIERARCHICAL_SLUGS); api.Params.Delete(param); - } + } } [Fact] @@ -674,7 +673,7 @@ public void AddNonHierarchical() { page.Body = "My subpage body"; api.Pages.Save(page); - + page = api.Pages.GetById(page.Id); Assert.NotNull(page); @@ -682,7 +681,7 @@ public void AddNonHierarchical() { var param = api.Params.GetByKey(Piranha.Config.PAGES_HIERARCHICAL_SLUGS); api.Params.Delete(param); - } + } } [Fact] @@ -719,7 +718,7 @@ public void UpdateCollectionPage() { api.Pages.Save(page); page = api.Pages.GetBySlug("my-collection-page", SITE_ID); - + Assert.NotNull(page); Assert.Equal(2, page.Texts.Count); Assert.Equal("Updated text", page.Texts[0].Value); @@ -776,7 +775,7 @@ public void GetDIGeneric() { Assert.NotNull(page); Assert.Equal("My service value", page.Body.Value); - } + } } [Fact] @@ -786,7 +785,7 @@ public void GetDIDynamic() { Assert.NotNull(page); Assert.Equal("My service value", page.Regions.Body.Value); - } + } } [Fact] @@ -796,7 +795,7 @@ public void CreateDIGeneric() { Assert.NotNull(page); Assert.Equal("My service value", page.Body.Value); - } + } } [Fact] @@ -806,7 +805,7 @@ public void CreateDIDynamic() { Assert.NotNull(page); Assert.Equal("My service value", page.Regions.Body.Value); - } + } } [Fact] @@ -843,7 +842,6 @@ public void GetCopyGenericBySlug() { Assert.Equal(PAGE_7_ID, model.OriginalPageId); Assert.Equal("My base body", model.Body.Value); } - } [Fact] diff --git a/test/Piranha.Tests/Repositories/Params.cs b/test/Piranha.Tests/Repositories/Params.cs index 56a0e3960..c09d6c01c 100644 --- a/test/Piranha.Tests/Repositories/Params.cs +++ b/test/Piranha.Tests/Repositories/Params.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.Services; @@ -71,7 +71,7 @@ public void IsCached() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { Assert.Equal(this.GetType() == typeof(ParamsCached), api.IsCached); } - } + } [Fact] public void Add() { @@ -112,7 +112,6 @@ public void GetNoneByKey() { } } - [Fact] public void GetAll() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { diff --git a/test/Piranha.Tests/Repositories/PostTypes.cs b/test/Piranha.Tests/Repositories/PostTypes.cs index 9ee6fd508..4354e4b9e 100644 --- a/test/Piranha.Tests/Repositories/PostTypes.cs +++ b/test/Piranha.Tests/Repositories/PostTypes.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.Models; @@ -127,7 +127,7 @@ public void IsCached() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { Assert.Equal(this.GetType() == typeof(PostTypesCached), api.IsCached); } - } + } [Fact] public void Add() { @@ -155,7 +155,6 @@ public void GetNoneById() { } } - [Fact] public void GetById() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { diff --git a/test/Piranha.Tests/Repositories/Posts.cs b/test/Piranha.Tests/Repositories/Posts.cs index 62e812c97..0d170567a 100644 --- a/test/Piranha.Tests/Repositories/Posts.cs +++ b/test/Piranha.Tests/Repositories/Posts.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Microsoft.Extensions.DependencyInjection; @@ -51,17 +51,17 @@ public class MyService : IMyService { public MyService() { Value = "My service value"; } - } + } [Piranha.Extend.FieldType(Name = "Fourth")] public class MyFourthField : Extend.Fields.SimpleField { public void Init(IMyService myService) { Value = myService.Value; } - } + } [PageType(Title = "Blog page")] - public class BlogPage : Models.Page { } + public class BlogPage : Models.Page { } [PostType(Title = "My PostType")] public class MyPost : Models.Post @@ -97,7 +97,7 @@ public class MyDIPost : Models.Post { [Region] public MyFourthField Body { get; set; } - } + } protected override void Init() { services = new ServiceCollection() @@ -107,7 +107,7 @@ protected override void Init() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { Piranha.App.Init(); - Piranha.App.Fields.Register(); + Piranha.App.Fields.Register(); var pageTypeBuilder = new PageTypeBuilder(api) .AddType(typeof(BlogPage)); @@ -195,7 +195,7 @@ protected override void Init() { post6.BlogId = BLOG_ID; post6.Category = category; post6.Title = "My Injection Post"; - api.Posts.Save(post6); + api.Posts.Save(post6); } } @@ -226,14 +226,14 @@ protected override void Cleanup() { api.Sites.Delete(SITE_ID); } } - + [Fact] public void IsCached() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { Assert.Equal(this.GetType() == typeof(PostsCached), api.IsCached); } } - + [Fact] public void GetNoneById() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { @@ -424,7 +424,6 @@ public void GetBaseClassById() { } } - [Fact] public void GetBlocksById() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { @@ -434,8 +433,8 @@ public void GetBlocksById() { Assert.Equal(2, model.Blocks.Count); Assert.IsType(model.Blocks[0]); Assert.IsType(model.Blocks[1]); - } - } + } + } [Fact] public void GetMissingById() { @@ -455,8 +454,8 @@ public void GetInfoById() { Assert.Equal("my-first-post", model.Slug); Assert.Equal("/blog/my-first-post", model.Permalink); Assert.Empty(model.Blocks); - } - } + } + } [Fact] public void GetGenericBySlug() { @@ -502,7 +501,7 @@ public void GetInfoBySlug() { Assert.Equal("/blog/my-first-post", model.Permalink); Assert.Empty(model.Blocks); } - } + } [Fact] public void GetDynamicById() { @@ -660,7 +659,7 @@ public void UpdateCollectionPost() { api.Posts.Save(post); post = api.Posts.GetBySlug("blog", "my-collection-post"); - + Assert.NotNull(post); Assert.Equal(2, post.Texts.Count); Assert.Equal("Updated text", post.Texts[0].Value); @@ -699,7 +698,7 @@ public void GetDIGeneric() { Assert.NotNull(post); Assert.Equal("My service value", post.Body.Value); - } + } } [Fact] @@ -709,7 +708,7 @@ public void GetDIDynamic() { Assert.NotNull(post); Assert.Equal("My service value", post.Regions.Body.Value); - } + } } } } diff --git a/test/Piranha.Tests/Repositories/SiteTypes.cs b/test/Piranha.Tests/Repositories/SiteTypes.cs index f8b645eff..4a51212b5 100644 --- a/test/Piranha.Tests/Repositories/SiteTypes.cs +++ b/test/Piranha.Tests/Repositories/SiteTypes.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.Models; @@ -19,7 +19,7 @@ namespace Piranha.Tests.Repositories [Collection("Integration tests")] public class SiteTypesCached : SiteTypes { - protected override void Init() + protected override void Init() { cache = new Cache.SimpleCache(); @@ -31,17 +31,17 @@ protected override void Init() public class SiteTypes : BaseTests { protected ICache cache; - private readonly List siteTypes = new List + private readonly List siteTypes = new List { new SiteType { Id = "MyFirstType", - Regions = new List + Regions = new List { new RegionType { Id = "Body", - Fields = new List + Fields = new List { new FieldType { Id = "Default", @@ -129,7 +129,7 @@ public class SiteTypes : BaseTests } }; - protected override void Init() + protected override void Init() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage, cache)) { @@ -159,7 +159,7 @@ public void IsCached() { Assert.Equal(this.GetType() == typeof(SiteTypesCached), api.IsCached); } - } + } [Fact] public void Add() @@ -193,7 +193,6 @@ public void GetNoneById() } } - [Fact] public void GetById() { diff --git a/test/Piranha.Tests/Routers/Pages.cs b/test/Piranha.Tests/Routers/Pages.cs index 657ca837a..03498f578 100644 --- a/test/Piranha.Tests/Routers/Pages.cs +++ b/test/Piranha.Tests/Routers/Pages.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.AttributeBuilder; @@ -33,7 +33,6 @@ public class MyPage : Models.Page [Region] public TextField Body { get; set; } } - protected override void Init() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage)) { diff --git a/test/Piranha.Tests/Routers/Posts.cs b/test/Piranha.Tests/Routers/Posts.cs index 1da76382a..0f506e124 100644 --- a/test/Piranha.Tests/Routers/Posts.cs +++ b/test/Piranha.Tests/Routers/Posts.cs @@ -3,9 +3,9 @@ * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. - * + * * http://github.com/piranhacms/piranha - * + * */ using Piranha.AttributeBuilder; @@ -43,7 +43,6 @@ public class MyPost : Models.Post [Region] public TextField Body { get; set; } } - protected override void Init() { using (var api = new Api(GetDb(), new ContentServiceFactory(services), storage)) { @@ -97,7 +96,7 @@ protected override void Init() { Title = "Default category" }; api.Categories.Save(category1); - + var category2 = new Data.Category() { Id = CATEGORY2_ID, BlogId = PAGE2_ID, @@ -204,7 +203,7 @@ public void GetArchiveDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=&month=&page=&pagenum=&category=&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -215,7 +214,7 @@ public void GetArchiveYearDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=2018&month=&page=&pagenum=&category=&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -226,7 +225,7 @@ public void GetArchiveYearMonthDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=2018&month=2&page=&pagenum=&category=&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -237,7 +236,7 @@ public void GetArchiveYearMonthPageDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=2018&month=2&page=1&pagenum=1&category=&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -248,7 +247,7 @@ public void GetArchiveYearMonthPageCategoryDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=2018&month=2&page=1&pagenum=1&category={CATEGORY1_ID}&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -259,7 +258,7 @@ public void GetArchiveCategoryDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=&month=&page=&pagenum=&category={CATEGORY1_ID}&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -270,7 +269,7 @@ public void GetArchiveMissingCategoryDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=&month=&page=&pagenum=&category={Guid.Empty}&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -281,7 +280,7 @@ public void GetArchiveTagDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=&month=&page=&pagenum=&category=&tag={TAG1_ID}&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -292,7 +291,7 @@ public void GetArchiveMissingTagDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=&month=&page=&pagenum=&category=&tag={Guid.Empty}&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -303,7 +302,7 @@ public void GetArchivePageDefaultSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE1_ID}&year=&month=&page=1&pagenum=1&category=&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -312,7 +311,7 @@ public void GetArchiveNoneDefaultSite() { var response = Piranha.Web.ArchiveRouter.Invoke(api, "/news", SITE1_ID); Assert.Null(response); - } + } } [Fact] @@ -356,7 +355,7 @@ public void GetArchiveOtherSite() { Assert.NotNull(response); Assert.Equal("/archive", response.Route); Assert.Equal($"id={PAGE2_ID}&year=&month=&page=&pagenum=&category=&tag=&piranha_handled=true", response.QueryString); - } + } } [Fact] @@ -365,7 +364,7 @@ public void GetArchiveNoneOtherSite() { var response = Piranha.Web.ArchiveRouter.Invoke(api, "/blog", SITE2_ID); Assert.Null(response); - } + } } } }