Skip to content

Commit

Permalink
In hero.html: if no image referenced, show header text horizontally c…
Browse files Browse the repository at this point in the history
…entered using page width, instead of using columns
  • Loading branch information
MJacred committed Feb 6, 2023
1 parent df4d9f7 commit a4f799c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion layouts/partials/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@
<section class="hero is-fullheight is-default is-bold">
<div class="hero-body">
<div class="container">
{{- if $image }}
<div class="columns is-vcentered">
<div class="column is-5 is-offset-1 landing-caption">
{{- else }}
<div class="columns is-centered">
<div class="is-5 is-offset-1 landing-caption">
{{- end }}
<h1 class="title is-1 is-bold is-spaced">
{{ $title }}
</h1>
Expand All @@ -18,18 +23,21 @@ <h2 class="subtitle is-5 is-muted">
{{ . }}
</h2>
{{ end }}
{{- if $buttonText }}
<p>
<a class="button cta rounded primary-btn raised" href="{{ $buttonUrl | absLangURL }}">
{{ $buttonText }}
</a>
</p>
{{- end }}
</div>

{{- if $image }}
<div class="column is-5 is-offset-1">
<figure class="image is-4by3">
<img src="{{ printf "/images/%s" $image | relURL }}" alt="Description">
</figure>
</div>
{{- end }}
</div>
</div>
</div>
Expand Down

0 comments on commit a4f799c

Please sign in to comment.