-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a350c2c
commit 78da033
Showing
111 changed files
with
25,656 additions
and
2,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
Preflight.Site/Preflight.Site.csproj → ...ples/Preflight.Site/Preflight.Site.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
WebApplicationBuilder builder = WebApplication.CreateBuilder(args); | ||
|
||
builder.CreateUmbracoBuilder() | ||
.AddBackOffice() | ||
.AddWebsite() | ||
.AddDeliveryApi() | ||
.AddComposers() | ||
.Build(); | ||
|
||
WebApplication app = builder.Build(); | ||
|
||
await app.BootUmbracoAsync(); | ||
|
||
|
||
app.UseUmbraco() | ||
.WithMiddleware(u => | ||
{ | ||
u.UseBackOffice(); | ||
u.UseWebsite(); | ||
}) | ||
.WithEndpoints(u => | ||
{ | ||
u.UseInstallerEndpoints(); | ||
u.UseBackOfficeEndpoints(); | ||
u.UseWebsiteEndpoints(); | ||
}); | ||
|
||
await app.RunAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.Author> | ||
|
||
@using Clean.Core.Models.ViewModels | ||
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels | ||
|
||
@{ | ||
Layout = "master.cshtml"; | ||
var authorListPage = Model.Parent as AuthorList; | ||
} | ||
|
||
|
||
@await Html.PartialAsync("~/Views/Partials/pageHeader.cshtml", new PageHeaderViewModel(Model.Name, Model.Title, Model.Subtitle, authorListPage.MainImage, null, null)) | ||
|
||
<article> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-md-10 mx-auto"> | ||
|
||
<div class="row clearfix"> | ||
<div class="col-md-4 column mx-auto"> | ||
<img src="@Model.MainImage.GetCropUrl(400)" alt="@Model.Name" class="w-100"> | ||
<p class="caption">@Model.Name</p> | ||
</div> | ||
</div> | ||
|
||
@Html.GetBlockListHtml(Model.ContentRows) | ||
</div> | ||
</div> | ||
</div> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
Examples/Preflight.Site/Views/Components/Pagination/Default.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<PaginationViewModel> | ||
|
||
@using Clean.Core.Models.ViewModels; | ||
|
||
<nav aria-label="Pagination controls"> | ||
@if (Model.PageCount > 1) | ||
{ | ||
<ul class="pagination justify-content-center"> | ||
@if (Model.PageNumber > 1) | ||
{ | ||
<li class="page-item"> | ||
<a class="page-link text-primary" href="@($"{Model.Url}?page={Model.PageNumber - 1}")">@Umbraco.GetDictionaryValue("Paging.Previous")</a> | ||
</li> | ||
} | ||
@if(Model.ShowFirst) | ||
{ | ||
<li class="page-item"> | ||
<a class="page-link" href="@($"{Model.Url}?page={1}")">1</a> | ||
</li> | ||
<li class="page-item disabled"> | ||
<a class="page-link" href="#">...</a> | ||
</li> | ||
} | ||
|
||
@for (var p = Model.PageNumberStart; p <= Model.PageNumberEnd; p++) | ||
{ | ||
var isCurrentPage = p == Model.PageNumber; | ||
<li class="page-item"> | ||
@if(isCurrentPage) | ||
{ | ||
@:<strong> | ||
} | ||
<a class="page-link @(isCurrentPage ? "text-primary" : null)" href="@($"{Model.Url}?page={p}")">@p</a> | ||
@if(isCurrentPage) | ||
{ | ||
@:</strong> | ||
} | ||
</li> | ||
} | ||
@if (Model.PageNumber < Model.PageCount) | ||
{ | ||
<li class="page-item"> | ||
<a class="page-link text-primary" href="@($"{Model.Url}?page={Model.PageNumber + 1}")">@Umbraco.GetDictionaryValue("Paging.Next")</a> | ||
</li> | ||
} | ||
</ul> | ||
} | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@inherits UmbracoViewPage | ||
|
||
@using Clean.Core.Helpers | ||
@using Clean.Core.Models.ViewModels; | ||
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels | ||
|
||
@{ | ||
AuthorList authorList = UmbracoContext.Content.GetAtRoot().DescendantsOrSelf<AuthorList>().FirstOrDefault(); | ||
int modelId = Model.Id; | ||
var isAuthorListPage = modelId == authorList?.Id; | ||
var fallbackPageSize = isAuthorListPage ? 10 : 3; | ||
|
||
var pageSize = QueryStringHelper.GetIntFromQueryString(Context.Request.Query, "size", fallbackPageSize); | ||
var pageNumber = QueryStringHelper.GetIntFromQueryString(Context.Request.Query, "page", 1); | ||
var allAuthors = authorList?.Children<Author>().Where(x => x.IsVisible()) ?? Enumerable.Empty<Author>(); | ||
var pageOfAuthors = allAuthors.Skip((pageNumber - 1) * pageSize).Take(pageSize); | ||
var totalItemCount = allAuthors.Count(); | ||
var pageCount = totalItemCount > 0 ? Math.Ceiling((double)totalItemCount / pageSize) : 1; | ||
|
||
} | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-md-10 mx-auto"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
@foreach (var author in pageOfAuthors) | ||
{ | ||
<div class="col-4 mx-auto"> | ||
<div class="card"> | ||
<header> | ||
<img src="@(author.MainImage.Url())" alt="@author.Name" class="w-100" /> | ||
</header> | ||
<div class="card-body"> | ||
<div class="content-left text-start my-auto py-4"> | ||
<h2 class="card-title">@author.Name</h2> | ||
<p class="card-description">@author.MetaDescription</p> | ||
<a href="@author.Url()" class="text-primary"> | ||
@Umbraco.GetDictionaryValue("Author.ReadMore") | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
</div> | ||
</div> | ||
|
||
@if (isAuthorListPage) | ||
{ | ||
@await Component.InvokeAsync("Pagination", new { totalItems = totalItemCount, url = Model.Url(), pageNumber = pageNumber, pageSize = pageSize }) | ||
} | ||
</div> | ||
</div> | ||
</div> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
Examples/Preflight.Site/Views/Partials/blocklist/Components/codeSnippetRow.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@inherits UmbracoViewPage<BlockListItem> | ||
@using Umbraco.Cms.Core.Models.Blocks | ||
|
||
@{ | ||
var row = Model.Content as CodeSnippetRow; | ||
var settings = Model.Settings as CodeSnippetRowSettings; | ||
if (settings?.Hide ?? false) { return; } | ||
|
||
var spacingClasses = ""; | ||
if (Model.Settings is ISpacingProperties spacing) | ||
{ | ||
spacingClasses = Clean.Core.Helpers.SpacingHelper.GetSpacingClasses(spacing.PaddingTop, spacing.PaddingBottom, spacing.PaddingLeft, spacing.PaddingRight, spacing.MarginTop, spacing.MarginBottom, spacing.MarginLeft, spacing.MarginRight); | ||
} | ||
|
||
SmidgeHelper.RequiresCss("~/clean-assets/css/vs2015.css"); | ||
SmidgeHelper.RequiresCss("~/clean-assets/css/highlightjs-copy.min.css"); | ||
SmidgeHelper.RequiresJs("~/clean-assets/js/highlight.min.js"); | ||
SmidgeHelper.RequiresJs("~/clean-assets/js/highlightjs-copy.min.js"); | ||
SmidgeHelper.RequiresJs("~/clean-assets/js/initHighlight.js"); | ||
} | ||
|
||
<div class="row clearfix @(spacingClasses)"> | ||
<div class="col-md-12 column"> | ||
<pre><code>@row.Code</code></pre> | ||
@if (!string.IsNullOrWhiteSpace(row.Title)) | ||
{ | ||
<p class="caption">@row.Title</p> | ||
} | ||
</div> | ||
</div> |
15 changes: 15 additions & 0 deletions
15
Examples/Preflight.Site/Views/Partials/blocklist/Components/iconLinkRow.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@inherits UmbracoViewPage<BlockListItem> | ||
@using Umbraco.Cms.Core.Models.Blocks | ||
@addTagHelper *, Clean.Core | ||
|
||
@{ | ||
var row = Model.Content as IconLinkRow; | ||
var settings = Model.Settings as IconLinkRowSettings; | ||
if (settings?.Hide ?? false) { return; } | ||
} | ||
|
||
<li class="list-inline-item"> | ||
<a href="@row.Link.Url" target="@row.Link.Target" rel="@(row.Link.Type == global::Umbraco.Cms.Core.Models.LinkType.External ? "noopener" : null)" title="@row.Link.Name"> | ||
<our-svg media-item="@row.Icon" class="social-icon"></our-svg> | ||
</a> | ||
</li> |
57 changes: 57 additions & 0 deletions
57
Examples/Preflight.Site/Views/Partials/blocklist/Components/imageCarouselRow.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@inherits UmbracoViewPage<BlockListItem> | ||
@using Umbraco.Cms.Core.Models.Blocks | ||
@using Clean.Core.Extensions | ||
|
||
@{ | ||
var row = Model.Content as ImageCarouselRow; | ||
var settings = Model.Settings as ImageCarouselRowSettings; | ||
if (settings?.Hide ?? false) { return; } | ||
if (row.Images == null || !row.Images.Any()) { return; } | ||
|
||
var spacingClasses = ""; | ||
if (Model.Settings is ISpacingProperties spacing) | ||
{ | ||
spacingClasses = Clean.Core.Helpers.SpacingHelper.GetSpacingClasses(spacing.PaddingTop, spacing.PaddingBottom, spacing.PaddingLeft, spacing.PaddingRight, spacing.MarginTop, spacing.MarginBottom, spacing.MarginLeft, spacing.MarginRight); | ||
} | ||
|
||
SmidgeHelper.RequiresCss("~/clean-assets/css/swiffy-slider.min.css"); | ||
SmidgeHelper.RequiresJs("~/clean-assets/js/swiffy-slider.min.js"); | ||
} | ||
|
||
<div class="row clearfix @(spacingClasses)"> | ||
<div class="col-md-12 column"> | ||
<div class="swiffy-slider slider-item-reveal slider-nav-round slider-item-ratio slider-item-ratio-4x3" id="slider-@(row.Key.ToString())"> | ||
<ul class="slider-container"> | ||
@foreach (var item in row.Images) | ||
{ | ||
<li><img src="@item.Url()" loading="lazy" alt="@item.Content.GetAltText()"></li> | ||
} | ||
</ul> | ||
|
||
<button type="button" class="slider-nav" aria-label="Go left"></button> | ||
<button type="button" class="slider-nav slider-nav-next" aria-label="Go right"></button> | ||
|
||
<div class="slider-indicators slider-indicators-square d-none d-md-flex"> | ||
<button class="active" aria-label="Go to slide"></button> | ||
@if (row.Images.Count() > 1) | ||
{ | ||
foreach (var image in row.Images.Skip(1)) | ||
{ | ||
<button aria-label="Go to slide"></button> | ||
} | ||
} | ||
</div> | ||
|
||
<div class="slider-indicators slider-indicators-sm slider-indicators-dark slider-indicators-round d-md-none slider-indicators-highlight"> | ||
<button class="active" aria-label="Go to slide"></button> | ||
@if (row.Images.Count() > 1) | ||
{ | ||
foreach (var image in row.Images.Skip(1)) | ||
{ | ||
<button aria-label="Go to slide"></button> | ||
} | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.