mirror of
				https://github.com/KevinMidboe/leifsopplevelser.git
				synced 2025-10-29 17:50:21 +00:00 
			
		
		
		
	Gallery have their url constructed by a ASSET_URL, filename, filevariation and extension.
This commit is contained in:
		| @@ -40,7 +40,8 @@ export default { | |||||||
|     return { |     return { | ||||||
|       selected: undefined, |       selected: undefined, | ||||||
|       wide: false, |       wide: false, | ||||||
|       gallery: [] |       gallery: [], | ||||||
|  |       ASSET_URL: 'https://leifsopplevelser.no/assets' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
| @@ -56,9 +57,15 @@ export default { | |||||||
|       .then(images => { |       .then(images => { | ||||||
|         console.log('events', images) |         console.log('events', images) | ||||||
|         images.forEach(image => { |         images.forEach(image => { | ||||||
|  |           let [filename, filextension] = image.filename.split('.') | ||||||
|  |  | ||||||
|  |           console.log('filename:', filename) | ||||||
|  |           console.log('filextension:', filextension) | ||||||
|  |           const url = `${this.ASSET_URL}/${filename}_lg.${filextension}` | ||||||
|  |  | ||||||
|           this.gallery.push({ |           this.gallery.push({ | ||||||
|             type: 'image', |             type: 'image', | ||||||
|             url: 'https://leifsopplevelser.no/images/' + image.filename |             url | ||||||
|           }) |           }) | ||||||
|         }) |         }) | ||||||
|       }) |       }) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user