Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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-lit-element.ts
Created August 27, 2024 10:14
Boilerplate for a custom Umbraco web component (Umbraco Lit Element class)
import { css, customElement, html } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
const elementName = 'umb-custom-element';
@customElement(elementName)
export class UmbCustomElement extends UmbLitElement {
constructor() {
super();