Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Radio Internetowe</title>
- <style>
- body {
- margin: 0;
- font-family: Arial, sans-serif;
- background: linear-gradient(to bottom, #1a2a6c, #b21f1f, #fdbb2d);
- color: #fff;
- text-align: center;
- }
- header {
- background: #1f1f1f;
- padding: 1rem;
- position: sticky;
- top: 0;
- z-index: 1000;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .logo {
- height: 50px;
- margin-left: 1rem;
- }
- .menu-icon {
- display: none;
- font-size: 2rem;
- cursor: pointer;
- margin-right: 1rem;
- color: #fff;
- }
- nav {
- display: flex;
- justify-content: center;
- gap: 1rem;
- }
- nav a {
- color: #fff;
- text-decoration: none;
- font-size: 1rem;
- padding: 0.5rem 1rem;
- border: 1px solid #fff;
- border-radius: 5px;
- transition: background 0.3s, transform 0.2s;
- }
- nav a:hover {
- background: #fdbb2d;
- color: #000;
- transform: scale(1.1);
- }
- nav.mobile {
- display: none;
- flex-direction: column;
- position: absolute;
- top: 100%;
- left: 0;
- width: 100%;
- background: #1f1f1f;
- z-index: 1001;
- }
- nav.mobile a {
- padding: 1rem;
- border: none;
- }
- nav.mobile.show {
- display: flex;
- }
- section {
- margin: 2rem auto;
- padding: 1.5rem;
- background: rgba(0, 0, 0, 0.5);
- border-radius: 10px;
- width: 90%;
- max-width: 600px;
- }
- audio {
- width: 100%;
- outline: none;
- margin-top: 1rem;
- }
- .info {
- margin-top: 1rem;
- font-size: 1.2rem;
- font-weight: bold;
- animation: fade-in-out 3s infinite;
- }
- .contact-form {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- text-align: left;
- }
- .contact-form label {
- font-size: 1rem;
- font-weight: bold;
- }
- .contact-form input, .contact-form textarea, .contact-form button {
- width: 100%;
- padding: 0.8rem;
- font-size: 1rem;
- border: none;
- border-radius: 5px;
- box-sizing: border-box;
- }
- .contact-form input, .contact-form textarea {
- background: #fff;
- color: #000;
- }
- .contact-form button {
- background: #fdbb2d;
- color: #000;
- font-weight: bold;
- cursor: pointer;
- transition: background 0.3s;
- }
- .contact-form button:hover {
- background: #e8a922;
- }
- .contact-form {
- max-width: 500px;
- margin: auto;
- }
- footer {
- margin-top: 2rem;
- padding: 1rem;
- background: #000;
- color: #ccc;
- text-align: center;
- }
- @keyframes fade-in-out {
- 0% { opacity: 0; }
- 50% { opacity: 1; }
- 100% { opacity: 0; }
- }
- @media (max-width: 768px) {
- .menu-icon {
- display: block;
- }
- nav.desktop {
- display: none;
- }
- }
- </style>
- </head>
- <body>
- <header>
- <img src="logo.png" alt="Logo Radia" class="logo">
- <h1>Radio Internetowe</h1>
- <div class="menu-icon" onclick="toggleMenu()">☰</div>
- <nav class="desktop">
- <a href="#home">Strona główna</a>
- <a href="#about">O nas</a>
- <a href="#schedule">Ramówka</a>
- <a href="#forum">Forum</a>
- <a href="#chat">Czat</a>
- <a href="#contact">Kontakt</a>
- </nav>
- <nav class="mobile" id="mobile-menu">
- <a href="#home">Strona główna</a>
- <a href="#about">O nas</a>
- <a href="#schedule">Ramówka</a>
- <a href="#forum">Forum</a>
- <a href="#chat">Czat</a>
- <a href="#contact">Kontakt</a>
- </nav>
- </header>
- <section id="home">
- <h2>Witamy w naszym radiu!</h2>
- <p>Muzyka na każdą okazję, audycje prowadzone przez profesjonalnych DJ-ów.</p>
- </section>
- <section id="player">
- <h2>Odtwarzacz</h2>
- <audio controls>
- <source src="https://s1.slotex.pl/shoutcast/7614/stream?sid=1" type="audio/mpeg">
- Twoja przeglądarka nie obsługuje odtwarzacza audio.
- </audio>
- <div class="info">
- <p id="dynamic-info">Ładowanie danych...</p>
- </div>
- </section>
- <section id="about">
- <h2>O nas</h2>
- <p>Nasze radio to pasja, profesjonalizm i miłość do muzyki. Dołącz do naszej społeczności i ciesz się najlepszymi audycjami!</p>
- </section>
- <section id="schedule">
- <h2>Ramówka</h2>
- <p>Szczegółowy harmonogram audycji dostępny wkrótce.</p>
- </section>
- <section id="forum">
- <h2>Forum</h2>
- <p>Wymieniaj się opiniami, poznawaj innych słuchaczy i dziel się pasją do muzyki na naszym forum!</p>
- </section>
- <section id="chat">
- <h2>Czat</h2>
- <p>Rozmawiaj na żywo z innymi słuchaczami i prowadzącymi audycje.</p>
- </section>
- <section id="contact">
- <h2>Kontakt</h2>
- <form class="contact-form">
- <label for="name">Imię:</label>
- <input type="text" id="name" name="name" placeholder="Twoje imię" required>
- <label for="email">Email:</label>
- <input type="email" id="email" name="email" placeholder="Twój email" required>
- <label for="message">Wiadomość:</label>
- <textarea id="message" name="message" rows="5" placeholder="Twoja wiadomość" required></textarea>
- <button type="submit">Wyślij</button>
- </form>
- </section>
- <footer>
- © 2025 Radio Internetowe. Wszystkie prawa zastrzeżone.
- </footer>
- <script>
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1
- const shoutcastUrl = "http
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1";
- async function updateShoutcastInfo() {
- try {
- const response = await fetch(shoutcastUrl, {
- method: 'GE
- const shoutcastUrl = "http://twoja-domena:8000/stats?sid=1";
- async function updateShoutcastInfo() {
- try {
- const response = await fetch(shoutcastUrl, {
- method: 'GET',
- mode: 'cors'
- });
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const text = await response.text();
- // Parse XML response (assuming Shoutcast server provides XML stats)
- const parser = new DOMParser();
- const xmlDoc = parser.parseFromString(text, "text/xml
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1";
- async function updateShoutcastInfo() {
- try {
- const response = await fetch(shoutcastUrl, {
- method: 'GET',
- mode: 'cors'
- });
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const text = await response.text();
- // Parse XML response (assuming Shoutcast server provides XML stats)
- const parser = new DOMParser();
- const xmlDoc = parser.parseFromString(text, "text/xml");
- const songTitle = xmlDoc.getElementsByTagName("
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1";
- async function updateShoutcastInfo() {
- try {
- const response = await fetch(shoutcastUrl, {
- method: 'GET',
- mode: 'cors'
- });
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const text = await response.text();
- // Parse XML response (assuming Shoutcast server provides XML stats)
- const parser = new DOMParser();
- const xmlDoc = parser.parseFromString(text, "text/xml");
- const songTitle = xmlDoc.getElementsByTagName("CURRENTSONG")[0]?.textContent || "Brak danych";
- const listeners = xmlDoc.getElementsByTagName("C
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1";
- async function updateShoutcastInfo() {
- try {
- const response = await fetch(shoutcastUrl, {
- method: 'GET',
- mode: 'cors'
- });
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const text = await response.text();
- // Parse XML response (assuming Shoutcast server provides XML stats)
- const parser = new DOMParser();
- const xmlDoc = parser.parseFromString(text, "text/xml");
- const songTitle = xmlDoc.getElementsByTagName("CURRENTSONG")[0]?.textContent || "Brak danych";
- const listeners = xmlDoc.getElementsByTagName("CURRENTLISTENERS")[0]?.textContent || "0";
- const djName = xmlDoc.getElementsByTagName("DJ")[0]?.textContent || "Nieznany prowadzący";
- const infoDiv = document.getElementById('dynamic-info
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1";
- async function updateShoutcastInfo() {
- try {
- const response = await fetch(shoutcastUrl, {
- method: 'GET',
- mode: 'cors'
- });
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const text = await response.text();
- // Parse XML response (assuming Shoutcast server provides XML stats)
- const parser = new DOMParser();
- const xmlDoc = parser.parseFromString(text, "text/xml");
- const songTitle = xmlDoc.getElementsByTagName("CURRENTSONG")[0]?.textContent || "Brak danych";
- const listeners = xmlDoc.getElementsByTagName("CURRENTLISTENERS")[0]?.textContent || "0";
- const djName = xmlDoc.getElementsByTagName("DJ")[0]?.textContent || "Nieznany prowadzący";
- const infoDiv = document.getElementById('dynamic-info');
- infoDiv.innerHTML = `
- <p>Audycja: ${songTitle}</p>
- <p>Słuchacze: ${listeners}</p>
- <p>Prowadzący: ${djName}</p>
- `;
- } catch (error) {
- console.error('Error fetching Shoutcast stats:', error);
- const infoDiv = document.getElementById('dynamic-info');
- infoDiv.textContent = "Błąd w ładowaniu danych.";
- }
- }
- // Update Shoutcast info every 15 seconds
- setInterval(updateShoutcastInfo, 15000);
- updateShoutcastInfo(); // Initial fetch
- </script>
- <script>
- // Poprawiony skrypt dla rozwijanego menu
- function toggleMenu() {
- const menu = document.getElementById('mobile-menu');
- menu.classList.toggle('show');
- }
- // Pobieranie danych Shoutcast (opcjonalne, tylko przykład do użycia w przyszłości)
- const shoutcastUrl = "https://s1.slotex.pl/shoutcast/7614/stream?sid=1";
- async function fetchShoutcastData() {
- try {
- const response = await fetch(shoutcastUrl);
- const data = await response.json();
- document.getElementById('dynamic-info').innerText = `Audycja: ${data.current_song}, Prowadzący: ${data.dj_name}, Słuchacze: ${data.listeners}`;
- } catch (error) {
- document.getElementById('dynamic-info').innerText = 'Nie można załadować danych.';
- }
- }
- // Inicjalizacja danych Shoutcast
- document.addEventListener('DOMContentLoaded', () => {
- fetchShoutcastData();
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement