summaryrefslogtreecommitdiff
path: root/src/albums.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/albums.js')
-rw-r--r--src/albums.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/albums.js b/src/albums.js
index f8b5ed1..c1d85e3 100644
--- a/src/albums.js
+++ b/src/albums.js
@@ -1,12 +1,11 @@
import apiConnector from "./connector.js"
export default async function initAlbums(albumsPageContainer) {
- // TODO empty cells animation
-
const albumsContainer = albumsPageContainer.querySelector("#albums-container")
const albumTemplate = albumsPageContainer.querySelector("#album-template")
+
+ // create albums
async function createAlbum(res) {
- console.log(res.albumName, res.id, res.startDate, res.endDate, res.assetCount, res.shared)
const albumClone = albumTemplate.content.cloneNode(true)
albumClone.firstElementChild.dataset.key = res.id
albumClone.querySelector("a").href = apiConnector.albumSrc(res.id)
@@ -24,6 +23,7 @@ export default async function initAlbums(albumsPageContainer) {
for (const res of albumsResponse)
createAlbum(res)
+ // album selection
albumsContainer.addEventListener("click", e => {
// find album element
let album = e.target