1@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
2
3* {
1## Music Player
2
3Create beautiful UI to play music stored in the "music folder" using the HTML5 audio API
4
5## Project Specifications
1@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
2
3* {
1@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
2
3:root {
19 <nav id="navbar">
20 <div class="logo">
21 <img src="https://randomuser.me/api/portraits/men/76.jpg" alt="user" />
22 </div>
23 <ul>
48 Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia iure
49 accusamus ab consectetur eos provident ipsa est perferendis architecto.
50 Provident, quaerat asperiores. Quo esse minus repellat sapiente, impedit
51 obcaecati necessitatibus.
52 </p>
53 <p>
54 Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sapiente optio
55 officia ipsa. Cum dignissimos possimus et non provident facilis saepe!
56 </p>
1@import url('https://fonts.googleapis.com/css?family=Lato:300,500,700&display=swap');
2
3* {
6 single_mealEl = document.getElementById('single-meal');
7
8// Search meal and fetch from API
9function searchMeal(e) {
10 e.preventDefault();
18 // Check for empty
19 if (term.trim()) {
20 fetch(`https://www.themealdb.com/api/json/v1/1/search.php?s=${term}`)
21 .then(res => res.json())
22 .then(data => {
50// Fetch meal by ID
51function getMealById(mealID) {
52 fetch(`https://www.themealdb.com/api/json/v1/1/lookup.php?i=${mealID}`)
53 .then(res => res.json())
54 .then(data => {
59}
60
61// Fetch random meal from API
62function getRandomMeal() {
63 // Clear meals and heading
65 resultHeading.innerHTML = '';
66
67 fetch(`https://www.themealdb.com/api/json/v1/1/random.php`)
68 .then(res => res.json())
69 .then(data => {
1## Meal Finder App
2
3Search and generate random meals from the [themealdb.com](https://www.themealdb.com) API
4
5## Project Specifications
6
7- Display UI with form to search and button to generate
8- Connect to API and get meals
9- Display meals in DOM with image and hover effect
10- Click on meal and see the details
4const more = document.getElementById('more');
5
6const apiURL = 'https://api.lyrics.ovh';
7
8// Search by song or artist
9async function searchSongs(term) {
10 const res = await fetch(`${apiURL}/suggest/${term}`);
11 const data = await res.json();
12
57// Get lyrics for song
58async function getLyrics(artist, songTitle) {
59 const res = await fetch(`${apiURL}/v1/${artist}/${songTitle}`);
60 const data = await res.json();
61
1## LyricsSearch App
2
3Find songs, artists and lyrics using the [lyrics.ovh](https://lyrics.ovh) API
4
5## Project Specifications