Add lazy loading for images

This commit is contained in:
Zed
2025-02-05 03:18:49 +01:00
parent b43bfc5d42
commit 7728899948
2 changed files with 5 additions and 7 deletions

View File

@@ -91,7 +91,7 @@ proc genDate*(pref, state: string): VNode =
proc genImg*(url: string; class=""): VNode =
buildHtml():
img(src=getPicUrl(url), class=class, alt="")
img(src=getPicUrl(url), class=class, alt="", loading="lazy")
proc getTabClass*(query: Query; tab: QueryKind): string =
if query.kind == tab: "tab-item active"