2021-11-01 10:28:09 +08:00
|
|
|
{{ define "main" }}
|
|
|
|
<article class="flex flex-col items-center justify-center h-full mt-10 text-center">
|
|
|
|
<header class="flex flex-col items-center mb-3">
|
|
|
|
{{ with .Site.Author.image }}
|
2022-06-16 10:03:17 +08:00
|
|
|
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | relURL }}" alt="{{ $.Site.Author.name }}" />
|
2021-11-01 10:28:09 +08:00
|
|
|
{{ end }}
|
|
|
|
<h1 class="text-4xl font-extrabold dark:text-white">
|
|
|
|
{{ .Params.title | default .Site.Author.name | default .Site.Title | emojify }}
|
|
|
|
</h1>
|
|
|
|
{{ with .Content }}
|
|
|
|
<section class="pt-5 prose dark:prose-light">{{ . | emojify }}</section>
|
|
|
|
{{ end }}
|
|
|
|
</header>
|
|
|
|
{{ with .Site.Author.links }}
|
|
|
|
<div class="flex flex-col flex-wrap min-w-full mt-4 sm:min-w-0">
|
|
|
|
{{ range $links := . }}
|
2021-11-03 08:25:02 +08:00
|
|
|
{{ range $type, $data := $links }}
|
|
|
|
{{ $href := $data }}
|
|
|
|
{{ $icon := $type }}
|
|
|
|
{{ $text := i18n (printf "link.%s" $type) }}
|
2021-11-06 14:44:29 +08:00
|
|
|
{{ $target := "_blank" }}
|
|
|
|
{{ $title := "" }}
|
2021-11-03 08:25:02 +08:00
|
|
|
{{ if reflect.IsMap $data }}
|
|
|
|
{{ with $data.href }}{{ $href = . }}{{ end }}
|
|
|
|
{{ with $data.icon }}{{ $icon = . }}{{ end }}
|
|
|
|
{{ with $data.text }}{{ $text = . }}{{ end }}
|
2021-11-06 14:44:29 +08:00
|
|
|
{{ with $data.target }}{{ $target = . }}{{ end }}
|
|
|
|
{{ with $data.title }}{{ $title = . }}{{ end }}
|
2021-11-03 08:25:02 +08:00
|
|
|
{{ end }}
|
2021-11-01 10:28:09 +08:00
|
|
|
<a
|
2021-11-03 08:25:02 +08:00
|
|
|
class="link link-{{ $type }} sm:px-24 min-w-full py-2 mb-3 text-lg rounded"
|
|
|
|
href="{{ $href }}"
|
2021-11-06 14:44:29 +08:00
|
|
|
target="{{ $target }}"
|
|
|
|
{{ with $title }}title="{{ . }}"{{ end }}
|
2021-11-01 10:28:09 +08:00
|
|
|
rel="me noopener noreferrer"
|
|
|
|
>
|
2021-11-04 15:56:42 +08:00
|
|
|
{{- with $icon -}}
|
|
|
|
<span class="mr-1">{{ partial "icon.html" . }}</span>
|
|
|
|
{{- end -}}
|
|
|
|
{{ $text | emojify }}
|
|
|
|
</a>
|
2021-11-01 10:28:09 +08:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</article>
|
|
|
|
{{ end }}
|