-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
19 changed files
with
7,000 additions
and
145 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Release Preview Umbraco Package | ||
on: | ||
push: | ||
tags: | ||
- "umb-v[0-9]+.[0-9]+.[0-9]+-[a-z]*[0-9][0-9][0-9]" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set VERSION variable from tag | ||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | ||
- name: Output version name | ||
run: echo "${VERSION}" | ||
- name: Cancel job if version is empty | ||
if: ${{ env.VERSION == '' }} | ||
run: exit 1 | ||
- name: Build Umbraco Package | ||
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release | ||
- name: Pack | ||
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build | ||
- name: Push to NuGet | ||
run: dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json |
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,24 @@ | ||
name: Release Umbraco Package | ||
on: | ||
push: | ||
tags: | ||
- "umb-v[0-9]+.[0-9]+.[0-9]+" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set VERSION variable from tag | ||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | ||
- name: Output version name | ||
run: echo "${VERSION}" | ||
- name: Cancel job if version is empty | ||
if: ${{ env.VERSION == '' }} | ||
run: exit 1 | ||
- name: Build Umbraco Package | ||
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release | ||
- name: Pack | ||
run: dotnet pack ./src/Umbraco.Community.ImageSharpRemoteImages/Umbraco.Community.ImageSharpRemoteImages.csproj /p:NuGetVersion=${VERSION} /p:Version=${VERSION} --output . --configuration Release --no-build | ||
- name: Push to NuGet | ||
run: dotnet nuget push **\Umbraco.Community.ImageSharpRemoteImages.${VERSION}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json |
15 changes: 0 additions & 15 deletions
15
src/Umbraco.Community.ImageSharpRemoteImages/ImageSharpRemoteImagesManifestFilter.cs
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/Umbraco.Community.ImageSharpRemoteImages/ImageSharpRemoteImagesManifestReader.cs
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,23 @@ | ||
using Umbraco.Cms.Core.Manifest; | ||
using Umbraco.Cms.Infrastructure.Manifest; | ||
|
||
namespace Umbraco.Community.ImageSharpRemoteImages; | ||
|
||
public class ImageSharpRemoteImagesManifestReader : IPackageManifestReader | ||
{ | ||
public async Task<IEnumerable<PackageManifest>> ReadPackageManifestsAsync() | ||
{ | ||
return await Task.Run(() => | ||
{ | ||
return new List<PackageManifest>() { | ||
new PackageManifest() | ||
{ | ||
AllowTelemetry = true, | ||
Name = "ImageSharp Remote Images", | ||
Extensions = Array.Empty<object>(), | ||
Version = "14.0.0" | ||
} | ||
}; | ||
}); | ||
} | ||
} |
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,19 +1,27 @@ | ||
namespace RemoteImageProviderUmbracoDemo | ||
{ | ||
public class Program | ||
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 => | ||
{ | ||
public static void Main(string[] args) | ||
=> CreateHostBuilder(args) | ||
.Build() | ||
.Run(); | ||
u.UseBackOfficeEndpoints(); | ||
u.UseWebsiteEndpoints(); | ||
}); | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureUmbracoDefaults() | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseStaticWebAssets(); | ||
webBuilder.UseStartup<Startup>(); | ||
}); | ||
} | ||
} | ||
await app.RunAsync(); |
6 changes: 3 additions & 3 deletions
6
src/demos/RemoteImageProviderUmbracoDemo/RemoteImageProviderUmbracoDemo.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 was deleted.
Oops, something went wrong.
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
49 changes: 49 additions & 0 deletions
49
...s/RemoteImageProviderUmbracoDemo/Views/Partials/Components/LatestBlogPosts/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,49 @@ | ||
@using Umbraco.Cms.Core.Models.PublishedContent | ||
@using Umbraco.Extensions | ||
@model Umbraco.SampleSite.Models.LatestBlogPostsViewModel; | ||
|
||
<div class="blogposts"> | ||
@foreach (IPublishedContent post in Model.BlogPosts) | ||
{ | ||
<a href="@post.Url()" class="blogpost"> | ||
<div class="blogpost-meta"> | ||
<small class="blogpost-date">@post.CreateDate.ToShortDateString()</small> | ||
<small class="blogpost-cat"> | ||
@await Html.PartialAsync("~/Views/Partials/CategoryLinks.cshtml", post.Value<IEnumerable<string>>("categories")) | ||
</small> | ||
</div> | ||
<h3 class="blogpost-title">@post.Value("pageTitle")</h3> | ||
<div class="blogpost-excerpt">@post.Value("excerpt")</div> | ||
</a> | ||
} | ||
|
||
@if (Model.BlogPosts.Count() < Model.Total) | ||
{ | ||
<div class="pagination"> | ||
<nav class="nav-bar nav-bar--center"> | ||
@if (Model.Page <= 1) | ||
{ | ||
<span class="nav-link nav-link--black nav-link--disabled">Prev</span> | ||
} | ||
else | ||
{ | ||
<a class="nav-link nav-link--black" href="@(Model.Url + "?page=" + (Model.Page - 1))">Prev</a> | ||
} | ||
|
||
@for (int i = 1; i <= Model.PageCount; i++) | ||
{ | ||
<a class="nav-link nav-link--black @(Model.Page == i ? " nav-link--active" : null)" href="@(Model.Url + "?page=" + i)">@i</a> | ||
} | ||
@if (Model.Page == Model.PageCount) | ||
{ | ||
<span class="nav-link nav-link--black nav-link--disabled">Next</span> | ||
} | ||
else | ||
{ | ||
<a class="nav-link nav-link--black" href="@(Model.Url + "?page=" + (Model.Page + 1))">Next</a> | ||
} | ||
|
||
</nav> | ||
</div> | ||
} | ||
</div> |
3 changes: 3 additions & 0 deletions
3
...RemoteImageProviderUmbracoDemo/Views/Partials/Components/LatestBlogPosts/NoContent.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,3 @@ | ||
<div class="blogposts"> | ||
<h1>There are no posts at this time, try again later.</h1> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
...RemoteImageProviderUmbracoDemo/Views/Partials/blockgrid/Components/latestBlogposts.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,5 @@ | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem<ContentModels.LatestBlogposts>>; | ||
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels; | ||
|
||
@await Component.InvokeAsync("LatestBlogPosts", | ||
new { numberOfPosts = Model.Content.NumberOfPosts, startNodeKey = Model.Content.StartNode?.Key ?? Guid.Empty }) |
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
Oops, something went wrong.