TAAFT
Free mode
100% free
Freemium
Free Trial
Deals
  • Website Code Generator
    Instantly create responsive websites with AI.
    Open
    Here is a complete, responsive, and well-commented single-page website template tailored for **Country Flow Radio**. It incorporates a "Country meets Surf" aesthetic using deep ocean blues and sandy leather browns. It includes the live radio player, a dropdown track selector, a video showcase, and a photo gallery. Since you are using Asura Hosting, this static HTML, CSS, and vanilla JavaScript setup will work perfectly and load lightning-fast on their servers. ### `index.html` This file contains the structure of your website, including the embedded CSS and JavaScript for simplicity. You can easily separate them into `style.css` and `script.js` files later if you prefer. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Country Flow Radio</title> <!-- Google Fonts for a mix of rustic and clean typography --> <link href="https://fonts.googleapis.com/css2?family=Rye&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet"> <style> /* CSS VARIABLES - Country Surf Theme */ :root { --ocean-blue: #023e8a; --wave-light: #00b4d8; --sand: #f4a261; --leather: #e76f51; --text-dark: #2b2d42; --bg-light: #f8f9fa; } /* RESET & BASE STYLES */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Open Sans', sans-serif; background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; } h1, h2, h3 { font-family: 'Rye', cursive; font-weight: normal; } /* HEADER */ header { background: linear-gradient(135deg, var(--ocean-blue), var(--wave-light)); color: white; padding: 2rem 1rem; text-align: center; border-bottom: 5px solid var(--sand); } .logo-placeholder { font-size: 3rem; margin-bottom: 10px; } header h1 { font-size: 2.5rem; letter-spacing: 2px; } header p { font-size: 1.2rem; font-style: italic; } /* MAIN CONTAINER */ main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; } /* SECTION STYLING */ section { background: white; border-radius: 10px; padding: 2rem; margin-bottom: 2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } h2 { color: var(--ocean-blue); margin-bottom: 1.5rem; border-bottom: 2px solid var(--sand); padding-bottom: 0.5rem; } /* RADIO PLAYERS */ .player-container { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; } .player-box { flex: 1; min-width: 300px; background: var(--bg-light); padding: 1.5rem; border-radius: 8px; border-left: 5px solid var(--leather); } audio { width: 100%; margin-top: 1rem; outline: none; } select { width: 100%; padding: 10px; margin-top: 10px; border: 1px solid #ccc; border-radius: 5px; font-family: inherit; font-size: 1rem; } /* VIDEO SECTION */ .video-wrapper { position: relative; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */ height: 0; overflow: hidden; border-radius: 8px; } .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* GALLERY SECTION */ .gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; } .gallery-item { width: 100%; height: 250px; object-fit: cover; border-radius: 8px; transition: transform 0.3s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .gallery-item:hover { transform: scale(1.03); } /* FOOTER */ footer { text-align: center; padding: 2rem; background: var(--text-dark); color: white; } /* RESPONSIVE DESIGN */ @media (max-width: 768px) { header h1 { font-size: 2rem; } .player-container { flex-direction: column; } } </style> </head> <body> <!-- HEADER --> <header> <!-- Replace this div with your actual logo image tag once uploaded --> <div class="logo-placeholder">🤠🏄‍♂️</div> <h1>Country Flow Radio</h1> <p>Catch the wave. Ride the rhythm.</p> </header> <main> <!-- MUSIC & RADIO SECTION --> <section id="music"> <h2>Tune In</h2> <div class="player-container"> <!-- LIVE STREAM PLAYER --> <div class="player-box"> <h3>🔴 Live Stream</h3> <p>Listen to Country Flow Radio live 24/7.</p> <!-- Replace the src with your actual Icecast/Shoutcast stream URL --> <audio id="live-stream" controls preload="none"> <source src="https://your-stream-url.com/stream" type="audio/mpeg"> Your browser does not support the audio element. </audio> </div> <!-- ON-DEMAND DROPDOWN PLAYER --> <div class="player-box"> <h3>🎵 On-Demand Tracks</h3> <p>Select a track from our library to play instantly.</p> <select id="song-selector" aria-label="Select a song to play"> <option value="" disabled selected>-- Choose a Song --</option> <!-- Replace values with paths to your MP3 files hosted on Asura --> <option value="audio/song1.mp3">Cowboy Surf Anthem</option> <option value="audio/song2.mp3">Sunset on the Ranch</option> <option value="audio/song3.mp3">Ocean Breeze Boots</option> </select> <audio id="dropdown-player" controls preload="none"> <source src="" type="audio/mpeg"> Your browser does not support the audio element. </audio> </div> </div> </section> <!-- LATEST VIDEO SECTION --> <section id="video"> <h2>Latest Music Video</h2> <div class="video-wrapper"> <!-- Replace the src with your YouTube/Vimeo embed link --> <iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ" title="Country Flow Radio Latest Video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> </section> <!-- COMMUNITY GALLERY SECTION --> <section id="gallery"> <h2>Community Photos</h2> <div class="gallery-grid"> <!-- Replace src with your actual image paths --> <img src="https://images.unsplash.com/photo-1520262454473-a1a82276a574?auto=format&fit=crop&w=500&q=80" alt="Beach campfire with guitar" class="gallery-item"> <img src="https://images.unsplash.com/photo-1506157786151-b8491531f063?auto=format&fit=crop&w=500&q=80" alt="Cowboy hat on a fence" class="gallery-item"> <img src="https://images.unsplash.com/photo-1502680390469-be75c86b636f?auto=format&fit=crop&w=500&q=80" alt="Surfer catching a wave" class="gallery-item"> <img src="https://images.unsplash.com/photo-1459749411175-04bf5292ceea?auto=format&fit=crop&w=500&q=80" alt="Live country music concert" class="gallery-item"> </div> </section> </main> <!-- FOOTER --> <footer> <p>&copy; <span id="year"></span> Country Flow Radio. All rights reserved.</p> </footer> <!-- JAVASCRIPT --> <script> // Set dynamic copyright year document.getElementById('year').textContent = new Date().getFullYear(); // Audio Player Logic const liveStream = document.getElementById('live-stream'); const dropdownPlayer = document.getElementById('dropdown-player'); const songSelector = document.getElementById('song-selector'); // Handle dropdown selection change songSelector.addEventListener('change', function() { const selectedSong = this.value; if (selectedSong) { // Set the audio source to the selected song dropdownPlayer.src = selectedSong; // Pause live stream if it is currently playing if (!liveStream.paused) { liveStream.pause(); } // Play the newly selected song dropdownPlayer.play(); } }); // Ensure both players don't play at the same time liveStream.addEventListener('play', function() { if (!dropdownPlayer.paused) { dropdownPlayer.pause(); } }); dropdownPlayer.addEventListener('play', function() { if (!liveStream.paused) { liveStream.pause(); } }); </script> </body> </html> ``` ### 💡 Developer Recommendations & Next Steps 1. **Hosting on Asura (cPanel):** * Log into your Asura Hosting account and open the **File Manager**. * Navigate to the `public_html` folder. * Save the code above as `index.html` and upload it there. * Create two new folders inside `public_html`: one named `audio` and another named `images`. Upload your MP3 files and photos into these folders to keep things organized. 2. **Connecting Your Live Stream:** * In the `<audio id="live-stream">` tag, replace `https://your-stream-url.com/stream` with the actual streaming link provided by your radio broadcast software (like Shoutcast, Icecast, or AzuraCast). 3. **Updating the Dropdown Songs:** * In the `<select>` element, change the `value="audio/song1.mp3"` to match the exact file names of the songs you upload to your `audio` folder. 4. **Accessibility (A11y):** * I have included `aria-label` on the dropdown menu and `alt` text on the images. When you upload your community photos, be sure to write descriptive `alt` text for visually impaired users (e.g., `alt="Fans dancing at the summer beach festival"`). 5. **Performance Optimization:** * Before uploading your community photos, run them through a free image compressor (like TinyPNG). Large image files can slow down your site, especially on mobile devices. I've utilized CSS Grid with `object-fit: cover` so your images will automatically crop beautifully regardless of their original dimensions.

Other tools

Post
0 AIs selected
Clear selection
#
Name
Task