99 lines
2.4 KiB
HTML
99 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>AI/ML Feeds - CodexScrolls</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<style>
|
|
body {
|
|
background: #0d0d0d;
|
|
color: #e0e0e0;
|
|
font-family: "Inter", sans-serif;
|
|
margin: 2em;
|
|
}
|
|
|
|
h1 {
|
|
color: #4c6fff;
|
|
font-size: 2em;
|
|
margin-bottom: 0.2em;
|
|
}
|
|
|
|
.feed-section {
|
|
margin-top: 2em;
|
|
}
|
|
|
|
h2 {
|
|
color: #76a8ff;
|
|
margin-bottom: 0.5em;
|
|
border-bottom: 1px solid #222;
|
|
padding-bottom: 0.3em;
|
|
}
|
|
|
|
ul.feed-list {
|
|
list-style: none;
|
|
padding-left: 0;
|
|
}
|
|
|
|
ul.feed-list li {
|
|
margin: 0.4em 0;
|
|
}
|
|
|
|
a {
|
|
color: #a2c5ff;
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.error {
|
|
color: #ff4c4c;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>AI/ML News Feeds</h1>
|
|
|
|
<div id="feeds-container"></div>
|
|
|
|
<script>
|
|
const feeds = [
|
|
{ title: "OpenAI", url: "https://openai.com/blog/rss" },
|
|
{ title: "Google AI Blog", url: "https://ai.googleblog.com/feeds/posts/default" },
|
|
{ title: "DeepMind", url: "https://www.deepmind.com/blog/rss.xml" },
|
|
{ title: "AI Weekly", url: "https://aiweekly.co/feed" },
|
|
{ title: "Machine Learning Mastery", url: "https://machinelearningmastery.com/blog/feed/" }
|
|
];
|
|
|
|
const container = document.getElementById('feeds-container');
|
|
|
|
feeds.forEach(feed => {
|
|
const section = document.createElement('div');
|
|
section.className = 'feed-section';
|
|
section.innerHTML = '<h2>' + feed.title + '</h2><ul class="feed-list" id="list-' + feed.title.replace(/\s+/g, '') + '"><li>Loading...</li></ul>';
|
|
container.appendChild(section);
|
|
|
|
fetch('https://api.rss2json.com/v1/api.json?rss_url=' + encodeURIComponent(feed.url))
|
|
.then(res => res.json())
|
|
.then(data => {
|
|
const list = document.getElementById('list-' + feed.title.replace(/\s+/g, ''));
|
|
list.innerHTML = '';
|
|
data.items.slice(0, 5).forEach(item => {
|
|
const li = document.createElement('li');
|
|
li.innerHTML = '<a href="' + item.link + '" target="_blank">' + item.title + '</a>';
|
|
list.appendChild(li);
|
|
});
|
|
})
|
|
.catch(error => {
|
|
console.error(error);
|
|
const list = document.getElementById('list-' + feed.title.replace(/\s+/g, ''));
|
|
list.innerHTML = '<li class="error">Failed to load feed.</li>';
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|