Add Lotusdocs theme

This commit is contained in:
Abner Coimbre
2026-01-11 16:46:05 -08:00
parent d051d46d1f
commit 8a4d04db58
577 changed files with 40404 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
{{ $dest := .Destination }}
{{ $text := .PlainText }}
{{ $url := urls.Parse $dest }}
{{ $image := newScratch }}
{{ with $url.Scheme }}
{{ $image.Set "resource" (resources.GetRemote $dest) }}
{{ else }}
{{ $image.Set "resource" (resources.Get $dest) }}
{{ end }}
{{ if .Title }}
<figure>
{{ with ($image.Get "resource") }}
{{ if eq .MediaType.SubType "svg" }}
{{ .Content | safeHTML }}
{{ else }}
<img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy">
{{ end }}
{{ else }}
<img src="{{ .Destination | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy">
{{ end }}
<figcaption>{{ .Title | markdownify }}</figcaption>
</figure>
{{ else }}
{{ with ($image.Get "resource") }}
{{ if eq .MediaType.SubType "svg" }}
{{ .Content | safeHTML }}
{{ else }}
<img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy">
{{ end }}
{{ end }}
{{ end }}