var album = {}; album.get = function(album){ axios.get('/api/album/get/' + album) .then(function (response) { document.getElementById('title').innerHTML = response.data.title; var container = document.createElement('div'); container.innerHTML = `
` document.getElementById('container').appendChild(container); var table = document.getElementById('table'); for(var item of response.data.files){ var div = document.createElement('div'); div.className = "column is-2"; if(item.thumb !== undefined) div.innerHTML = ``; else div.innerHTML = `