-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
19 changes: 19 additions & 0 deletions
19
Umbraco.Docs.Samples.Web/Views/Partials/blockgrid/areas.cshtml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@using Umbraco.Extensions | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem> | ||
@{ | ||
if (Model?.Areas.Any() != true) { return; } | ||
} | ||
|
||
<div class="umb-block-grid__area-container" | ||
style="--umb-block-grid--area-grid-columns: @(Model.AreaGridColumns?.ToString() ?? Model.GridColumns?.ToString() ?? "12");"> | ||
@foreach (var area in Model.Areas) | ||
{ | ||
<div class="umb-block-grid__area" | ||
data-area-col-span="@area.ColumnSpan" | ||
data-area-row-span="@area.RowSpan" | ||
data-area-alias="@area.Alias" | ||
style="--umb-block-grid--grid-columns: @area.ColumnSpan;--umb-block-grid--area-column-span: @area.ColumnSpan; --umb-block-grid--area-row-span: @area.RowSpan;"> | ||
@await Html.GetBlockGridItemsHtmlAsync(area) | ||
</div> | ||
} | ||
</div> |
11 changes: 11 additions & 0 deletions
11
Umbraco.Docs.Samples.Web/Views/Partials/blockgrid/default.cshtml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@using Umbraco.Extensions | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridModel> | ||
@{ | ||
if (Model?.Any() != true) { return; } | ||
} | ||
|
||
<div class="umb-block-grid" | ||
data-grid-columns="@(Model.GridColumns?.ToString() ?? "12");" | ||
style="--umb-block-grid--grid-columns: @(Model.GridColumns?.ToString() ?? "12");"> | ||
@await Html.GetBlockGridItemsHtmlAsync(Model) | ||
</div> |
39 changes: 39 additions & 0 deletions
39
Umbraco.Docs.Samples.Web/Views/Partials/blockgrid/items.cshtml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@using Umbraco.Cms.Core.Models.Blocks | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<IEnumerable<BlockGridItem>> | ||
@{ | ||
if (Model?.Any() != true) { return; } | ||
} | ||
|
||
<div class="umb-block-grid__layout-container"> | ||
@foreach (var item in Model) | ||
{ | ||
bool attrForceLeft = item.ForceLeft; | ||
bool attrForceRight = item.ForceRight; | ||
<div | ||
class="umb-block-grid__layout-item" | ||
data-content-element-type-alias="@item.Content.ContentType.Alias" | ||
data-content-element-type-key="@item.Content.ContentType.Key" | ||
data-element-udi="@item.ContentUdi" | ||
data-col-span="@item.ColumnSpan" | ||
data-row-span="@item.RowSpan" | ||
@(attrForceLeft ? "data-force-left" : null) | ||
@(attrForceRight ? "data-force-right" : null) | ||
style=" --umb-block-grid--item-column-span: @item.ColumnSpan; --umb-block-grid--item-row-span: @item.RowSpan; "> | ||
@{ | ||
var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias; | ||
try | ||
{ | ||
@await Html.PartialAsync(partialViewName, item) | ||
} | ||
catch (InvalidOperationException) | ||
{ | ||
<p> | ||
<strong>Could not render component of type: @(item.Content.ContentType.Alias)</strong> | ||
<br/> | ||
This likely happened because the partial view <em>@partialViewName</em> could not be found. | ||
</p> | ||
} | ||
} | ||
</div> | ||
} | ||
</div> |
Binary file modified
BIN
+0 Bytes
(100%)
Umbraco.Docs.Samples.Web/umbraco/Data/Umbraco.sqlite.db-shm
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Umbraco.Docs.Samples.Web/umbraco/Data/Umbraco.sqlite.db-wal
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"sdk": { | ||
"version": "6.0", | ||
"version": "7.0", | ||
"rollForward": "latestMinor", | ||
"allowPrerelease": false | ||
"allowPrerelease": true | ||
} | ||
} |