Skip to content

Commit

Permalink
Use splash as fallback instead of default cover
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverbear committed Dec 14, 2024
1 parent e389139 commit 9ceebcc
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions templates/partials/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@
{%- endif -%}

{%- if page_or_section.extra.image -%}
{%- set cover_path = page_or_section.extra.image.path -%}
{%- set cover_photographer = page_or_section.extra.image.photographer | default(value="") -%}
{%- set cover_source = page_or_section.extra.image.source | default(value="") -%}
{%- set colocated = page_or_section.extra.image.colocated | default(value=true) -%}
{%- set cover_path = page_or_section.extra.image.path -%}
{%- set cover_photographer = page_or_section.extra.image.photographer | default(value="") -%}
{%- set cover_source = page_or_section.extra.image.source | default(value="") -%}
{%- set colocated = page_or_section.extra.image.colocated | default(value=true) -%}
<div id="hero-wrapper">
{{ image::enriched(
path=cover_path,
alt="Photo",
source=cover_source,
photographer=cover_photographer,
colocated=colocated
) }}
</div>
{%- else -%}
{%- set cover_path = '../static/' ~ config.extra.cover.path -%}
{%- set cover_photographer = config.extra.cover.photographer | default(value="") -%}
{%- set cover_source = config.extra.cover.source | default(value="") -%}
{%- set colocated = false -%}
<div id="hero-wrapper">
{% include "partials/splash.html" %}
</div>
{%- endif -%}

<div id="hero-wrapper">
{{ image::enriched(
path=cover_path,
alt="Photo",
source=cover_source,
photographer=cover_photographer,
colocated=colocated
) }}
</div>

0 comments on commit 9ceebcc

Please sign in to comment.