Skip to content

Commit

Permalink
change into action setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rolorogan committed Aug 28, 2024
1 parent 56c1d81 commit 4349e57
Show file tree
Hide file tree
Showing 240 changed files with 9,720 additions and 944 deletions.
16 changes: 8 additions & 8 deletions Wmca.Core/Controllers/ContentDeliveryApi/AuthorFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

namespace Wmca.Core.Controllers.ContentDeliveryApi
{
public class AuthorFilter : IFilterHandler, IContentIndexHandler
public class CategoryFilter : IFilterHandler, IContentIndexHandler
{
private const string AuthorSpecifier = "author:";
private const string FieldName = "authorId";
private const string TagSpecifier = "tags:";
private const string FieldName = "tagId";

// Querying
public bool CanHandle(string query)
=> query.StartsWith(AuthorSpecifier, StringComparison.OrdinalIgnoreCase);
=> query.StartsWith(TagSpecifier, StringComparison.OrdinalIgnoreCase);

public FilterOption BuildFilterOption(string filter)
{
var fieldValue = filter.Substring(AuthorSpecifier.Length);
var fieldValue = filter.Substring(TagSpecifier.Length);

// There might be several values for the filter
var values = fieldValue.Split(',');
Expand All @@ -31,9 +31,9 @@ public FilterOption BuildFilterOption(string filter)
// Indexing
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
{
GuidUdi? authorUdi = content.GetValue<GuidUdi>("author");
GuidUdi? tagUdi = content.GetValue<GuidUdi>("tags");

if (authorUdi is null)
if (tagUdi is null)
{
return Array.Empty<IndexFieldValue>();
}
Expand All @@ -43,7 +43,7 @@ public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? cul
new IndexFieldValue
{
FieldName = FieldName,
Values = new object[] { authorUdi.Guid }
Values = new object[] { tagUdi.Guid }
}
};
}
Expand Down
14 changes: 11 additions & 3 deletions Wmca.Models/Content/AreaCia.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,27 @@ public AreaCia(IPublishedContent content, IPublishedValueFallback publishedValue
public virtual string ImagePosition => global::Wmca.Models.Content.HomepageBanner.GetImagePosition(this, _publishedValueFallback);

///<summary>
/// Subtitle
/// Subtitle: This will appear below the page title
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("subtitle")]
public virtual global::Umbraco.Cms.Core.Strings.IHtmlEncodedString Subtitle => global::Wmca.Models.Content.HomepageBanner.GetSubtitle(this, _publishedValueFallback);

///<summary>
/// Tag Line
/// Tag Line: This is the title of the page. Use 'shift' + 'enter' to do a line break
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("tagLine")]
public virtual string TagLine => global::Wmca.Models.Content.HomepageBanner.GetTagLine(this, _publishedValueFallback);
public virtual global::Umbraco.Cms.Core.Strings.IHtmlEncodedString TagLine => global::Wmca.Models.Content.HomepageBanner.GetTagLine(this, _publishedValueFallback);

///<summary>
/// Test
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("test")]
public virtual object Test => global::Wmca.Models.Content.HomepageBanner.GetTest(this, _publishedValueFallback);
}
}
52 changes: 52 additions & 0 deletions Wmca.Models/Content/AreaPropertiesCia.generated.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Umbraco.ModelsBuilder.Embedded v13.4.1+d72fc5c
//
// Changes to this file will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Linq.Expressions;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Infrastructure.ModelsBuilder;
using Umbraco.Cms.Core;
using Umbraco.Extensions;

namespace Wmca.Models.Content
{
/// <summary>Area Properties</summary>
[PublishedModel("areaPropertiesCia")]
public partial class AreaPropertiesCia : PublishedContentModel
{
// helpers
#pragma warning disable 0109 // new is redundant
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
public new const string ModelTypeAlias = "areaPropertiesCia";
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
public new const PublishedItemType ModelItemType = PublishedItemType.Content;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[return: global::System.Diagnostics.CodeAnalysis.MaybeNull]
public new static IPublishedContentType GetModelContentType(IPublishedSnapshotAccessor publishedSnapshotAccessor)
=> PublishedModelUtility.GetModelContentType(publishedSnapshotAccessor, ModelItemType, ModelTypeAlias);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[return: global::System.Diagnostics.CodeAnalysis.MaybeNull]
public static IPublishedPropertyType GetModelPropertyType<TValue>(IPublishedSnapshotAccessor publishedSnapshotAccessor, Expression<Func<AreaPropertiesCia, TValue>> selector)
=> PublishedModelUtility.GetModelPropertyType(GetModelContentType(publishedSnapshotAccessor), selector);
#pragma warning restore 0109

private IPublishedValueFallback _publishedValueFallback;

// ctor
public AreaPropertiesCia(IPublishedContent content, IPublishedValueFallback publishedValueFallback)
: base(content, publishedValueFallback)
{
_publishedValueFallback = publishedValueFallback;
}

// properties
}
}
8 changes: 8 additions & 0 deletions Wmca.Models/Content/Author.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ public Author(IPublishedContent content, IPublishedValueFallback publishedValueF
[ImplementPropertyType("facebook")]
public virtual global::Umbraco.Cms.Core.Models.Link Facebook => this.Value<global::Umbraco.Cms.Core.Models.Link>(_publishedValueFallback, "facebook");

///<summary>
/// Image
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("image")]
public virtual global::Umbraco.Cms.Core.Models.MediaWithCrops Image => this.Value<global::Umbraco.Cms.Core.Models.MediaWithCrops>(_publishedValueFallback, "image");

///<summary>
/// Job Title
///</summary>
Expand Down
104 changes: 104 additions & 0 deletions Wmca.Models/Content/ContentCard.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,38 @@ public ContentCard(IPublishedElement content, IPublishedValueFallback publishedV

// properties

///<summary>
/// Button Icon
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("buttonIcon")]
public virtual global::Microsoft.AspNetCore.Html.HtmlString ButtonIcon => this.Value<global::Microsoft.AspNetCore.Html.HtmlString>(_publishedValueFallback, "buttonIcon");

///<summary>
/// Button Icon
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("buttonIconSecondButton")]
public virtual global::Microsoft.AspNetCore.Html.HtmlString ButtonIconSecondButton => this.Value<global::Microsoft.AspNetCore.Html.HtmlString>(_publishedValueFallback, "buttonIconSecondButton");

///<summary>
/// Button Type
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("buttonType")]
public virtual string ButtonType => this.Value<string>(_publishedValueFallback, "buttonType");

///<summary>
/// Button Type
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("buttonTypeSecondButton")]
public virtual string ButtonTypeSecondButton => this.Value<string>(_publishedValueFallback, "buttonTypeSecondButton");

///<summary>
/// Copy
///</summary>
Expand All @@ -57,6 +89,14 @@ public ContentCard(IPublishedElement content, IPublishedValueFallback publishedV
[ImplementPropertyType("copy")]
public virtual global::Umbraco.Cms.Core.Strings.IHtmlEncodedString Copy => this.Value<global::Umbraco.Cms.Core.Strings.IHtmlEncodedString>(_publishedValueFallback, "copy");

///<summary>
/// Design System Icon
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("icon")]
public virtual global::Microsoft.AspNetCore.Html.HtmlString Icon => this.Value<global::Microsoft.AspNetCore.Html.HtmlString>(_publishedValueFallback, "icon");

///<summary>
/// Image
///</summary>
Expand All @@ -73,12 +113,76 @@ public ContentCard(IPublishedElement content, IPublishedValueFallback publishedV
[ImplementPropertyType("link")]
public virtual global::Umbraco.Cms.Core.Models.Link Link => this.Value<global::Umbraco.Cms.Core.Models.Link>(_publishedValueFallback, "link");

///<summary>
/// Link
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("linkSecondButton")]
public virtual global::Umbraco.Cms.Core.Models.Link LinkSecondButton => this.Value<global::Umbraco.Cms.Core.Models.Link>(_publishedValueFallback, "linkSecondButton");

///<summary>
/// Material Icon
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("materialIcon")]
public virtual global::Microsoft.AspNetCore.Html.HtmlString MaterialIcon => this.Value<global::Microsoft.AspNetCore.Html.HtmlString>(_publishedValueFallback, "materialIcon");

///<summary>
/// Title
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("title")]
public virtual string Title => this.Value<string>(_publishedValueFallback, "title");

///<summary>
/// Use Button: A button will appear at the bottom of the card
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("useButton")]
public virtual string UseButton => this.Value<string>(_publishedValueFallback, "useButton");

///<summary>
/// Use Icon: Display an icon instead of an image
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("useIcon")]
public virtual string UseIcon => this.Value<string>(_publishedValueFallback, "useIcon");

///<summary>
/// Use Image
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("useImage")]
public virtual string UseImage => this.Value<string>(_publishedValueFallback, "useImage");

///<summary>
/// Use Link
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("useLink")]
public virtual string UseLink => this.Value<string>(_publishedValueFallback, "useLink");

///<summary>
/// Use Second Button
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("useSecondButton")]
public virtual string UseSecondButton => this.Value<string>(_publishedValueFallback, "useSecondButton");

///<summary>
/// Use Title
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.4.1+d72fc5c")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("useTitle")]
public virtual string UseTitle => this.Value<string>(_publishedValueFallback, "useTitle");
}
}
Loading

0 comments on commit 4349e57

Please sign in to comment.