Browse Source

Merge pull request #16 from budparr/dev

tweak hero default behavior
tags/1.0
Bud Parr 7 years ago
parent
commit
3ab94d42f1
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      layouts/partials/page-header.html
  2. 3
    3
      layouts/partials/site-header.html

+ 1
- 1
layouts/partials/page-header.html View File

{{ if $featured_image }} {{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $featured_image := (trim $featured_image "/") | absURL }} {{ $featured_image := (trim $featured_image "/") | absURL }}
<header class="cover bg-center" style="background-image: url('{{ $featured_image }}');">
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
<div class="pb3-m pb6-l bg-black-60"> <div class="pb3-m pb6-l bg-black-60">
{{ partial "site-navigation.html" . }} {{ partial "site-navigation.html" . }}
<div class="tc-l pv6 ph3 ph4-ns"> <div class="tc-l pv6 ph3 ph4-ns">

+ 3
- 3
layouts/partials/site-header.html View File

{{ $featured_image := .Params.featured_image | default .Site.Params.featured_image }}
{{ $featured_image := .Params.featured_image }}
{{ if $featured_image }} {{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $featured_image := (trim $featured_image "/") | absURL }} {{ $featured_image := (trim $featured_image "/") | absURL }}
<header class="cover bg-center" style="background-image: url('{{ $featured_image }}');">
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
<div class="bg-black-60"> <div class="bg-black-60">
{{ partial "site-navigation.html" .}} {{ partial "site-navigation.html" .}}
<div class="tc-l pv4 pv6-l ph3 ph4-ns"> <div class="tc-l pv4 pv6-l ph3 ph4-ns">
{{ .Title | default .Site.Title }} {{ .Title | default .Site.Title }}
</h1> </h1>
{{ with .Params.description }} {{ with .Params.description }}
<h2 class="fw1 f5 f3-l white-80 mt3">
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center mt3">
{{ . }} {{ . }}
</h2> </h2>
{{ end }} {{ end }}

Loading…
Cancel
Save