Skip to content

Commit

Permalink
Split hero-image and hero-image-small layouts (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldon-b authored Oct 27, 2024
1 parent bce42ed commit 670bd2a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 15 deletions.
4 changes: 4 additions & 0 deletions _includes/components/hero-image-small.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div
class="hero-image-small grid-col-12"
style="background-image: url({{include.image}})"
></div>
7 changes: 0 additions & 7 deletions _includes/components/hero-image.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% if include.title or include.subtitle %}
<div
class="hero-image grid-col-12"
style="background-image: url({{include.image}})"
Expand All @@ -12,9 +11,3 @@ <h1 class="margin-top-0">{{include.title}}</h1>
</div>
</div>
</div>
{% else %}
<div
class="hero-image-small grid-col-12"
style="background-image: url({{include.image}})"
></div>
{% endif %}
4 changes: 1 addition & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
layout: base
---

{% include core/header.html %} {% include core/google-analytics.html %} {%
include components/hero-image.html title=page.hero-title
subtitle=page.hero-subtitle image=page.hero-image %}
{% include core/header.html %} {% include core/google-analytics.html %}
<div class="grid-container">{{ content }}</div>

{% include core/footer.html %}
9 changes: 9 additions & 0 deletions _layouts/hero-image-small.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: base
---

{% include core/header.html %} {% include core/google-analytics.html %} {%
include components/hero-image-small.html image=page.hero-image %}
<div class="grid-container">{{ content }}</div>

{% include core/footer.html %}
10 changes: 10 additions & 0 deletions _layouts/hero-image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: base
---

{% include core/header.html %} {% include core/google-analytics.html %} {%
include components/hero-image.html title=page.hero-title
subtitle=page.hero-subtitle image=page.hero-image %}
<div class="grid-container">{{ content }}</div>

{% include core/footer.html %}
2 changes: 1 addition & 1 deletion code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: hero-image-small
title: Code of Conduct
hero-image: assets/images/hero-image-code-of-conduct.jpg
---
Expand Down
2 changes: 1 addition & 1 deletion donate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: hero-image-small
title: Donate
hero-image: assets/images/hero-image-donate.jpg
---
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: hero-image
title: Civic Tech DC
hero-subtitle: Founded in 2012, Civic Tech DC is a non-partisan, non-political group of volunteer civic hackers working together to solve local issues and help people engage with the city.
hero-image: assets/images/hero-image-homepage.jpg
Expand Down
2 changes: 1 addition & 1 deletion partners.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: hero-image
banner-hero: true
title: Partners
hero-title: Partners
Expand Down
2 changes: 1 addition & 1 deletion slack.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: hero-image-small
title: Join our Slack
hero-image: assets/images/hero-image-slack.jpg
---
Expand Down

0 comments on commit 670bd2a

Please sign in to comment.