diff options
| author | Pitu <[email protected]> | 2017-09-20 03:03:00 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2017-09-20 03:03:00 -0300 |
| commit | 50dbb9526b48a25b885b6b657dec4cc083621fe5 (patch) | |
| tree | 3c641d52a08c6bf353fe89f2db1d56263792eb5f /public/js | |
| parent | Added handlebars dependency and yarn.lock (diff) | |
| download | host.fuwn.me-50dbb9526b48a25b885b6b657dec4cc083621fe5.tar.xz host.fuwn.me-50dbb9526b48a25b885b6b657dec4cc083621fe5.zip | |
Delete album.js script since we are SSR now on that route 🎉
Diffstat (limited to 'public/js')
| -rw-r--r-- | public/js/album.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/public/js/album.js b/public/js/album.js deleted file mode 100644 index d3880ee..0000000 --- a/public/js/album.js +++ /dev/null @@ -1,34 +0,0 @@ -var album = {}; - -album.get = function(album){ - axios.get('/api/album/get/' + album) - .then(function (response) { - document.getElementById('title').innerHTML = response.data.title; - document.getElementById('count').innerHTML = response.data.count + ' files'; - - var container = document.createElement('div'); - container.innerHTML = `<div class="columns is-multiline is-mobile" id="table"></div>` - 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 = `<a href="${item.file}" target="_blank"><img src="${item.thumb}"/></a>`; - else - div.innerHTML = `<a href="${item.file}" target="_blank"><h1 class="title">.${item.file.split('.').pop()}</h1></a>`; - table.appendChild(div); - } - }) - .catch(function (error) { - return swal("An error ocurred", 'There was an error with the request, please check the console for more information.', "error"); - console.log(error); - }); -} - -window.onload = function () { - var identifier = document.location.pathname; - identifier = identifier.substring(3, identifier.length); - album.get(identifier); -};
\ No newline at end of file |