-
Notifications
You must be signed in to change notification settings - Fork 3
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
6 changed files
with
154 additions
and
117 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
125 changes: 57 additions & 68 deletions
125
templates/Dynamic/RecipeBook/Page/Layout/RecipeCategoryPage.ss
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,83 +1,72 @@ | ||
<div class="container mt-4"> | ||
<div class="row"> | ||
<% loop $paginatedList %> | ||
<div class="card col-md-4"> | ||
<div class="recipe-img-holder"> | ||
<a href="$Link" title="Go to the $Title.XML page"> | ||
<% if $Image %> | ||
<img src="$Image.URL" alt="$Image.Title" class="img-fluid recipe-img" /> | ||
<% else %> | ||
<img src="_resources/themes/cheesesociety/images/recipe-default.jpg" class="img-fluid recipe-img"> | ||
<% end_if %> | ||
<% if $Servings || $PrepTime || $CookTime || $Difficulty %> | ||
<div class="recipe-overlay"> | ||
<div class="inner"> | ||
<div class="container"> | ||
<!-- Category Title --> | ||
<div class="row mb-4"> | ||
<div class="col-12"> | ||
<h1 class="mb-3">$Title</h1> | ||
<% if $Content %> | ||
<p class="lead">$Content</p> | ||
<% end_if %> | ||
</div> | ||
</div> | ||
|
||
<!-- Recipes List --> | ||
<% if $RecipeList.Sort('Title') %> | ||
<div class="row"> | ||
<% loop $RecipeList.Sort('Title') %> | ||
<div class="col-md-4 mb-4"> | ||
<div class="card h-100"> | ||
<a href="$Link" class="text-decoration-none"> | ||
<% if $Image %> | ||
<img src="$Image.URL" class="card-img-top" alt="$Image.Title"> | ||
<% else %> | ||
<img src="https://via.placeholder.com/150" class="card-img-top" alt="No Image"> | ||
<% end_if %> | ||
</a> | ||
<div class="card-body"> | ||
<% if $PrimaryCategory %> | ||
<p class="text-uppercase text-muted small mb-1">$PrimaryCategory.Title</p> | ||
<% end_if %> | ||
<h5 class="card-title"> | ||
<a href="$Link" class="text-decoration-none">$Title</a> | ||
</h5> | ||
<div class="d-flex align-items-center text-muted"> | ||
<% if $PrepTime %> | ||
<div class="pb-1"> | ||
<i class="far fa-clock p-1"></i> | ||
Prep Time: $PrepTime | ||
<div class="me-4"> | ||
<i class="bi bi-alarm"></i> Prep: $PrepTime | ||
</div> | ||
<% end_if %> | ||
<% if $CookTime %> | ||
<div class="pb-1"> | ||
<i class="far fa-clock p-1"></i> | ||
Cook Time: $CookTime | ||
<div class="me-4"> | ||
<i class="bi bi-clock"></i> Cook: $CookTime | ||
</div> | ||
<% end_if %> | ||
<% if $Servings %> | ||
<div class="pb-1"> | ||
<i class="fas fa-utensils p-1"></i> | ||
Servings: $Servings | ||
</div> | ||
<% end_if %> | ||
<% if $Difficulty %> | ||
<div class="pb-1"> | ||
<i class="fas fa-tachometer-alt p-1"></i> | ||
Difficulty: $Difficulty | ||
<div> | ||
<i class="bi bi-people"></i> Servings: $Servings | ||
</div> | ||
<% end_if %> | ||
</div> | ||
<% if $Summary %> | ||
<p class="card-text mt-2">$Summary.LimitCharacters(100)</p> | ||
<% end_if %> | ||
</div> | ||
<% end_if %> | ||
</a> | ||
</div> | ||
<div class="card-body"> | ||
<h4 class="recipe-title text-center">$Title</h4> | ||
</div> | ||
<div class="card-body text-center pt-0"> | ||
<a href="$Link" class="btn recipe-link btn-primary">View Recipe</a> | ||
<div class="card-footer"> | ||
<a href="$Link" class="btn btn-primary btn-block">View Recipe</a> | ||
</div> | ||
</div> | ||
</div> | ||
<% end_loop %> | ||
</div> | ||
<% else %> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<p>No recipes found in this category.</p> | ||
</div> | ||
</div> | ||
<% end_loop %> | ||
</div> | ||
<% end_if %> | ||
</div> | ||
|
||
<% if $paginatedList.MoreThanOnePage %> | ||
<nav aria-label="Recipe Category Navigation"> | ||
<ul class="pagination justify-content-center"> | ||
<% if $paginatedList.NotFirstPage %> | ||
<li class="page-item disabled"> | ||
<a class="page-link" href="$paginatedList.PrevLink" tabindex="-1">Previous</a> | ||
</li> | ||
<% end_if %> | ||
<% loop $paginatedList.PaginationSummary %> | ||
<% if $CurrentBool %> | ||
<li class="page-item active"> | ||
<span class="page-link">$PageNum<span class="sr-only">(current)</span></span> | ||
</li> | ||
<% else %> | ||
<% if $Link %> | ||
<li class="page-item"><a class="page-link" href="$Link">$PageNum</a></li> | ||
<% else %> | ||
... | ||
<% end_if %> | ||
<% end_if %> | ||
<% end_loop %> | ||
<% if $paginatedList.NotLastPage %> | ||
<li class="page-item"> | ||
<a class="page-link" href="$paginatedList.NextLink">Next</a> | ||
</li> | ||
<% end_if %> | ||
</ul> | ||
</nav> | ||
<% end_if %> | ||
<!-- Elemental Area --> | ||
<div> | ||
$ElementalArea | ||
</div> |
111 changes: 68 additions & 43 deletions
111
templates/Dynamic/RecipeBook/Page/Layout/RecipeLanding.ss
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,50 +1,75 @@ | ||
<div class="container mt-4"> | ||
<div class="row"> | ||
<% loop $paginatedList %> | ||
<div class="card col-md-4"> | ||
<% if $CategoryImage %> | ||
<img src="$CategoryImage.URL" class="img-fluid" /> | ||
<% else %> | ||
<img src="_resources/themes/cheesesociety/images/recipe-default.jpg" class="img-fluid"> | ||
<% base_tag %> | ||
<div class="container"> | ||
<!-- Page Title and Content --> | ||
<div class="row mb-4"> | ||
<div class="col-12"> | ||
<h1 class="mb-3">$Title</h1> | ||
<% if $Content %> | ||
<p class="lead">$Content</p> | ||
<% end_if %> | ||
<div class="card-body apply-font"> | ||
<h3 class="text-center recipe-title">$Title</h3> | ||
<% if $Content %><p class="card-text">$Content</p><% end_if %> | ||
</div> | ||
</div> | ||
|
||
<!-- Top-Level Recipe Categories --> | ||
<% loop $Children %> | ||
<div class="row mb-5"> | ||
<!-- Category Title --> | ||
<div class="col-12"> | ||
<h2 class="mb-4">$Title</h2> | ||
</div> | ||
<div class="card-body text-center pt-0"> | ||
<a href="$Link" class="btn recipe-link btn-primary">View All</a> | ||
|
||
<!-- Recipes in Category --> | ||
<% loop $RecipeList.Limit(3).Sort('Title') %> | ||
<div class="col-md-4 mb-4"> | ||
<div class="card h-100"> | ||
<a href="$Link" class="text-decoration-none"> | ||
<% if $Image %> | ||
<img src="$Image.URL" class="card-img-top" alt="$Image.Title"> | ||
<% else %> | ||
<img src="https://via.placeholder.com/150" class="card-img-top" alt="No Image"> | ||
<% end_if %> | ||
</a> | ||
<div class="card-body"> | ||
<% if $PrimaryCategory %> | ||
<p class="text-uppercase text-muted small mb-1">$PrimaryCategory.Title</p> | ||
<% end_if %> | ||
<h5 class="card-title"> | ||
<a href="$Link" class="text-decoration-none">$Title</a> | ||
</h5> | ||
<div class="d-flex align-items-center text-muted"> | ||
<% if $PrepTime %> | ||
<div class="me-4"> | ||
<i class="bi bi-alarm"></i> Prep: $PrepTime | ||
</div> | ||
<% end_if %> | ||
<% if $CookTime %> | ||
<div class="me-4"> | ||
<i class="bi bi-clock"></i> Cook: $CookTime | ||
</div> | ||
<% end_if %> | ||
<% if $Servings %> | ||
<div> | ||
<i class="bi bi-people"></i> Servings: $Servings | ||
</div> | ||
<% end_if %> | ||
</div> | ||
</div> | ||
<div class="card-footer"> | ||
<a href="$Link" class="btn btn-primary btn-block">View Recipe</a> | ||
</div> | ||
</div> | ||
</div> | ||
<% end_loop %> | ||
|
||
<!-- View All Button --> | ||
<div class="col-12 text-center"> | ||
<a href="$Link" class="btn btn-secondary mt-3">View All $Title</a> | ||
</div> | ||
</div> | ||
<% end_loop %> | ||
</div> | ||
</div> | ||
|
||
<% if $paginatedList.MoreThanOnePage %> | ||
<nav aria-label="Recipe Category Navigation"> | ||
<ul class="pagination justify-content-center"> | ||
<% if $paginatedList.NotFirstPage %> | ||
<li class="page-item disabled"> | ||
<a class="page-link" href="$paginatedList.PrevLink" tabindex="-1">Previous</a> | ||
</li> | ||
<% end_if %> | ||
<% loop $paginatedList.PaginationSummary %> | ||
<% if $CurrentBool %> | ||
<li class="page-item active"> | ||
<span class="page-link">$PageNum<span class="sr-only">(current)</span></span> | ||
</li> | ||
<% else %> | ||
<% if $Link %> | ||
<li class="page-item"><a class="page-link" href="$Link">$PageNum</a></li> | ||
<% else %> | ||
... | ||
<% end_if %> | ||
<% end_if %> | ||
<% end_loop %> | ||
<% if $paginatedList.NotLastPage %> | ||
<li class="page-item"> | ||
<a class="page-link" href="$paginatedList.NextLink">Next</a> | ||
</li> | ||
<% end_if %> | ||
</ul> | ||
</nav> | ||
<% end_if %> | ||
<!-- Elemental Area --> | ||
<div> | ||
$ElementalArea | ||
</div> |
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