{{- $featured_image := partial "func/GetFeaturedImage.html" . -}} {{- if or $featured_image .Params.featured_image -}} {{- $featured_image_name := "" -}} {{- if $featured_image -}} {{- .Scratch.Set "featured_image" $featured_image -}} {{- $featured_image_name = strings.TrimSuffix (path.Ext $featured_image.Name) $featured_image.Name -}} {{- else -}} {{- $featured_image_name = .Params.featured_image -}} {{- end -}} {{- $sassTemplate := resources.Get "sass/header-image.scss" -}} {{- $style := $sassTemplate | resources.ExecuteAsTemplate (print (replace $featured_image_name "/" "-") "-header-image.scss") . | resources.ToCSS -}} {{ partial "site-navigation.html" .}} {{ .Title | default .Site.Title }} {{ with .Params.description }} {{ . }} {{ end }} {{ else }} {{ partial "site-navigation.html" . }} {{ .Title | default .Site.Title }} {{ with .Params.description }} {{ . }} {{ end }} {{ end }}