mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-30 14:35:19 -04:00
profileMode : init
usaage, in config add params: profileMode: title: "PaperMod" // or default will be site.title imageUrl: "<image_link>"
This commit is contained in:
parent
8af56e302d
commit
6be9da45ab
3 changed files with 49 additions and 1 deletions
|
@ -1,4 +1,18 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ if .Site.Params.profileMode }}
|
||||
<div class="profile">
|
||||
<div class="profile_inner">
|
||||
{{if .Site.Params.profileMode.imageUrl}}
|
||||
<div>
|
||||
<img src="{{ .Site.Params.profileMode.imageUrl}}" alt="{{ .Site.Params.profileMode.imageTitle}}" />
|
||||
</div>
|
||||
{{end}}
|
||||
<h1>{{ if .Site.Params.profileMode.title }}{{.Site.Params.profileMode.title}}{{ else }}{{ .Site.Title }}{{end}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
{{else}} {{/* if not profileMode */}}
|
||||
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
|
@ -52,5 +66,5 @@
|
|||
</nav>
|
||||
</footer>
|
||||
{{- end }}
|
||||
|
||||
{{end}}{{/* end profileMode */}}
|
||||
{{ end }}{{/* end main */}}
|
Loading…
Add table
Add a link
Reference in a new issue