Skip to content

Commit

Permalink
#61 moves banner files into "organisms"
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesKhong committed Mar 8, 2024
1 parent bbbb99e commit 0f6b641
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions views/organisms/blocks/banner/hero.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{# Banner used in the header region #}

<header class="hero-section hero-section--{{ post.post_type }}">
{% set hero_fields = post.get_field('hero') %}
{% set hero_fields = hero_fields ? hero_fields : [] %}
{% set hero_fields = hero_fields|merge({ 'title': hero_fields.title ? hero_fields.title : post.title }) %}
{% set hero_fields = hero_fields|merge({ 'image': hero_fields.image ? hero_fields.image : post.thumbnail }) %}
{% set hero_fields = hero_fields|merge({ 'is_hero': true }) %}
{% include 'blocks/banner/banner.twig' with { fields: hero_fields } %}
</header>

0 comments on commit 0f6b641

Please sign in to comment.