{{ define "main" }}
{{ if isset .Site.Params "avatarurl" }} {{ .Site.Params.AvatarAltText|default {{ end }}

{{ .Site.Title }}

{{ if isset .Site.Params "description" }}

{{ .Site.Params.Description }}

{{ end }}
{{ if isset .Site.Params "socialicons" }}
{{ end }} {{ if os.FileExists "index-about.md" }}
{{ readFile "index-about.md" | markdownify }}
{{ end }} {{ if isset .Site.Params "showpostsonhomepage" }}

Recent Posts

{{ $posts := where .Site.Pages "Params.type" "post" }} {{ if eq .Site.Params.ShowPostsOnHomePage "popular" }} {{ range $posts.ByWeight | first (or .Site.Params.NumberPostsOnHomePage 4) }} {{- partial "list-posts.html" . -}} {{ end }} {{ else if eq .Site.Params.ShowPostsOnHomePage "recent" }} {{ range $posts.ByDate.Reverse | first (or .Site.Params.NumberPostsOnHomePage 4) }} {{- partial "list-posts.html" . -}} {{ end }} {{ end }}
{{ $projects := where .Site.RegularPages "Params.type" "projects" }} {{ if gt (len $projects) 0 }}

Project Updates

{{ range $projects.ByLastmod.Reverse | first (or $.Site.Params.NumberProjectsOnHomePage 3) }} {{ $project := . }}
{{ .Title }}
{{ with .Params.status }} {{ $color := $project.Params.statusColor | default "#9e9e9e" }} {{ . }} · {{ end }} Updated {{ $project.Lastmod.Format "Jan 2, 2006" }}
{{ end }} View all projects →
{{ end }}
{{ end }} {{ end }}