-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrss_feed.html
138 lines (129 loc) · 3.86 KB
/
rss_feed.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nova Feed</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #1C1C1C;
background-image: url('/img/spacebg.gif');
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
width: 90%;
max-width: 800px;
margin: 20px;
padding: 20px;
background-color: #2C2C2C;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
h1 {
color: #FFFFFF;
text-align: center;
}
.subscribe-box {
background-color: #333;
padding: 10px;
border-radius: 10px;
text-align: center;
margin-bottom: 20px;
}
.item {
margin-bottom: 20px;
padding: 10px;
border-bottom: 1px solid #444;
}
.item-title {
font-size: 1.2em;
font-weight: bold;
}
a {
color: #1E90FF;
text-decoration: none;
}
a:visited {
color: rgb(63, 156, 71);
}
.item-link {
color: #1E90FF;
text-decoration: none;
}
.item-link:hover {
text-decoration: underline;
}
.item-link:visited {
color: rgb(63, 156, 71);
}
.item-description {
margin-top: 10px;
}
.item-pubDate {
font-size: 0.9em;
color: #AAAAAA;
}
@media (max-width: 600px) {
.container {
width: 100%;
margin: 10px;
padding: 10px;
}
.item-title {
font-size: 1em;
}
}
</style>
</head>
<body>
<div class="container">
<h1>cmdr-nova @ internet:~$: Nova Prime ░</h1>
<div class="subscribe-box">
<p>Subscribe to this feed with this url: <a href="https://mkultra.monster/rss_feed.xml" class="item-link">https://mkultra.monster/rss_feed.xml</a></p>
<p>This blog is run independently from a garage on Jupiter's moon, Io. Gotcha. You really thought I was being serious? Anyway, check out my <a href="https://www.patreon.com/c/cmdr_nova" target="_blank">Patreon</a>.</p>
<p>Visit the full website <a href="https://mkultra.monster">here</a>.</p>
</div>
<div id="feed"></div>
</div>
<script>
async function fetchRSSFeed() {
const response = await fetch('/rss_feed.xml');
const text = await response.text();
const parser = new DOMParser();
const xml = parser.parseFromString(text, 'application/xml');
const items = xml.querySelectorAll('item');
const feedContainer = document.getElementById('feed');
items.forEach(item => {
const title = item.querySelector('title').textContent;
const link = item.querySelector('link').textContent;
const description = item.querySelector('description').textContent;
const pubDate = new Date(item.querySelector('pubDate').textContent).toLocaleDateString();
const itemDiv = document.createElement('div');
itemDiv.classList.add('item');
const itemTitle = document.createElement('div');
itemTitle.classList.add('item-title');
itemTitle.innerHTML = `<a href="${link}" class="item-link">${title}</a>`;
const itemDescription = document.createElement('div');
itemDescription.classList.add('item-description');
itemDescription.innerHTML = description;
const itemPubDate = document.createElement('div');
itemPubDate.classList.add('item-pubDate');
itemPubDate.textContent = pubDate;
itemDiv.appendChild(itemTitle);
itemDiv.appendChild(itemDescription);
itemDiv.appendChild(itemPubDate);
feedContainer.appendChild(itemDiv);
});
}
fetchRSSFeed();
</script>
</body>
</html>