Awesome Playlist Maker
About this app
Create awesome playlists with the Awesome Playlist Maker app.
Awesome Playlist Maker Create an Awesome Playlist Add to Playlist
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Awesome Playlist Maker</title>
<meta name="description" content="Create awesome playlists with the Awesome Playlist Maker app.">
<meta name="keywords" content="playlist, music, songs, tracks, create, maker">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Function to add a new song to the playlist
function addSong() {
var songName = $("#song-name").val();
var artistName = $("#artist-name").val();
// Check if both inputs are filled
if (songName && artistName) {
var songItem = $("<li>").addClass("list-group-item");
var songTitle = $("<h5>").addClass("mb-1").text(songName);
var artist = $("<p>").addClass("mb-1").text("By " + artistName);
songItem.append(songTitle, artist);
$("#playlist").append(songItem);
// Clear the input fields
$("#song-name").val("");
$("#artist-name").val("");
}
}
// Event listener for the add button
$("#add-btn").click(function() {
addSong();
});
// Event listener for the enter key
$("#artist-name").keypress(function(e) {
if (e.which === 13) {
addSong();
}
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
font-family: 'Roboto', sans-serif;
background-color: #f5f5f5;
}
.container {
max-width: 500px;
margin: 0 auto;
padding: 20px;
}
h1 {
text-align: center;
margin-bottom: 30px;
color: #333333;
}
.form-group {
margin-bottom: 20px;
}
.form-control {
border-radius: 0;
}
.btn {
border-radius: 0;
}
#playlist {
margin-top: 30px;
}
.list-group-item {
background-color: #ffffff;
border: none;
border-radius: 0;
padding: 10px;
margin-bottom: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.list-group-item h5 {
margin-bottom: 5px;
color: #333333;
}
.list-group-item p {
color: #666666;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Create an Awesome Playlist</h1>
<div class="form-group">
<input id="song-name" type="text" class="form-control" placeholder="Song Name">
</div>
<div class="form-group">
<input id="artist-name" type="text" class="form-control" placeholder="Artist Name">
</div>
<button id="add-btn" class="btn btn-primary">Add to Playlist</button>
<ul id="playlist" class="list-group"></ul>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!