Skip to content

Commit aa882b2

Browse files
Merge pull request #8 from rickbutterfield/feature/dashboard
Add Sustainability section
2 parents 89f9c99 + b5341e1 commit aa882b2

File tree

90 files changed

+929
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+929
-172
lines changed

src/Umbraco.Community.Sustainability.TestSite.10.x/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,5 +478,6 @@ appsettings-schema.json
478478
/wwwroot/media/
479479

480480
# Test Site App_Plugins packages folder (exclude here as in Umbraco.Community.Sustainability project)
481+
/App_Plugins/UmbracoCommunitySustainability/
481482
/App_Plugins/Umbraco.Community.Sustainability/
482483
/App_Plugins/Bergmania.OpenStreetMap/

src/Umbraco.Community.Sustainability.TestSite.10.x/Umbraco.Community.Sustainability.TestSite.10.x.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Umbraco.Cms" Version="10.0.0" />
10+
<PackageReference Include="Umbraco.Cms" Version="10.8.0" />
1111
<PackageReference Include="Umbraco.TheStarterKit" Version="10.0.0" />
1212
</ItemGroup>
1313

src/Umbraco.Community.Sustainability.TestSite.11.x/Views/Blogpost.cshtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
</span>
1818
</div>
1919
<h3>@Model.Excerpt</h3>
20-
@Html.GetGridHtml(Model, "bodyText", "bootstrap3-fluid")
20+
@await Html.GetBlockGridHtmlAsync(Model, "bodyText")
2121
<!-- todo: implement discus comments -->
2222
</article>
2323
</div>
24-
</section>
24+
</section>
25+
26+
<link rel="stylesheet" href="@Url.Content("~/css/umbraco-starterkit-blockgrid.css")" />

src/Umbraco.Community.Sustainability.TestSite.11.x/Views/Home.cshtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
</section>
2222

2323
<section class="section section">
24-
@Html.GetGridHtml(Model, "bodyText", "bootstrap3-fluid")
24+
@await Html.GetBlockGridHtmlAsync(Model, "bodyText")
2525
</section>
2626

27-
2827
<section class="section section--themed">
2928

3029
<div class="container">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@using Umbraco.Extensions
2+
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>
3+
4+
<h2 style="padding: 20px">@Model.Content.Value("headline")</h2>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@using Umbraco.Extensions
2+
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>
3+
4+
@{
5+
var typedMediaPickerSingle = Model.Content.Value<Umbraco.Cms.Core.Models.MediaWithCrops>("image");
6+
if (typedMediaPickerSingle != null)
7+
{
8+
<img src="@typedMediaPickerSingle.MediaUrl()" style="object-fit:cover; width:100%; height:100%;"/>
9+
} else {
10+
<p>Missing image</p>
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@using Umbraco.Extensions
2+
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>
3+
4+
<div style="padding: 20px">
5+
@Model.Content.Value("richText")
6+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@using Umbraco.Extensions
2+
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>
3+
4+
<div>
5+
@await Html.GetBlockGridItemAreasHtmlAsync(Model)
6+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>;
2+
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
3+
@{
4+
var feature = (Feature)Model.Content;
5+
}
6+
7+
<div class="product-advantage">
8+
<h4>@feature.FeatureName</h4>
9+
<h5>@feature.FeatureDetails</h5>
10+
</div>

src/Umbraco.Community.Sustainability.TestSite.11.x/Views/Product.cshtml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,16 @@
2424
<button class="button button--border--solid">Buy</button>
2525
</div>
2626
<div class="product-advantages">
27-
@if (Model.Features != null)
28-
{
29-
foreach (var feature in Model.Features)
30-
{
31-
<div class="product-advantage">
32-
<h4>@feature.FeatureName</h4>
33-
<h5>@feature.FeatureDetails</h5>
34-
</div>
35-
}
36-
}
27+
@Html.GetBlockListHtml(Model, "features")
3728
</div>
3829
</div>
3930
</div>
4031
</div>
4132
</section>
33+
4234
<section class="section section--sand">
4335
<div class="container">
4436
<!-- todo: Check if grid is empty via a property value converter -->
45-
@Html.GetGridHtml(Model, "bodyText", "bootstrap3-fluid")
37+
@await Html.GetBlockGridHtmlAsync(Model, "bodyText")
4638
</div>
4739
</section>

0 commit comments

Comments
 (0)