[    [    [    [    [    [    [    b l o g g i n   s p a c e    wiki   ]    ]    ]    ]    ]    ]    ]

Difference between revisions of "Football"

From blogginpedia
Jump to navigation Jump to search
Tag: Manual revert
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
<html>
<iframe src="https://lotusgamehd.xyz/lotushd.php?hd=260" width="81%" height="500" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" allowfullscreen="yes"></iframe>
<center>
 
<iframe src="/wiki/lotus-links.php" width="70%" height="1950" frameborder="0" style="border-radius:8px;"></iframe>
<div id="lotus-links" style="font-family: Arial, sans-serif; padding: 10px; max-width: 100%;"></div>
</center>
 
<script>
document.addEventListener('DOMContentLoaded', function() {
  const container = document.getElementById('lotus-links');
  container.innerHTML = '<p>Loading streams...</p>'; // Show loading
 
  fetch('https://lotusgamehd.xyz/api-event.php')
    .then(response => {
      if (!response.ok) throw new Error('API unavailable');
      return response.json();
    })
    .then(data => {
      if (!data.days || data.days.length === 0) throw new Error('No events found');
 
      // Extract stream links only
      const links = [];
      data.days.forEach(day => {
        day.items.forEach(event => {
          if (event.streams && event.streams.length > 0) {
            const stream = event.streams[0]; // First stream
            links.push({
              url: stream.link,
              title: event.title,
              league: (event.league || 'Unknown').toUpperCase(),
              time: event.when_et ? event.when_et.split(' ')[1] : '', // e.g., "20:20"
              status: event.status === 'LIVE' ? '🔴 LIVE' : '⏰ UPCOMING'
            });
          }
        });
      });
 
      if (links.length === 0) {
        container.innerHTML = '<p style="color: orange;">No streams available right now.</p>';
        return;
      }
 
      // Sort: LIVE first
      links.sort((a, b) => (b.status.includes('LIVE') ? 1 : 0) - (a.status.includes('LIVE') ? 1 : 0));
 
      // Render as responsive cards
      container.innerHTML = `
        <h3 style="margin: 0 0 10px 0; color: #333;">🔗 Active Streams (${links.length})</h3>
        <div style="display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));">
          ${links.map(link => `
            <a href="${link.url}" target="_blank" rel="noopener"
              style="display: block; padding: 12px; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                      border: 1px solid #dee2e6; border-radius: 8px; text-decoration: none;
                      color: #212529; font-weight: 500; transition: box-shadow 0.2s;
                      box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
              <div style="font-size: 0.85em; color: #6c757d; margin-bottom: 4px;">
                ${link.status} • ${link.league} • ${link.time}
              </div>
              <div style="font-size: 1em; color: #212529;">${link.title}</div>
            </a>
          `).join('')}
        </div>
        <p style="font-size: 0.8em; color: #6c757d; margin-top: 15px; text-align: right;">
          Updated: ${new Date().toLocaleString('en-US', { timeZone: 'America/New_York', hour12: true })} ET
        </p>
      `;
    })
    .catch(error => {
      console.error('Fetch error:', error); // For debugging
      container.innerHTML = `<p style="color: red;">Failed to load streams: ${error.message}.
                              <br><small>Check console (F12) for details or try refreshing.</small></p>`;
    });
});
</script>
 
</html>
</html>
[[Category:Sports]][[Category:Video]]
[[Category:Sports]][[Category:Video]]

Latest revision as of 02:14, 17 November 2025