Files
gokarna/layouts/index.html
Yash Mehrotra e8b9e86fc5 Rearchitect theme directory (#59)
* Rearchitect theme directory

* Fix symlink
2021-08-14 02:41:02 +05:30

35 lines
992 B
HTML

{{ define "main" }}
<section class="home-about">
<div class="avatar">
{{ if isset .Site.Params "avatarurl" }}
<img class={{ .Site.Params.AvatarSize | default "size-m" }} src='{{ .Site.Params.AvatarURL }}'>
{{ end }}
</div>
<h1>{{ .Site.Title }}</h1>
<h3>{{ .Site.Params.Description }}</h3>
</section>
<div class="flex-break"></div>
{{ if isset .Site.Params "showpostsonhomepage" }}
<div class="home-posts list-posts">
<h2>{{ .Site.Params.ShowPostsOnHomePage | humanize }} Posts</h2>
{{ $posts := where .Site.Pages "Params.type" "post" }}
{{ if eq .Site.Params.ShowPostsOnHomePage "popular" }}
{{ range $posts.ByWeight | first 4 }}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ else if eq .Site.Params.ShowPostsOnHomePage "recent" }}
{{ range $posts.ByDate.Reverse | first 4 }}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}