Introduce landing page and card shortcode

This commit is contained in:
Alex Shpak
2025-08-09 00:56:37 +02:00
parent b3322d7bae
commit 47223753a2
14 changed files with 231 additions and 60 deletions
+20
View File
@@ -0,0 +1,20 @@
{{- /* remove whitespace */ -}}
{{- if .Get "href" -}}
<a class="book-card{{ with .Get "class" }} {{ . }}{{ end }}"{{ with .Get "href" }} href="{{ . | relURL }}"{{ end }}>
{{- template "book-card-content" . -}}
</a>
{{- else -}}
<div class="book-card{{ with .Get "class" }} {{ . }}{{ end }}">
{{- template "book-card-content" . -}}
</div>
{{- end -}}
{{- define "book-card-content" -}}
{{- with .Get "image" -}}
<img src="{{ . | urls.RelLangURL }}" />
{{- end }}
<div class="markdown-inner">
{{ with .InnerDeindent }}{{ . }}{{ end }}
</div>
{{- end -}}
{{- /* remove whitespace */ -}}