65 lines
1.9 KiB
HTML
65 lines
1.9 KiB
HTML
|
{{ define "main" }}
|
||
|
<section class="home-about">
|
||
|
|
||
|
<!-- These should exist if index-about.md doesn't exist
|
||
|
<div class="avatar">
|
||
|
{{ if isset .Site.Params "avatarurl" }}
|
||
|
<img class={{ .Site.Params.AvatarSize | default "size-m" }} src='{{ .Scratch.Get "avatarImgSrc" }}' alt="{{ .Site.Params.AvatarAltText|default "avatar" }}" />
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
|
||
|
<h1 align="left">{{ .Site.Title }} (n).</h1>
|
||
|
|
||
|
{{ if isset .Site.Params "subtitle" }}
|
||
|
<h3 align="left">{{ .Site.Params.Subtitle }}</h3>
|
||
|
{{ end }}
|
||
|
|
||
|
{{ if isset .Site.Params "description" }}
|
||
|
<h3 align="left">{{ .Site.Params.Description }}</h3>
|
||
|
{{ end }}
|
||
|
-->
|
||
|
</section>
|
||
|
|
||
|
<div class="flex-break"></div>
|
||
|
|
||
|
{{ if isset .Site.Params "socialicons" }}
|
||
|
<section class="social-icons">
|
||
|
<ul class="social-icons-list">
|
||
|
{{ range .Site.Params.SocialIcons }}
|
||
|
<li class="social-icon">
|
||
|
<a href="{{ .url }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} aria-label="Learn more on {{ .name }}">
|
||
|
<img class="svg-inject" src="/svg/icons/{{ .name }}.svg" />
|
||
|
</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
</section>
|
||
|
{{ end }}
|
||
|
|
||
|
{{ if os.FileExists "index-about.md" }}
|
||
|
<div class="markdown-content">
|
||
|
{{ readFile "index-about.md" | markdownify }}
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
|
||
|
{{ if isset .Site.Params "showpostsonhomepage" }}
|
||
|
|
||
|
<div class="home-posts list-posts">
|
||
|
<h2>{{ lower (.Site.Params.ShowPostsOnHomePage | humanize) }} theses</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 }}
|