-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0e0e0d
commit 08ce96e
Showing
2 changed files
with
264 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,82 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Daily Dose of Music</title> | ||
|
||
<link | ||
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Press+Start+2P&display=swap" | ||
rel="stylesheet" | ||
/> | ||
|
||
<link rel="stylesheet" href="styles.css" /> | ||
</head> | ||
<body> | ||
<header> | ||
<nav> | ||
<div class="navigation"> | ||
<div class="navigation-items"> | ||
<a href="index.html">Home</a> | ||
<a href="discover.html">Discover</a> | ||
<a href="chill.html">Chill</a> | ||
</div> | ||
</div> | ||
<div class="profile"> | ||
<img src="images/photo_2024-12-13_19-27-20.jpg" alt="Avatar" /> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Daily Dose of Music</title> | ||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Press+Start+2P&display=swap" | ||
rel="stylesheet" /> | ||
<link rel="stylesheet" href="styles.css" /> | ||
</head> | ||
|
||
<body> | ||
<div class="main-content"> | ||
<div class="top-bar"> | ||
<div class="song-search"> | ||
<img src="images/search-13-128.png" alt="Search icon" /> | ||
<input type="text" placeholder="Search for songs..." /> | ||
<button class="search-button">Search</button> | ||
</div> | ||
<div class="nav-links"> | ||
<a href="index.html" class="active">Home</a> | ||
<a href="discover.html">Discover</a> | ||
<a href="chill.html">Chill</a> | ||
</div> | ||
<div class="profile-icon"></div> | ||
</div> | ||
|
||
<main> | ||
<div class="main-container"> | ||
<div class="player-card"> | ||
<div class="player-avatar"> | ||
<img src="images/avatar2.png" alt="Character" /> | ||
</div> | ||
<p>99 EXP</p> | ||
<p>LV 8</p> | ||
<div class="stars">⭐⭐⭐⭐⭐</div> | ||
<img src="images/download.jpeg" alt="Music Cover" class="cover" /> | ||
<button>▶</button> | ||
</div> | ||
|
||
<div class="title"> | ||
<h1>Daily Dose of Music <span>⭐</span></h1> | ||
<h1>Daily Dose of Music</h1> | ||
</div> | ||
<div class="button-container"> | ||
<button id="login">Login</button> | ||
<button id="signup">Sign Up</button> | ||
</div> | ||
</div> | ||
|
||
<div class="scrolling-text"> | ||
<p> | ||
(scrolling) Now playing ****** by ****** // Use headphones for best | ||
quality // Auto | ||
</p> | ||
</div> | ||
</main> | ||
</div> | ||
|
||
<script> | ||
document.querySelector('.search-button').addEventListener('click', () => { | ||
window.location.href = 'discover.html'; | ||
}); | ||
|
||
document.querySelector('.song-search input').addEventListener('keypress', (e) => { | ||
if (e.key === 'Enter') { | ||
window.location.href = 'discover.html'; | ||
} | ||
}); | ||
|
||
document.getElementById('login').addEventListener('click', () => { | ||
window.location.href = 'login.html'; | ||
}); | ||
|
||
document.getElementById('signup').addEventListener('click', () => { | ||
window.location.href = 'signup.html'; | ||
}); | ||
|
||
async function checkUserSession() { | ||
try { | ||
const response = await fetch('get_prefrences.php', { | ||
method: 'GET', | ||
credentials: 'include' | ||
}); | ||
const data = await response.json(); | ||
return data.preferences !== undefined; | ||
} catch (error) { | ||
console.error('Error checking user session:', error); | ||
return false; | ||
} | ||
} | ||
|
||
if (checkUserSession()) { | ||
document.getElementById('login').style.display = 'none'; | ||
document.getElementById('signup').style.display = 'none'; | ||
} | ||
</script> | ||
</body> | ||
|
||
<script src="script.js"></script> | ||
</body> | ||
</html> | ||
</html> |
Oops, something went wrong.