Skip to content

Commit

Permalink
Merge pull request #112 from summea/issue-111
Browse files Browse the repository at this point in the history
Issue #111
  • Loading branch information
summea authored Mar 20, 2022
2 parents ee577be + 76ceea0 commit 38a1fd9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ function openAlbum(event, albumId) {
let li = document.createElement("li");
let link = document.createElement("a");
let linkText = document.createTextNode(song.name);
let downloadLink = document.createElement("a");
let downloadLinkImg = document.createElement("i");
link.id = "song_" + i;
link.href = song.url;
link.className = "song";
Expand All @@ -655,6 +657,11 @@ function openAlbum(event, albumId) {
});
li.value = song.albumSongNumber;
li.append(link);
downloadLink.href = song.url;
// ref: https://icons.getbootstrap.com/icons/download/
downloadLinkImg.className = "bi bi-download songDownloadButton";
downloadLink.append(downloadLinkImg);
li.append(downloadLink);
songList.querySelector("ol").append(li);
i++;
});
Expand Down
4 changes: 4 additions & 0 deletions css/audio.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ body {
flex-direction: row;
}

.songDownloadButton {
margin-left: 10px;
}

.randomDisabled {
color: #000;
}
Expand Down

0 comments on commit 38a1fd9

Please sign in to comment.