Skip to content

Commit

Permalink
Merge pull request #92 from rickbutterfield/v1/1.12.0
Browse files Browse the repository at this point in the history
V1/1.12.1
  • Loading branch information
rickbutterfield authored Jan 25, 2025
2 parents a4429a5 + ef5c88d commit 79692af
Show file tree
Hide file tree
Showing 162 changed files with 2,614 additions and 2,273 deletions.
1 change: 0 additions & 1 deletion src/Umbraco.Cms.13.x/Umbraco.Cms.13.x.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Limbo.Umbraco.ModelsBuilder" Version="13.0.2" />
<PackageReference Include="Umbraco.BlockGrid.Example.Website" Version="1.0.2" />
<PackageReference Include="Umbraco.Cms" Version="13.5.2" />
<PackageReference Include="uSync" Version="13.0.0" />
Expand Down
3 changes: 2 additions & 1 deletion src/Umbraco.Cms.13.x/Views/BlockGrid.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@inherits UmbracoViewPage<BlockGrid>
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.BlockGrid>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
Layout = "Layout.cshtml";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@inherits UmbracoViewPage<BlockGridItem<HeroBlock>>
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem<HeroBlock>>
@{
var backgroundColor = Model.Content.Value<string>("backgroundColor");
var image = Model.Content.Value<IPublishedContent>("image");
var hasBrightContrast = Model.Content.Value<string>("contrast") == "ffffff";
var backgroundColor = Model.Content.BackgroundColor;
var image = Model.Content.Image;
var hasBrightContrast = Model.Content.Contrast == "#ffffff";
}

<pre>Dropdown: @Model.Content.Height</pre>
<pre>Content Picker: @Model.Content.ContentPicker?.Name (@Model.Content.ContentPicker?.Url())</pre>
<pre>Dropdown: @Model.Content.Dropdown</pre>

<div
class="hero"
style="background-color:#@backgroundColor"
style="background-color:@backgroundColor"
@(hasBrightContrast ? "bright-contrast" : null)>

@if (image is not null) {
Expand All @@ -20,12 +20,11 @@


<div class="hero-content">
<h1>@(Model.Content.Value<string>("headline"))</h1>
<h1>@Model.Content.Headline</h1>
@* Only render if there is some content... *@
@if (Model.Areas.Any(a => a.Any())) {
@await Html.GetPreviewBlockGridItemAreasHtmlAsync(Model)
}
</div>
</div>



Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
var backgroundColor = Model.Settings.BackgroundColor;
var hasBrightContrast = Model.Settings.Contrast == "ffffff";
var hasBrightContrast = Model.Settings.Contrast == "#ffffff";
}

<section
class="inspiration"
style="background-color:#@backgroundColor"
style="background-color:@backgroundColor"
@(hasBrightContrast ? "bright-contrast" : null)>
<div class="area-container">
<div class="left-area">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
@(noBackgroundColor ? "nobackgroundcolor" : null)
@(hasBrightContrast ? "bright-contrast" : null)>
@await Html.GetPreviewBlockGridItemAreasHtmlAsync(Model)

@if (Model.Content.BlockGrid != null)
{
@await Html.GetPreviewBlockGridItemsHtmlAsync(Model.Content.BlockGrid)
}
</section>

@await Html.GetBlockGridHtmlAsync(Model.Content.NestedBlockGrid)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
var hasBrightContrast = Model.Content.Contrast == "ffffff";
}

<pre>Dropdown: @Model.Content.Height</pre>
<pre>Content Picker: @Model.Content.ContentPicker?.Name (@Model.Content.ContentPicker?.Url())</pre>

<div
class="hero"
style="background-color:#@backgroundColor"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@inherits UmbracoViewPage<BlockListItem<NestedBlockList>>

@await Html.GetBlockListHtmlAsync(Model.Content.BlockList)
7 changes: 1 addition & 6 deletions src/Umbraco.Cms.13.x/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
@using Umbraco.Extensions
@using Umbraco.Cms._13.x
@using Umbraco.Cms.Web.Common.PublishedModels
@using Umbraco.Cms.Web.Common.PublishedModels.Content
@using Umbraco.Cms.Web.Common.PublishedModels.Elements
@using Umbraco.Cms.Web.Common.Views
@using Umbraco.Cms.Core.Models.PublishedContent
@using Microsoft.AspNetCore.Html
@using Umbraco.Cms.Core.Models.Blocks
@using Umbraco.Community.BlockPreview.Extensions
@using Microsoft.AspNetCore.Html
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Smidge
@inject Smidge.SmidgeHelper SmidgeHelper
2 changes: 1 addition & 1 deletion src/Umbraco.Cms.13.x/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"Debug": true
},
"ModelsBuilder": {
"ModelsMode": "Nothing"
"ModelsMode": "SourceCodeAuto"
},
"RuntimeMinification": {
"UseInMemoryCache": true,
Expand Down
72 changes: 46 additions & 26 deletions src/Umbraco.Cms.13.x/uSync/v9/Content/block-list-test.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,67 @@
<SortOrder>2</SortOrder>
<Published Default="true" />
<Schedule />
<Template Key="21af993e-d1d4-4a3b-a7d8-971c3202eddc">BlockList</Template>
<Template Key="c021e223-9e49-4725-b942-eb2562f00b84">BlockList</Template>
</Info>
<Properties>
<content>
<Value><![CDATA[{
"layout": {
"Umbraco.BlockList": [
{
"contentUdi": "umb://element/b753b77647ca40e7bbef7637237fd560",
"settingsUdi": "umb://element/edf219148160418b96da6d11d063fa7a"
"contentUdi": "umb://element/c631ffb2f8ae4a179b570b18943a6382"
}
]
},
"contentData": [
{
"contentTypeKey": "432b58a8-01b7-47dc-8664-f72bf1045f66",
"udi": "umb://element/b753b77647ca40e7bbef7637237fd560",
"headline": "Test",
"image": [
{
"key": "59b1c1a0-203d-491f-ac3e-0311a0c00330",
"mediaKey": "65a066c2-b30d-497b-a53c-968e3f9a20d1"
}
],
"backgroundColor": "",
"contrast": {
"value": "ffffff",
"label": "ffffff",
"sortOrder": 1,
"id": "2"
"contentTypeKey": "43e5784f-e3f1-4725-8d2c-876cadaba21b",
"udi": "umb://element/c631ffb2f8ae4a179b570b18943a6382",
"blockList": {
"layout": {
"Umbraco.BlockList": [
{
"contentUdi": "umb://element/937bf135249e49cb9c7f60c6539421a3",
"settingsUdi": "umb://element/68fba16b859245608f654eb56c5c0b00"
}
]
},
"contentData": [
{
"contentTypeKey": "432b58a8-01b7-47dc-8664-f72bf1045f66",
"udi": "umb://element/937bf135249e49cb9c7f60c6539421a3",
"headline": "Nested Hero",
"image": [],
"backgroundColor": {
"value": "113635",
"label": "113635",
"sortOrder": 7,
"id": "0"
},
"contrast": {
"value": "ffffff",
"label": "ffffff",
"sortOrder": 1,
"id": "0"
},
"contentPicker": "umb://document/6e2ff1f7114e484ba407918daded1aa6",
"height": [
"200"
]
}
],
"settingsData": [
{
"contentTypeKey": "1a16c578-dacc-4552-ad07-26553c8a34fd",
"udi": "umb://element/68fba16b859245608f654eb56c5c0b00",
"backgroundColor": "",
"contrast": ""
}
]
}
}
],
"settingsData": [
{
"contentTypeKey": "1a16c578-dacc-4552-ad07-26553c8a34fd",
"udi": "umb://element/edf219148160418b96da6d11d063fa7a",
"backgroundColor": "",
"contrast": ""
}
]
"settingsData": []
}]]></Value>
</content>
</Properties>
Expand Down
Loading

0 comments on commit 79692af

Please sign in to comment.