mirror of
https://github.com/KevinMidboe/leifsopplevelser.git
synced 2025-10-29 09:40: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 {
|
||||
selected: undefined,
|
||||
wide: false,
|
||||
gallery: []
|
||||
gallery: [],
|
||||
ASSET_URL: 'https://leifsopplevelser.no/assets'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -56,9 +57,15 @@ export default {
|
||||
.then(images => {
|
||||
console.log('events', images)
|
||||
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({
|
||||
type: 'image',
|
||||
url: 'https://leifsopplevelser.no/images/' + image.filename
|
||||
url
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user