wip - split app in two
Signed-off-by: Carl Sargunar <carl@sargunar.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
@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>
|
@@ -0,0 +1,53 @@
|
||||
@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>
|
@@ -0,0 +1,29 @@
|
||||
@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>
|
@@ -1,13 +1,22 @@
|
||||
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockListModel>
|
||||
@{
|
||||
if (Model?.Any() != true) { return; }
|
||||
}
|
||||
<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)
|
||||
}
|
||||
</div>
|
||||
@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; }
|
||||
}
|
||||
@foreach (var block in visibleBlocks)
|
||||
{
|
||||
if (block?.ContentUdi == null) { continue; }
|
||||
var data = block.Content;
|
||||
|
||||
@await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block)
|
||||
}
|
||||
|
Reference in New Issue
Block a user