customisable headshot

This commit is contained in:
2021-08-25 17:29:31 +01:00
parent 2f5529396c
commit ed1621c1c8
5 changed files with 22 additions and 15 deletions

View File

@ -4,7 +4,17 @@
<div class="columns">
<div class="column is-one-third">
<div class="headshot">
<img src='{{relURL "img/example_headshot-masterchief.png"}}'>
{{ $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 class="column">

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -2,20 +2,9 @@
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "Sophie Lewis"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
description = ""
homepage = "http://example.com/"
tags = []
features = []
min_version = "0.41.0"
[author]
name = ""
homepage = ""
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""