zenjoul80's picture
Update index.html
929e84a verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signify Music Downloader by Hawa Tunes - Download Your AI Music</title>
<meta name="description" content="A free and easy-to-use tool by Hawa Tunes to download your AI-generated music from Singify. Just paste the song link, choose your format, and optionally rename the file.">
<meta name="keywords" content="Signify, music downloader, Hawa Tunes, AI music, download mp3, download flac, Singify downloader, rename music">
<style>
/* Base styles (Mobile First) */
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #f0f2f5;
color: #333;
padding: 20px;
box-sizing: border-box;
}
header {
position: absolute;
top: 0;
left: 0;
padding: 15px;
}
.logo-container {
display: flex;
align-items: center;
text-decoration: none;
color: #1c1e21;
}
#logo-img {
width: 35px;
height: 35px;
margin-right: 8px;
border-radius: 6px;
}
#logo-text {
font-size: 1.2rem;
font-weight: bold;
}
.container {
text-align: center;
background-color: #ffffff;
padding: 30px 20px;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
max-width: 95%;
width: 450px;
}
h1 {
color: #1c1e21;
margin-bottom: 8px;
font-size: 1.8rem;
}
.byline {
font-size: 0.9rem;
font-weight: 500;
color: #606770;
margin-top: -5px;
margin-bottom: 20px;
}
p {
color: #606770;
margin-bottom: 25px;
}
input[type="text"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #dddfe2;
border-radius: 6px;
box-sizing: border-box;
font-size: 1rem;
}
/* Style for the new rename input */
#renameInput {
margin-bottom: 20px; /* Add a little more space above the format options */
}
button {
background-color: #1877f2;
color: white;
padding: 10px 18px;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 1rem;
font-weight: bold;
transition: background-color 0.3s;
width: 100%;
}
button:hover {
background-color: #166fe5;
}
#download-container a {
display: inline-block;
margin-top: 20px;
background-color: #42b72a;
color: white;
padding: 10px 20px;
border-radius: 6px;
text-decoration: none;
font-weight: bold;
transition: background-color 0.3s;
}
#download-container a:hover {
background-color: #36a420;
}
.format-selection {
display: flex;
justify-content: center;
gap: 15px;
margin-bottom: 15px;
color: #1c1e21;
font-size: 0.95rem;
}
.format-selection label {
cursor: pointer;
display: flex;
align-items: center;
font-weight: 500;
}
.format-selection input[type="radio"] {
margin-right: 6px;
transform: scale(1.0);
}
/* --- Media Query for Tablets and Desktops (Min-width: 600px) --- */
@media (min-width: 600px) {
body {
padding: 0;
}
header {
padding: 20px;
}
#logo-img {
width: 40px;
height: 40px;
margin-right: 12px;
}
#logo-text {
font-size: 1.5rem;
}
.container {
padding: 40px;
max-width: 500px;
}
h1 {
font-size: 2rem;
margin-bottom: 10px;
}
.byline {
font-size: 1rem;
margin-bottom: 25px;
}
input[type="text"] {
padding: 12px;
margin-bottom: 20px;
}
#renameInput {
margin-bottom: 20px;
}
button {
padding: 12px 20px;
font-size: 16px;
width: auto;
}
.format-selection {
gap: 25px;
margin-bottom: 20px;
font-size: 1rem;
}
}
</style>
</head>
<body>
<header>
<a href="#" class="logo-container">
<img src="hawatunes.jpg" alt="Hawa Tunes Logo" id="logo-img">
<span id="logo-text">Hawa Tunes</span>
</a>
</header>
<div class="container">
<h1>🎵 Signify Music Downloader</h1>
<p class="byline">by Hawa Tunes</p>
<p>Paste your Singify song link, rename it (optional), and select your format.</p>
<input type="text" id="songUrlInput" placeholder="e.g., https://singify.fineshare.com/song/...">
<input type="text" id="renameInput" placeholder="Rename Music (e.g., My Awesome Track)">
<div class="format-selection">
<label>
<input type="radio" name="format" value="mp3" checked>
MP3 (Standard)
</label>
<label>
<input type="radio" name="format" value="flac">
FLAC (Lossless)
</label>
</div>
<button onclick="generateDownloadLink()">Generate Download Link</button>
<div id="download-container">
</div>
</div>
<script>
function generateDownloadLink() {
const userInput = document.getElementById('songUrlInput').value;
const downloadContainer = document.getElementById('download-container');
const selectedFormat = document.querySelector('input[name="format"]:checked').value;
// NEW JS: Get the user's desired filename
const userRename = document.getElementById('renameInput').value.trim();
// Clear any previous button
downloadContainer.innerHTML = '';
if (userInput.includes('singify.fineshare.com/song/')) {
const urlParts = userInput.split('/');
const songId = urlParts[urlParts.length - 1];
// Determine the filename: use the user's input if provided, otherwise use the Song ID.
// Replace spaces with underscores for better compatibility
const filenameBase = userRename ? userRename.replace(/\s+/g, '_') : songId;
// Construct the full filename with extension
const filename = `${filenameBase}.${selectedFormat}`;
// Construct the download URL
const downloadUrl = `https://dlaudio.fineshare.net/music-generate/${songId}.${selectedFormat}`;
const downloadButton = document.createElement('a');
downloadButton.href = downloadUrl;
downloadButton.textContent = `Download ${selectedFormat.toUpperCase()}`;
// Use the new filename for the download attribute
downloadButton.setAttribute('download', filename);
downloadButton.setAttribute('target', '_blank');
downloadContainer.appendChild(downloadButton);
} else {
alert('Please enter a valid Singify song URL.');
}
}
</script>
</body>
</html>