Fix Loading of Product Images for Hugo Site Demo

This commit is contained in:
Alex 2018-11-10 23:24:15 +02:00
parent 0e96aa8c95
commit c69dfe7d55
11 changed files with 20 additions and 19 deletions

View File

@ -2,5 +2,6 @@ baseURL = "http://example.org/"
languageCode = "en-us"
title = "Awesome Lighting Inc."
theme = "hugo-shopping-product-catalogue-simple"
themesDir = "../.."
[Params]
description = ""
description = ""

View File

@ -3,8 +3,8 @@
"date": "2018-05-11T22:35:06+05:30",
"tags": ["Wall Light", "ambience", "black", "black metal", "contemporary", "cool", "cozy", "edison bulb", "filament bulb", "glass", "green", "indoor", "light", "metal", "MODERN", "round", "rustic", "vintage", "white"],
"categories": ["Wall Light"],
"images": ["/img/alessa/1.png", "/img/alessa/2.jpg", "/img/alessa/3.jpg", "/img/alessa/4.jpg", "/img/alessa/5.jpg", "/img/alessa/6.jpg"],
"thumbnailImage": "/img/alessa/thumnail.png",
"images": ["img/alessa/1.png", "img/alessa/2.jpg", "img/alessa/3.jpg", "img/alessa/4.jpg", "img/alessa/5.jpg", "img/alessa/6.jpg"],
"thumbnailImage": "img/alessa/thumnail.png",
"actualPrice": null,
"comparePrice": null,
"inStock": null,

View File

@ -3,8 +3,8 @@
"date": "2018-05-10T08:02:34+05:30",
"tags": ["Wall Light"],
"categories": ["Wall Light"],
"images" : ["/img/azure-blue-de-stijl-bedside-retro-light-with-black-ring/1.jpg"],
"thumbnailImage": "/img/azure-blue-de-stijl-bedside-retro-light-with-black-ring/thumbnail.jpg",
"images" : ["img/azure-blue-de-stijl-bedside-retro-light-with-black-ring/1.jpg"],
"thumbnailImage": "img/azure-blue-de-stijl-bedside-retro-light-with-black-ring/thumbnail.jpg",
"actualPrice": null,
"comparePrice": null,
"inStock": null,

View File

@ -3,8 +3,8 @@
"date": "2018-05-12T15:48:00+05:30",
"tags": ["Floor Light"],
"categories": ["Floor Light"],
"images": ["/img/duke/1.jpg", "/img/duke/2.jpg", "/img/duke/3.jpg"],
"thumbnailImage": "/img/duke/thumbnail.jpg",
"images": ["img/duke/1.jpg", "img/duke/2.jpg", "img/duke/3.jpg"],
"thumbnailImage": "img/duke/thumbnail.jpg",
"actualPrice": "₹ 87,341.00",
"comparePrice": null,
"inStock": true,

View File

@ -3,8 +3,8 @@
"date": "2018-05-10T20:00:43+05:30",
"tags": ["Wall Light"],
"categories": ["Wall Light"],
"images": ["/img/industrial-mesh-cage-wall-light-metal-mesh-up/1.png", "/img/industrial-mesh-cage-wall-light-metal-mesh-up/2.jpg", "/img/industrial-mesh-cage-wall-light-metal-mesh-up/3.jpg"],
"thumbnailImage": "/img/industrial-mesh-cage-wall-light-metal-mesh-up/thumbnail.png",
"images": ["img/industrial-mesh-cage-wall-light-metal-mesh-up/1.png", "img/industrial-mesh-cage-wall-light-metal-mesh-up/2.jpg", "img/industrial-mesh-cage-wall-light-metal-mesh-up/3.jpg"],
"thumbnailImage": "img/industrial-mesh-cage-wall-light-metal-mesh-up/thumbnail.png",
"actualPrice": "₹ 4608.00",
"comparePrice": "₹ 5000.00",
"inStock": false,

View File

@ -3,8 +3,8 @@
"date": "2018-05-12T15:54:25+05:30",
"tags": ["chandeliers"],
"categories": ["chandeliers"],
"images": ["/img/modo-21-lamp/1.jpg", "/img/modo-21-lamp/2.jpg", "/img/modo-21-lamp/2.jpg"],
"thumbnailImage": "/img/modo-21-lamp/thumbnail.jpg",
"images": ["img/modo-21-lamp/1.jpg", "img/modo-21-lamp/2.jpg", "img/modo-21-lamp/2.jpg"],
"thumbnailImage": "img/modo-21-lamp/thumbnail.jpg",
"actualPrice": "₹ 85,000.00",
"comparePrice": null,
"inStock": true,

View File

@ -3,8 +3,8 @@
"date": "2018-05-12T13:50:55+05:30",
"tags": ["Floor Light"],
"categories": ["Floor Light"],
"images": ["/img/oda-lamp/1.jpg", "/img/oda-lamp/2.jpg"],
"thumbnailImage": "/img/oda-lamp/thumbnail.jpg",
"images": ["img/oda-lamp/1.jpg", "img/oda-lamp/2.jpg"],
"thumbnailImage": "img/oda-lamp/thumbnail.jpg",
"actualPrice": "₹ 12,960.00",
"comparePrice": "₹ 25,920.00",
"inStock": false,

View File

@ -3,8 +3,8 @@
"date": "2018-05-10T20:11:38+05:30",
"tags": ["Pendant Light"],
"categories": ["Pendant Light"],
"images": ["/img/retro-vintage-industrial-cage-pendant-system/1.png", "/img/retro-vintage-industrial-cage-pendant-system/2.png"],
"thumbnailImage": "/img/retro-vintage-industrial-cage-pendant-system/thumbnail.png",
"images": ["img/retro-vintage-industrial-cage-pendant-system/1.png", "img/retro-vintage-industrial-cage-pendant-system/2.png"],
"thumbnailImage": "img/retro-vintage-industrial-cage-pendant-system/thumbnail.png",
"actualPrice": "₹ 3,744.00",
"comparePrice": null,
"inStock": true,

View File

@ -3,8 +3,8 @@
"date": "2018-05-10T20:17:46+05:30",
"tags": ["Pendant Light"],
"categories": ["Pendant Light"],
"images": ["/img/void-pendant/1.jpg", "/img/void-pendant/2.jpg", "/img/void-pendant/3.jpg", "/img/void-pendant/4.jpg"],
"thumbnailImage": "/img/void-pendant/thumbnail.jpg",
"images": ["img/void-pendant/1.jpg", "img/void-pendant/2.jpg", "img/void-pendant/3.jpg", "img/void-pendant/4.jpg"],
"thumbnailImage": "img/void-pendant/thumbnail.jpg",
"comparePrice": null,
"actualPrice": "₹ 18,500.00",
"inStock": true,

View File

@ -1,5 +1,5 @@
<a class="col-6 col-lg-3" href="{{ .RelPermalink }}" style="color: inherit;">
<img class="b-lazy img-fluid text-center" data-src="{{ .Params.thumbnailImage }}" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
<img class="b-lazy img-fluid text-center" data-src="{{ .Params.thumbnailImage | absURL }}" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
<p class="text-left">
<span style="font-size: 13px">{{ .Params.title }}</span>
<br/>

View File

@ -16,7 +16,7 @@
</div>
<div class="col-12 col-md-6 order-md-1">
{{ range .Params.images }}
<img class="b-lazy img-fluid text-center" data-src="{{ . }}" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
<img class="b-lazy img-fluid text-center" data-src="{{ . | absURL }}" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
{{ end }}
</div>
<div class="col-12 col-md-6 order-md-2 d-block d-md-none">