forked from wkallhof/Simple301
-
Notifications
You must be signed in to change notification settings - Fork 7
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
1 parent
6952d60
commit 03645a0
Showing
10 changed files
with
1,902 additions
and
11 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
10 changes: 10 additions & 0 deletions
10
source/SimpleRedirects.Site/Views/Partials/blockgrid/area.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,10 @@ | ||
@using Umbraco.Extensions | ||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridArea> | ||
|
||
<div class="umb-block-grid__area" | ||
data-area-col-span="@Model.ColumnSpan" | ||
data-area-row-span="@Model.RowSpan" | ||
data-area-alias="@Model.Alias" | ||
style="--umb-block-grid--grid-columns: @Model.ColumnSpan;--umb-block-grid--area-column-span: @Model.ColumnSpan; --umb-block-grid--area-row-span: @Model.RowSpan;"> | ||
@await Html.GetBlockGridItemsHtmlAsync(Model) | ||
</div> |
13 changes: 13 additions & 0 deletions
13
source/SimpleRedirects.Site/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,13 @@ | ||
@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) | ||
{ | ||
@await Html.GetBlockGridItemAreaHtmlAsync(area) | ||
} | ||
</div> |
11 changes: 11 additions & 0 deletions
11
source/SimpleRedirects.Site/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> |
35 changes: 35 additions & 0 deletions
35
source/SimpleRedirects.Site/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,35 @@ | ||
@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) | ||
{ | ||
<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" | ||
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> |
Oops, something went wrong.