Add multiple homepage layouts

This commit is contained in:
James Panther
2021-08-15 18:41:40 +10:00
parent 491d356d15
commit 7285cac334
20 changed files with 176 additions and 47 deletions
+16
View File
@@ -0,0 +1,16 @@
{{ with .Site.Author.links }}
<div class="flex flex-wrap text-gray-400 dark:text-gray-500">
{{ range $links := . }}
{{ range $name, $url := $links }}
<a
class="px-1 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ $url }}"
target="_blank"
alt="{{ $name | title }}"
rel="me"
>{{ partial "icon.html" $name }}</a
>
{{ end }}
{{ end }}
</div>
{{ end }}
+1 -16
View File
@@ -9,22 +9,7 @@
{{ . }}
</div>
{{ end }}
{{ with .Site.Author.links }}
<div class="flex flex-wrap text-lg text-gray-400 dark:text-gray-500">
{{ range $links := . }}
{{ range $name, $url := $links }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ $url }}"
target="_blank"
alt="{{ $name | title }}"
rel="me"
>{{ partial "icon.html" $name }}</a
>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ partialCached "author-links.html" . }}
</div>
</div>
{{ end }}
+1 -1
View File
@@ -1,4 +1,4 @@
<header class="flex justify-between py-10 font-semibold ">
<header class="flex justify-between py-6 font-semibold sm:py-10">
<div>
<a class="hover:underline" rel="me" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
+8
View File
@@ -0,0 +1,8 @@
<article class="max-w-full prose dark:prose-light">
{{ with .Title }}
<header>
<h1>{{ . | emojify }}</h1>
</header>
{{ end }}
<section>{{ .Content | emojify }}</section>
</article>
+21
View File
@@ -0,0 +1,21 @@
<article
class="flex flex-col items-center justify-center text-center
{{ if not .Site.Params.homepage.showList -}}
h-full
{{- else -}}
mb-8
{{- end }}"
>
<header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }}
<img class="mb-2 rounded-full w-36 h-36" src="{{ . }}" />
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}
</h1>
<div class="mt-1 text-2xl">
{{ partialCached "author-links.html" . }}
</div>
</header>
<section class="prose dark:prose-light">{{ .Content | emojify }}</section>
</article>