wip - try with a db container

Signed-off-by: Carl Sargunar <carl@sargunar.com>
This commit is contained in:
Carl Sargunar
2022-06-02 02:02:00 +01:00
parent 8fc9904238
commit bf9db21809
39 changed files with 45 additions and 3352 deletions

View File

@@ -1,22 +0,0 @@
@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using Umbraco.Cms.Web.Common.PublishedModels
@{
var cta = (CallToAction)Model.Content;
}
<section class="portfolio-block call-to-action border-bottom">
<div class="container">
<div class="d-flex justify-content-center align-items-center content">
@if(!string.IsNullOrWhiteSpace(cta.Text))
{
<h3>@cta.Text</h3>
}
@if(cta.Link != null)
{
<a class="btn btn-outline-primary btn-lg" target="@cta.Link.Target" href="@cta.Link.Url">@cta.Link.Name</a>
}
</div>
</div>
</section>

View File

@@ -1,53 +0,0 @@
@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using Umbraco.Cms.Web.Common.PublishedModels
@using System.Collections
@using Umbraco.Cms.Core.Models
@using Portfolio.Core.Extensions
@{
var cardsRow = (CardsRow)Model.Content;
}
<section class="portfolio-block skills">
<div class="container">
@if(!string.IsNullOrWhiteSpace(cardsRow.Title))
{
<div class="heading">
<h2>@cardsRow.Title</h2>
</div>
}
@if(cardsRow.Cards != null && cardsRow.Cards.Any())
{
var visibleCards = cardsRow.Cards.Where(x => x.Settings == null
|| !x.Settings.HasProperty("hide")
|| !x.Settings.HasValue("hide")
|| !x.Settings.Value<bool>("hide"));
if(visibleCards != null && visibleCards.Any())
{
<div class="row">
@foreach (var item in cardsRow.Cards)
{
IconCard card = (IconCard)item.Content;
<div class="col-md-4">
<div class="card special-skill-item border-0">
@if (!string.IsNullOrWhiteSpace(card.IconClass))
{
<div class="card-header bg-transparent border-0"><i class="icon @card.IconClass.ToIconClass()"></i></div>
}
@if(!string.IsNullOrWhiteSpace(card.Title) || !string.IsNullOrWhiteSpace(card.Description))
{
<div class="card-body">
<h3 class="card-title">@card.Title</h3>
<p class="card-text">@card.Description</p>
</div>
}
</div>
</div>
}
</div>
}
}
</div>
</section>

View File

@@ -1,29 +0,0 @@
@inherits UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListItem>
@using Umbraco.Cms.Web.Common.PublishedModels
@{
var projectPreview = (ProjectPreview)Model.Content;
}
<section class="portfolio-block website bg-primary text-white">
<div class="container">
<div class="row align-items-center">
<div class="col-md-12 col-lg-5 offset-lg-1 text">
<h3>@projectPreview.Title</h3>
<p>@projectPreview.Description</p>
</div>
<div class="col-md-12 col-lg-5">
@if (projectPreview.Image != null)
{
<div class="portfolio-laptop-mockup">
<div class="screen">
<div class="screen-content" style="background-image:url('@(projectPreview.Image.GetCropUrl(width: 298, height: 189))');"></div>
</div>
<div class="keyboard"></div>
</div>
}
</div>
</div>
</div>
</section>

View File

@@ -1,22 +1,13 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListModel>
@using Umbraco.Extensions
@{
if (!Model.Any()) { return; }
var visibleBlocks = Model.Where(x =>
x.Settings == null
|| !x.Settings.HasProperty("hide")
|| !x.Settings.HasValue("hide")
|| !x.Settings.Value<bool>("hide"));
if (!visibleBlocks.Any()) { return; }
if (Model?.Any() != true) { return; }
}
@foreach (var block in visibleBlocks)
{
if (block?.ContentUdi == null) { continue; }
var data = block.Content;
<div class="umb-block-list">
@foreach (var block in Model)
{
if (block?.ContentUdi == null) { continue; }
var data = block.Content;
@await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block)
}
@await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block)
}
</div>