Skip to content

Instantly share code, notes, and snippets.

@leekelleher
leekelleher / dracula.theme.css
Created April 4, 2024 18:36
Prototype of Dracula Theme for Umbraco CMS (v14/Bellissima)
:root {
/* Dracula Theme
* Links for reference:
* https://draculatheme.com/contribute
* https://spec.draculatheme.com/
* https://github.com/dracula/visual-studio-code/blob/master/src/dracula.yml
*/
/* Dracula: Base */
--umb-dragula-background: #282a36;
@leekelleher
leekelleher / umb-hack-appHeaderActions.js
Last active August 14, 2023 10:25
Umbraco (v8-10) AngularJS hacking the top navigation
angular.module("umbraco").run([
"$compile",
"appState",
"eventsService",
function ($compile, appState, eventsService) {
eventsService.on("app.ready", function (e, args) {
// console.log("app.ready", e, args);
var scope = e.targetScope.$new();
@leekelleher
leekelleher / ExamineDataListSource.cs
Last active April 27, 2021 15:03
Contentment: Examine (Lucene) data-source
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Collections.Generic;
using System.Linq;
using Examine;
using Examine.Search;
using Umbraco.Core;
@leekelleher
leekelleher / UmbracoMembersDataListSource.cs
Last active April 28, 2021 09:35
Contentment: Umbraco Members data-source
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Umbraco.Core;
@leekelleher
leekelleher / TemplatedLabelConfigurationEditor.cs
Created April 20, 2021 16:48
Contentment: Templated Label prototype
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Collections.Generic;
using Umbraco.Core.IO;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Community.Contentment.DataEditors
@leekelleher
leekelleher / ContentmentDataSourcePreValueSource.cs
Last active April 19, 2021 13:21
Umbraco Forms - to populate the prevalues with a data-source from a Contentment data-editor
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Umbraco.Community.Contentment.DataEditors;
@leekelleher
leekelleher / UmbracoImageCropDataListSource.cs
Created February 11, 2021 10:33
Umbraco Image Crop Picker using Contentment Data List
/* Copyright © 2021 Lee Kelleher.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Umbraco.Community.Contentment.DataEditors;
using Umbraco.Core;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Community.Contentment.DataEditors;
using Umbraco.Core.PropertyEditors;
using Umbraco.Web;
namespace MyWebsite.DataSources
{
public class PropertyDataDataSource : IDataListSource
{
@leekelleher
leekelleher / night-mode.css
Last active May 31, 2018 14:58
Prototype for an Umbraco "Night Mode" back-office UI theme
/*
Umbraco Night Mode - A BackOffice UI Theme
*/
body {
filter: invert(100%) hue-rotate(90deg) sepia(25%);
}
#umbracoMainPageBody {
background-color: #000;
@leekelleher
leekelleher / MyMacroContainerValueConverter.cs
Created April 5, 2018 16:47
Umbraco - Overrides the default MacroContainerValueConverter, to return the correct type, HtmlString
using System;
using Umbraco.Core;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Web.PropertyEditors.ValueConverters;
namespace Our.Umbraco.Web.HotFixes
{
public class MyApplicationEventHandler : ApplicationEventHandler