-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from alanta/feature/update-to-net6
Update to .NET 6 and Kontent.Statiq v2
- Loading branch information
Showing
13 changed files
with
96 additions
and
115 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
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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Kentico.Kontent.Delivery.Abstractions; | ||
|
||
namespace Kentico.Kontent.Statiq.Memoirs.Models | ||
{ | ||
public partial class Post: IPageMetadata | ||
{ | ||
public string Url => $"post/{PostDate.Value.Year}/{PostDate.Value.Month:00}/{UrlSlug}.html"; | ||
public string Url => $"post/{PostDate?.Year ?? 0}/{(PostDate?.Month??0):00}/{UrlSlug}.html"; | ||
|
||
} | ||
} |
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
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
@using Kentico.Kontent.Statiq.Memoirs.Models | ||
@model Kentico.Kontent.Statiq.Memoirs.Models.IPageMetadata | ||
<!-- Post, Page Content | ||
================================================== --> | ||
<div class="article-post"> | ||
<!-- Toc if any --> | ||
@using Kentico.Kontent.Statiq.Memoirs.Models | ||
@model Kentico.Kontent.Statiq.Memoirs.Models.IPageMetadata | ||
<!-- Post, Page Content | ||
================================================== --> | ||
<div class="article-post"> | ||
<!-- Toc if any --> | ||
@if( Model.TableOfContents()){ | ||
/*if (Model.beforetoc) | ||
{ | ||
<p><em>Model.beforetoc</em></p> | ||
}*/ | ||
<div class="toc mt-4 mb-4 lead"> | ||
<h3 class="font-weight-bold">Summary</h3> | ||
@Html.TableOfContents(Model.Body) | ||
</div> | ||
} | ||
<!-- End Toc --> | ||
<article> | ||
@Html.Raw(Model.Body) | ||
</article> | ||
}*/ | ||
<div class="toc mt-4 mb-4 lead"> | ||
<h3 class="font-weight-bold">Summary</h3> | ||
@Html.TableOfContents(Model.Body) | ||
</div> | ||
} | ||
<!-- End Toc --> | ||
<article> | ||
@Html.Raw(Model.Body) | ||
</article> | ||
</div> |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
@using Kentico.Kontent.Delivery.Abstractions | ||
@model IEnumerable<Kentico.Kontent.Delivery.Abstractions.IAsset> | ||
@{ | ||
bool lazyImages = Html.Site().LazyImages; | ||
@using Kentico.Kontent.Delivery.Abstractions | ||
@model IEnumerable<Kentico.Kontent.Delivery.Abstractions.IAsset> | ||
@{ | ||
bool lazyImages = Html.Site().LazyImages; | ||
bool imageShadow = Html.Site().ImageShadow; | ||
IAsset image = Model?.FirstOrDefault(); | ||
} | ||
@if (image != null) | ||
{ | ||
<div class="entry-featured-image"> | ||
@if (lazyImages) | ||
{ | ||
<img class="featured-image lazyimg @(imageShadow?"image-shadow":"")" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="@image.Url?w=940&h=670&fit=crop" alt="@image.Description"> | ||
} | ||
else | ||
{ | ||
<img class="featured-image @(imageShadow?"image-shadow":"")" src="@image.Url?w=940&h=670&fit=crop" alt="@image.Description"> | ||
} | ||
</div> | ||
IAsset image = Model?.FirstOrDefault(); | ||
} | ||
@if (image != null) | ||
{ | ||
<div class="entry-featured-image"> | ||
@if (lazyImages) | ||
{ | ||
<img class="featured-image lazyimg @(imageShadow?"image-shadow":"")" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="@image.Url?w=940&h=670&fit=crop" alt="@image.Description"> | ||
} | ||
else | ||
{ | ||
<img class="featured-image @(imageShadow?"image-shadow":"")" src="@image.Url?w=940&h=670&fit=crop" alt="@image.Description"> | ||
} | ||
</div> | ||
} |
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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
@using Kentico.Kontent.ImageTransformation | ||
@using Kentico.Kontent.Statiq.Memoirs.Models | ||
@using MemoirsTheme.Helpers | ||
@model Kentico.Kontent.Statiq.Memoirs.Models.Author | ||
@{ | ||
var site = ViewData["SiteMetaData"] as SiteSettings; | ||
} | ||
<!-- Author Box --> | ||
@using Kentico.Kontent.Urls.ImageTransformation | ||
@using Kentico.Kontent.Statiq.Memoirs.Models | ||
@using MemoirsTheme.Helpers | ||
@model Kentico.Kontent.Statiq.Memoirs.Models.Author | ||
@{ | ||
var site = ViewData["SiteMetaData"] as SiteSettings; | ||
} | ||
<!-- Author Box --> | ||
@if( Model != null && site.AuthorBox){ | ||
<div class="d-flex authorbox align-items-center"> | ||
<div class="col-md-2 mr-4 text-center"> | ||
@if (Model?.AvatarImage != null) | ||
{ | ||
@Html.Image(Model.AvatarImage, Model.Name, site.LazyImages, 580, 400, ImageFitMode.Crop, new { @class = "img-thumb" }) | ||
} | ||
else | ||
{ | ||
<img class="author-thumb" src="https://www.gravatar.com/avatar/@Model.Gravatar?s=250&d=mm&r=x" alt="@Model.Name"> | ||
} | ||
</div> | ||
<div class="col-md-10"> | ||
@foreach (var contact in Model.Contacts.OfType<Contact>()) | ||
{ | ||
@if (contact.Icon == "web") | ||
{ | ||
<a target="_blank" class="text-dark h4" href="@contact.Url">About @Model.Name</a> | ||
} | ||
else | ||
{ | ||
<a target="_blank" href="@contact.Url" class="btn-sm"><i class="fab [email protected]"></i></a> | ||
} | ||
} | ||
|
||
<span class="author-description d-block mt-2">@Model.Bio</span> | ||
</div> | ||
</div> | ||
<div class="d-flex authorbox align-items-center"> | ||
<div class="col-md-2 mr-4 text-center"> | ||
@if (Model?.AvatarImage != null) | ||
{ | ||
@Html.Image(Model.AvatarImage, Model.Name, site.LazyImages, 580, 400, ImageFitMode.Crop, new { @class = "img-thumb" }) | ||
} | ||
else | ||
{ | ||
<img class="author-thumb" src="https://www.gravatar.com/avatar/@Model.Gravatar?s=250&d=mm&r=x" alt="@Model.Name"> | ||
} | ||
</div> | ||
<div class="col-md-10"> | ||
@foreach (var contact in Model.Contacts.OfType<Contact>()) | ||
{ | ||
@if (contact.Icon == "web") | ||
{ | ||
<a target="_blank" class="text-dark h4" href="@contact.Url">About @Model.Name</a> | ||
} | ||
else | ||
{ | ||
<a target="_blank" href="@contact.Url" class="btn-sm"><i class="fab [email protected]"></i></a> | ||
} | ||
} | ||
|
||
<span class="author-description d-block mt-2">@Model.Bio</span> | ||
</div> | ||
</div> | ||
} |
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