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
public static class StringExtensionMethods | |
{ | |
public static string AddHeadingAnchorsToHtml(this string html) | |
{ | |
var doc = new HtmlDocument(); | |
doc.LoadHtml(html); | |
// select all possible headings in the document | |
var headings = doc.DocumentNode.SelectNodes("//h2"); | |
if (headings != null) | |
{ |
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
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
using System.Linq; | |
using Umbraco.Cms.Core; | |
using Umbraco.Cms.Core.PropertyEditors; | |
using Umbraco.Cms.Core.Services; | |
using Umbraco.Extensions; | |
namespace Our.Umbraco.PersonalisationGroups.Core.Providers.MemberProfileField |
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
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
app.UseUmbraco() | |
.WithMiddleware(u => | |
{ | |
u.UseBackOffice(); | |
u.UseWebsite(); | |
}) | |
.WithEndpoints(u => | |
{ |
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
public class MovieSerivce : IMovieService | |
{ | |
private readonly IAppPolicyCache _runtimeCache; | |
private const string MOVIES_CACHE_KEY = "Movies.API.Cache"; | |
public MovieSerivce(AppCaches appCaches) | |
{ | |
_runtimeCache = appCaches.RuntimeCache; | |
} |
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
.loop1 { | |
@for $i from 1 through 2 { | |
&-#{$i} { | |
width: 100%; | |
max-width: (100% / 12) * $i; | |
flex-basis: (100% / 12) * $i; | |
} | |
&-#{$i}\@sm { | |
@media (min-width: 768px) { | |
max-width: (100% / 12) * $i; |
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
.LiveApp-composition--overview { | |
background: #000 !important; | |
} | |
.LiveApp-composition--overview-wrapper { | |
display: grid !important; | |
grid-template-rows: 1fr 2fr 3fr 2fr; | |
} | |
.LiveApp-composition--overview .LiveClock-time-wrapper { |
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
/** | |
* Polyfill SVG path support for iOS | |
*/ | |
SVGCircleElement.prototype.getTotalLength = function() { | |
let width = this.parentNode.clientWidth, // Get the parent node width (trying to get the current node width returns 0) | |
radius = width / 2, // Get the radius by dividing by 2 | |
length = 2 * Math.PI * radius; // Get the circumference from 2πr | |
// Return the calculated value | |
return length; |
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
<configuration> | |
<system.webServer> | |
<!-- URL rewriting so it doesn't have to use index.php --> | |
<rewrite> | |
<rules> | |
<rule name="wordpress" patternSyntax="Wildcard"> | |
<match url="*" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> |