Added option to add image (e.g. portrait) on front page
This commit is contained in:
parent
c3bf34a1e0
commit
aba0ed25cc
3 changed files with 13 additions and 1 deletions
|
@ -100,6 +100,11 @@ img {
|
||||||
&.right {
|
&.right {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
&.circle {
|
||||||
|
border-radius: 50%;
|
||||||
|
max-width: 25%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
|
|
|
@ -98,6 +98,10 @@ disableHugoGeneratorInject = false
|
||||||
# Set to a valid CSS time value to change the animation duration, "0s" to disable.
|
# Set to a valid CSS time value to change the animation duration, "0s" to disable.
|
||||||
# logoCursorAnimate = "2s"
|
# logoCursorAnimate = "2s"
|
||||||
|
|
||||||
|
[params.portrait]
|
||||||
|
path = "/img/image.jpg"
|
||||||
|
alt = "Portrait"
|
||||||
|
|
||||||
# Social icons
|
# Social icons
|
||||||
[[params.social]]
|
[[params.social]]
|
||||||
name = "twitter"
|
name = "twitter"
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main aria-role="main">
|
<main aria-role="main">
|
||||||
<div>
|
<div>
|
||||||
<h1>{{ .Site.Title }}</h1>
|
{{ if .Site.Params.portrait.path }}
|
||||||
|
<img src="{{ .Site.Params.portrait.path }}" class="circle" alt="{{ .Site.Params.portrait.alt }}" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<h1>{{ .Site.Title }}</h1>
|
||||||
{{- with .Site.Params.homeSubtitle }}
|
{{- with .Site.Params.homeSubtitle }}
|
||||||
<p>{{.}}</p>
|
<p>{{.}}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue