Skip to content

Commit

Permalink
feat: add a portfolio system
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbrozer committed May 3, 2023
1 parent db49083 commit 27b0710
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
}
],
"postTemplates": {
"portfolio": "Describe an image for the portfolio"
"portfolio": "Image for the portfolio"
},
"postConfig": [
{
Expand Down
22 changes: 20 additions & 2 deletions index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
</div>
{{! /Hero }}

{{! Portfolio }}
<div class="uk-section">
<a id="portfolio"></a>

<div class="uk-container uk-dark" uk-scrollspy="cls: uk-animation-slide-right">
<h2 class="uk-heading-divider">Portfolio</h2>

{{> portfolio}}
</div>
</div>
{{! /Portfolio }}

{{! Posts }}
<div class="uk-section">
<a id="readings"></a>
Expand All @@ -35,14 +47,18 @@

<div class="uk-grid-small uk-child-width-1-3@m" uk-grid uk-height-match=".uk-card-body > p">
{{#each posts}}
{{#unless isHidden}}
{{#checkIf template '!=' "portfolio"}}
<div uk-scrollspy="cls: uk-animation-fade">
<div class="uk-card uk-card-secondary">
{{#checkIfAll featuredImage}}
<div class="uk-cover-container uk-card-media-top">
{{#checkIfAll featuredImage featuredImage.urlMd}}
<img src="{{featuredImage.urlMd}}" alt="" uk-cover>
{{else}}
<img src="https://source.unsplash.com/0gkw_9fy0eQ" alt="typewriter" uk-cover>
{{/checkIfAll}}
<canvas width="300" height="300"></canvas>
</div>
{{/checkIfAll}}

<div class="uk-card-header">
<div class="uk-grid-small uk-flex-middle" uk-grid>
Expand All @@ -65,6 +81,8 @@
</div>
</div>
</div>
{{/checkIf}}
{{/unless}}
{{/each}}
</div>
</div>
Expand Down
17 changes: 17 additions & 0 deletions partials/portfolio.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{! Show pictures from posts tagged with "portfolio" }}
<div
class="uk-grid-small uk-child-width-1-3@m"
uk-grid uk-height-match="img"
uk-lightbox="animation: slide">
{{#each posts}}
{{#unless isHidden}}
{{#checkIf template '==' "portfolio"}}
<div uk-scrollspy="cls: uk-animation-fade">
<a class="uk-inline" href="{{featuredImage.urlMd}}" data-caption="{{title}}">
<img src="{{featuredImage.urlMd}}" height="300" alt="">
</a>
</div>
{{/checkIf}}
{{/unless}}
{{/each}}
</div>

0 comments on commit 27b0710

Please sign in to comment.