diff --git a/assets/ts/resources.ts b/assets/ts/resources.ts index 57c87f4..74aff97 100644 --- a/assets/ts/resources.ts +++ b/assets/ts/resources.ts @@ -1,11 +1,12 @@ // data structure for images info export interface ImageJSON { index: number - url: string - imgH: number - imgW: number - pColor: string - sColor: string + loUrl: string + loImgH: number + loImgW: number + hiUrl: string + hiImgH: number + hiImgW: number } export function initResources(): ImageJSON[] { diff --git a/layouts/partials/resources/imageJSON.html b/layouts/partials/resources/imageJSON.html index fd29203..c1a92b8 100644 --- a/layouts/partials/resources/imageJSON.html +++ b/layouts/partials/resources/imageJSON.html @@ -6,12 +6,17 @@ {{ $Page.Scratch.Add "img" slice }} {{ range . }} {{ $index = sub $index 1 }} - {{ $resize := .Resize "x2000 webp Lanczos q70" }} + {{ $lores := .Resize "1000x webp Lanczos q70" }} + {{ $hires := .Resize "2500x webp Lanczos q75" }} {{ $Page.Scratch.Add "img" (dict "index" (int $index) - "url" (string .RelPermalink) - "imgH" (int .Height) - "imgW" (int .Width)) + "loUrl" (string $lores.RelPermalink) + "loImgH" (int $lores.Height) + "loImgW" (int $lores.Width) + "hiUrl" (string $hires.RelPermalink) + "hiImgH" (int $hires.Height) + "hiImgW" (int $hires.Width) + ) }} {{- end -}}