-
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.
Storyblok and Cloudflare processing (#13)
* Add Cloudflare processing * Add Storyblok processing * Remove usage of Uri.IsWellFormedUriString(). Issue #12
- Loading branch information
Showing
14 changed files
with
468 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace PictureRenderer.Profiles | ||
{ | ||
public class CloudflareProfile : PictureProfileBase | ||
{ | ||
|
||
} | ||
} |
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,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace PictureRenderer.Profiles | ||
{ | ||
public class StoryblokProfile : PictureProfileBase | ||
{ | ||
/// <summary> | ||
/// Converts a Storyblok "focus" value from string to numeric values (only using the [left] + [top] values). | ||
/// </summary> | ||
/// <param name="storyblokFocalPoint">Value in the format [left]x[top]:[right]x[bottom].</param> | ||
/// <returns></returns> | ||
public static (double x, double y) ConvertStoryblokFocalPoint(string storyblokFocalPoint) | ||
{ | ||
var xValue = storyblokFocalPoint.Split(':')[0].Split('x')[0]; | ||
var yValue = storyblokFocalPoint.Split(':')[0].Split('x')[1]; | ||
|
||
return (double.Parse(xValue, System.Globalization.CultureInfo.InvariantCulture), double.Parse(yValue, System.Globalization.CultureInfo.InvariantCulture)); | ||
} | ||
} | ||
} |
Oops, something went wrong.