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 System; | |
using Umbraco.Cms.Core; | |
using Umbraco.Cms.Core.Composing; | |
using Umbraco.Cms.Core.Migrations; | |
using Umbraco.Cms.Core.Scoping; | |
using Umbraco.Cms.Core.Services; | |
using Umbraco.Cms.Infrastructure.Migrations; | |
using Umbraco.Cms.Infrastructure.Migrations.Upgrade; | |
namespace Umbraco.Community.Migrations; |
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 Umbraco.Cms.Web.Website.Controllers; | |
namespace Ecreo.Essentials.Helpers; | |
public static class UrlHelperExtensions | |
{ | |
public static string? Action<T>(this IUrlHelper Url, string name) where T : SurfaceController | |
{ | |
return Url.Action<T>(name, null, null, null, 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.Mvc.ViewComponents; | |
using Umbraco.Cms.Core.Cache; | |
using Umbraco.Cms.Core.Logging; | |
using Umbraco.Cms.Core.Models.PublishedContent; | |
using Umbraco.Cms.Core.Services; | |
using Umbraco.Cms.Infrastructure.Persistence; | |
using Umbraco.Cms.Web.Common.Routing; | |
namespace Ecreo.Essentials.ViewComponents; |
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 System; | |
using System.Text; | |
using System.Web.Http; | |
using Umbraco.Core.Models; | |
using Umbraco.Web.WebApi; | |
namespace My.Controllers | |
{ | |
public class ReferencesController : UmbracoApiController | |
{ |
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
<div class="rowview"> | |
<div style="margin:0 0 10px;border:1px dashed #ccc;"> | |
<div style="margin:0 -5px;padding:10px;display:flex;"> | |
<div | |
ng-repeat="property in block.content.variants[0].tabs[0].properties" | |
ng-if="property.editor == 'Umbraco.BlockList'" | |
style="flex-grow:1;padding:0 5px;"> | |
<umb-property property="property"> | |
<umb-property-editor model="property"></umb-property-editor> | |
</umb-property> |
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 ImageProcessor; | |
using ImageProcessor.Imaging; | |
using System.Drawing; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Web.Http; | |
using Umbraco.Core; | |
using Umbraco.Core.Configuration; | |
using Umbraco.Core.IO; |
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
<rule name="Redirect all topdomain traffic (without subdomains) to www." stopProcessing="true"> | |
<match url=".*" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^[^\.]*\.([^\.]+)$" /> | |
<!-- | |
https://regex101.com/r/6be5ka/1/ | |
^ asserts position at start of a line | |
Match a single character not present in the list below [^\.]* | |
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy) |
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
let fadeOut = (target, duration=500) => { | |
target.style.transitionProperty = 'opacity'; | |
target.style.transitionDuration = duration + 'ms'; | |
target.style.opacity = 0; | |
window.setTimeout( () => { | |
target.style.display = 'none'; | |
target.style.removeProperty('opacity'); | |
target.style.removeProperty('transition-duration'); | |
target.style.removeProperty('transition-property'); |
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 interface IMyService {} | |
public class MyClass : IMyService { | |
UmbracoHelper umbracoHelper; | |
public MyClass(UmbracoHelper umbracoHelper) | |
{ | |
this.umbracoHelper = umbracoHelper; | |
} | |
} | |
public class MyClassComposer : IUserComposer | |
{ |
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
.projects .project-inner { | |
display: grid; | |
grid-template-columns: 32px 1fr 15px 130px; | |
grid-template-rows: 1fr 1fr; | |
height: auto; | |
column-gap: 1em; | |
row-gap: 0; | |
padding: 1em; | |
} | |
.projects .project { |
NewerOlder