sophie-lewis-hugo/themes/sophie-lewis/layouts/_default/single.html
2022-12-27 01:31:14 +01:00

28 lines
907 B
HTML

{{ define "main" }}
{{ $content_class := $.Page.Params.title | lower }}
{{ if eq (.Title | lower) "about" }}
<div class="column is-one-third">
<div class="headshot">
{{ $img := relURL "img/headshot_example.png" }}
{{ if isset $.Site.Params.about "headshot" }}
{{ if fileExists ( printf "static/img/%s" $.Site.Params.about.headshot ) }}
{{ $img := relURL ( printf "img/%s" $.Site.Params.about.headshot )}}
<img src='{{ $img }}'>
{{ else }}
<img src='{{ $img }}'>
{{ end }}
{{ else }}
<img src='{{ $img }}'>
{{ end }}
</div>
</div>
<div id="content" class='section {{ $content_class }}'>
{{.Content}}
</div>
{{ else }}
<div id="content" class='section {{ $content_class }}'>
{{.Content}}
</div>
{{ end }}
{{ end }}