Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Empty file modified README.md
100644 → 100755
Empty file.
69 changes: 69 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
var albumArt = $.get("http://0.0.0.0:8000/music.json");
albumArt.done(function(data) {
var albumInfo = (data.results);

//-----------------------------------------------------------
// RANDOMIZE ALBUM ORDER
for (var i = albumInfo.length - 1, j = 0, temp = null; i > 0; i--) {
j = Math.floor(Math.random() * (i + 1));
temp = albumInfo[i];
albumInfo[i] = albumInfo[j];
albumInfo[j] = temp;
}
//------------------------------------------------------------

//------------------------------------------------------------
//SORTS ALBUMS BY ARTIST AND ALBUM TITLE
var sortedAlbums = albumInfo.map(a => Object.assign({}, a));
sortedAlbums = sortedAlbums.sort(function(a, b) {
if (a.artist < b.artist) {
return -1;
} else if (a.artist === b.artist) {
if (a.title < b.title) {
return -1;
} else {
return 1;
}
} else {
return 1;
}
})
//-------------------------------------------------------------


for (i = 0; i < sortedAlbums.length; i++) {
$("#thumbnails").append(`
<div class='thumbnails'>
<img src='images/${sortedAlbums[i].cover_art}'></div>
`);
};
$("#thumbnails .thumbnails").click(function() {
var infoForFind = $(event.target).attr("src").replace('images/', '');
var found = albumInfo.find(function(value) {
return value.cover_art === infoForFind;
});
$(".text").append(`
${found.artist} - ${found.title}<br>
`);
});
for (var k = 0; k < 3; k++) {
var divID = "album" + (k + 1);

$(".right").append(`
<div id=${divID} class="albumArt">
<img src="images/${albumInfo[k].cover_art}">
</div>
`);
}
$("#clear-tracks").click(function() {
$(".text").empty();
});
});
$("#submit-bin").click(function() {
var inputData = $(".text").val();
console.log(inputData);
$.post("https://lit-fortress-6467.herokuapp.com/post", inputData, function() {
alert('got it');
})
$(".text").empty();
});
Empty file modified images/21.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2112.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/a_farewell_to_kings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/all_that_you_cant_leave_behind.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/caress_of_steel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/clockwork_angels.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/color_and_the_shape.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/counterparts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/empire.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/face_value.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fly_by_night.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/genesis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/ghost_in_the_machine.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/grace_under_pressure.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hemispheres.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hold_your_fire.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/human_clay.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hysteria.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/invisible_touch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/kilroy_was_here.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/leftoverture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/moving_pictures.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/my_own_prison.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/no_jacket_required.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/permanent_waves.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/power_windows.jpg
Binary file added images/pyromania.jpg
Empty file modified images/red.jpg
100644 → 100755
Binary file added images/roll_the_bones.jpg
Binary file added images/rush.jpg
Binary file added images/secret_samadhi.jpg
Binary file added images/signals.jpg
Binary file added images/sixteen_stone.jpg
Binary file added images/slippery_when_wet.jpg
Binary file added images/snakes_and_arrows.jpg
Binary file added images/test_for_echo.jpg
Binary file added images/the_better_life.jpg
File renamed without changes
Binary file added images/the_joshua_tree.jpg
Empty file modified images/thriller.jpg
100644 → 100755
Empty file modified images/thriller.png
100644 → 100755
Binary file added images/throwing_copper.jpg
Binary file added images/vapor_trails.jpg
48 changes: 36 additions & 12 deletions index.html
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<select name="my_select" style="height: 40px; line-height: 100px;">
<option name="reggae"> Select your genre </option>
<option name="reggae"> Reggae </option>
<option name="blues"> Blues </option>
</select>

</body>

<head>
<meta charset="utf-8">
<title></title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script type="text/javascript" src="app.js" defer>
</script>
<link rel="stylesheet" href="style.css">
</head>

<body>
<div class="container">
<header>
</header>
<main>
<section class="left">
<div class="trackbin">
<div class="trackbin-text">
track bin
</div>
<a href='playlist.html'><button type="button" name="button">choose tracks</button></a>
</div>
</section>
<section class="right">
<div class="album_list">
</div>
</section>
</main>
<footer>
<div class="footer_text">&copy;2017 Tom Martin

</div>
</footer>
</div>
</body>

</html>
Empty file modified mockups/playlist_page.png
100644 → 100755
Empty file modified mockups/playlist_stretch2.fw.png
100644 → 100755
Empty file modified mockups/splash_page.png
100644 → 100755
248 changes: 248 additions & 0 deletions music.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
{
"results": [{
"id": 1,
"title": "Moving Pictures",
"artist": "Rush",
"cover_art": "moving_pictures.jpg"
},
{
"id": 2,
"title": "The Joshua Tree",
"artist": "U2",
"cover_art": "the_joshua_tree.jpg"
},
{
"id": 3,
"title": "Empire",
"artist": "Queensryche",
"cover_art": "empire.jpg"
},
{
"id": 4,
"title": "All That You Can't Leave Behind",
"artist": "U2",
"cover_art": "all_that_you_cant_leave_behind.jpg"
},
{
"id": 5,
"title": "Left Overture",
"artist": "Kansas",
"cover_art": "leftoverture.jpg"
},
{
"id": 6,
"title": "Signals",
"artist": "Rush",
"cover_art": "signals.jpg"
},
{
"id": 7,
"title": "The Colour and the Shape",
"artist": "Foo Fighters",
"cover_art": "color_and_the_shape.jpg"
},
{
"id": 8,
"title": "Face Value",
"artist": "Phil Collins",
"cover_art": "face_value.jpg"
},
{
"id": 9,
"title": "Genesis",
"artist": "Genesis",
"cover_art": "genesis.jpg"
},
{
"id": 10,
"title": "Human Clay",
"artist": "Creed",
"cover_art": "human_clay.jpg"
},
{
"id": 11,
"title": "Hysteria",
"artist": "Def Leppard",
"cover_art": "hysteria.jpg"
},
{
"id": 12,
"title": "Invisible Touch",
"artist": "Genesis",
"cover_art": "invisible_touch.jpg"
},
{
"id": 13,
"title": "Kilroy Was Here",
"artist": "Styx",
"cover_art": "kilroy_was_here.jpg"
},
{
"id": 14,
"title": "My Own Prison",
"artist": "Creed",
"cover_art": "my_own_prison.jpg"
},
{
"id": 15,
"title": "No Jacket Required",
"artist": "Phil Collins",
"cover_art": "no_jacket_required.jpg"
},
{
"id": 16,
"title": "Pyromania",
"artist": "Def Leppard",
"cover_art": "pyromania.jpg"
},
{
"id": 17,
"title": "Slippery When Wet",
"artist": "Bon Jovi",
"cover_art": "slippery_when_wet.jpg"
},
{
"id": 18,
"title": "The Better Life",
"artist": "3 Doors Down",
"cover_art": "the_better_life.jpg"
},
{
"id": 19,
"title": "Ghost in the Machine",
"artist": "The Police",
"cover_art": "ghost_in_the_machine.jpg"
},
{
"id": 20,
"title": "Red",
"artist": "Black Uhuru",
"cover_art": "red.jpg"
},
{
"id": 21,
"title": "The Division Bell",
"artist": "Pink Floyd",
"cover_art": "the_division_bell.jpg"
},
{
"id": 22,
"title": "Thriller",
"artist": "Michael Jackson",
"cover_art": "thriller.jpg"
},
{
"id": 23,
"title": "21",
"artist": "Adele",
"cover_art": "21.jpg"
},
{
"id": 24,
"title": "Vapor Trails",
"artist": "Rush",
"cover_art": "vapor_trails.jpg"
},
{
"id": 25,
"title": "Snakes and Arrows",
"artist": "Rush",
"cover_art": "snakes_and_arrows.jpg"
},
{
"id": 26,
"title": "Roll the Bones",
"artist": "Rush",
"cover_art": "roll_the_bones.jpg"
},
{
"id": 27,
"title": "Hold Your Fire",
"artist": "Rush",
"cover_art": "hold_your_fire.jpg"
},
{
"id": 28,
"title": "Caress of Steel",
"artist": "Rush",
"cover_art": "caress_of_steel.jpg"
},
{
"id": 29,
"title": "Counterparts",
"artist": "Rush",
"cover_art": "counterparts.jpg"
},
{
"id": 30,
"title": "Hemispheres",
"artist": "Rush",
"cover_art": "hemispheres.jpg"
},
{
"id": 31,
"title": "Power Windows",
"artist": "Rush",
"cover_art": "power_windows.jpg"
},
{
"id": 32,
"title": "Clockwork Angels",
"artist": "Rush",
"cover_art": "clockwork_angels.jpg"
},
{
"id": 33,
"title": "Fly by Night",
"artist": "Rush",
"cover_art": "fly_by_night.jpg"
},
{
"id": 34,
"title": "A Farewell to Kings",
"artist": "Rush",
"cover_art": "a_farewell_to_kings.jpg"
},
{
"id": 35,
"title": "Test for Echo",
"artist": "Rush",
"cover_art": "test_for_echo.jpg"
},
{
"id": 36,
"title": "Grace Under Pressure",
"artist": "Rush",
"cover_art": "grace_under_pressure.jpg"
},
{
"id": 37,
"title": "Permanent Waves",
"artist": "Rush",
"cover_art": "permanent_waves.jpg"
},
{
"id": 38,
"title": "2112",
"artist": "Rush",
"cover_art": "2112.jpg"
},
{
"id": 39,
"title": "Secret Samadhi",
"artist": "Live",
"cover_art": "secret_samadhi.jpg"
}, {
"id": 40,
"title": "Throwing Copper",
"artist": "Live",
"cover_art": "throwing_copper.jpg"
},
{
"id": 41,
"title": "Sixteen Stone",
"artist": "Bush",
"cover_art": "sixteen_stone.jpg"
}
]
}
Loading