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