forked from radicaltherapy/radical
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patharticles.html
More file actions
264 lines (215 loc) · 10.8 KB
/
articles.html
File metadata and controls
264 lines (215 loc) · 10.8 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Inner Page - Techie Bootstrap Template</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Roboto:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top header-inner-pages">
<div class="container d-flex align-items-center justify-content-between">
<h1 class="logo"><a href="index.html">Radical Therapy Dev</a></h1>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <a href="index.html" class="logo"><img src="assets/img/logo.png" alt="" class="img-fluid"></a>-->
<nav id="navbar" class="navbar">
<ul>
<li><a class="nav-link scrollto active" href="index.html#hero">Get Radical</a></li>
<li><a class="nav-link scrollto" href="index.html#about">About</a></li>
<li><a class="nav-link scrollto" href="index.html#services">Services</a></li>
<li><a class="nav-link scrollto" href="index.html#pricing">Pricing</a></li>
<li><a href="articles.html">Articles</a></li>
<li><a class="getstarted scrollto" href="index.html#about">Get Started</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->
</div>
</header><!-- End Header -->
<main id="main">
<!-- ======= Breadcrumbs ======= -->
<section class="breadcrumbs">
<div class="container">
<div class="d-flex justify-content-between align-items-center">
<h2>Developer Articles</h2>
<ol>
<li><a href="index.html">Home</a></li>
<li>Dev Articles</li>
</ol>
</div>
</div>
</section><!-- End Breadcrumbs -->
<section class="inner-page">
<script>
// Define the RSS feed URL
const rssFeedUrl = 'https://www.buildly.io/news/feed/';
// Define the category to filter
const category = 'developer';
// Define the number of items per page
const itemsPerPage = 10;
// Fetch the RSS feed data
fetch(rssFeedUrl)
.then(response => response.text())
.then(xmlString => {
// Parse the XML data
const parser = new DOMParser();
const xml = parser.parseFromString(xmlString, 'text/xml');
console.log(xml);
// Filter the entries based on the category
const entries = Array.from(xml.getElementsByTagName('item'))
// .filter(item => Array.from(item.getElementsByTagName('category'))
// .some(cat => cat.textContent === category));
// Calculate the number of pages
const numPages = Math.ceil(entries.length / itemsPerPage);
// Get the container element for the paginated list
const container = document.getElementById('paginated-list-container');
// Generate the pagination controls
const pagination = document.createElement('nav');
pagination.innerHTML = `
<ul class="pagination justify-content-center">
${Array.from({ length: numPages }, (_, i) => `
<li class="page-item${i === 0 ? ' active' : ''}">
<a class="page-link" href="#" data-page="${i}">${i + 1}</a>
</li>
`).join('')}
</ul>
`;
container.appendChild(pagination);
// Generate the initial page of entries
generateEntriesPage(0);
// Define a function to generate a page of entries
function generateEntriesPage(pageIndex) {
// Clear the existing entries
container.querySelectorAll('.entry').forEach(entry => entry.remove());
// Get the entries for the current page
const startIndex = pageIndex * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const pageEntries = entries.slice(startIndex, endIndex);
// Generate the HTML elements for the entries
const entriesHtml = pageEntries.map(entry => `
<div class="card mb-3 entry">
<div class="card-body">
<h5 class="card-title">${entry.getElementsByTagName('title')[0].textContent}</h5>
<p class="card-text">${entry.getElementsByTagName('description')[0].textContent}</p>
<a class="button lg" href="${entry.getElementsByTagName('link')[0].textContent}">READ</a>
</div>
</div>
`).join('');
// Add the entries to the container
const entriesContainer = document.createElement('div');
entriesContainer.innerHTML = entriesHtml;
container.appendChild(entriesContainer);
}
// Attach event listeners to the pagination links
pagination.querySelectorAll('a').forEach(link => {
link.addEventListener('click', event => {
event.preventDefault();
pagination.querySelectorAll('.active').forEach(activeLink => activeLink.classList.remove('active'));
link.parentNode.classList.add('active');
generateEntriesPage(parseInt(link.getAttribute('data-page')));
});
});
});
</script>
<div id="paginated-list-container" class="container">
</div>
</section>
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="footer-top">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6 footer-contact">
<h3>Techie</h3>
<p>
A108 Adam Street <br>
New York, NY 535022<br>
United States <br><br>
<strong>Phone:</strong> +1 5589 55488 55<br>
<strong>Email:</strong> info@example.com<br>
</p>
</div>
<div class="col-lg-2 col-md-6 footer-links">
<h4>Useful Links</h4>
<ul>
<li><i class="bx bx-chevron-right"></i> <a href="#">Home</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">About us</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Services</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Terms of service</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Privacy policy</a></li>
</ul>
</div>
<div class="col-lg-3 col-md-6 footer-links">
<h4>Our Services</h4>
<ul>
<li><i class="bx bx-chevron-right"></i> <a href="#">Web Design</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Web Development</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Product Management</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Marketing</a></li>
<li><i class="bx bx-chevron-right"></i> <a href="#">Graphic Design</a></li>
</ul>
</div>
<div class="col-lg-4 col-md-6 footer-newsletter">
<h4>Join Our Newsletter</h4>
<p>Tamen quem nulla quae legam multos aute sint culpa legam noster magna</p>
<form action="" method="post">
<input type="email" name="email"><input type="submit" value="Subscribe">
</form>
</div>
</div>
</div>
</div>
<div class="container">
<div class="copyright-wrap d-md-flex py-4">
<div class="me-md-auto text-center text-md-start">
<div class="copyright">
© Copyright <strong><span>Techie</span></strong>. All Rights Reserved
</div>
<div class="credits">
<!-- All the links in the footer should remain intact. -->
<!-- You can delete the links only if you purchased the pro version. -->
<!-- Licensing information: https://bootstrapmade.com/license/ -->
<!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/techie-free-skin-bootstrap-3/ -->
Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a>
</div>
</div>
<div class="social-links text-center text-md-right pt-3 pt-md-0">
<a href="#" class="twitter"><i class="bx bxl-twitter"></i></a>
<a href="#" class="facebook"><i class="bx bxl-facebook"></i></a>
<a href="#" class="instagram"><i class="bx bxl-instagram"></i></a>
<a href="#" class="google-plus"><i class="bx bxl-skype"></i></a>
<a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a>
</div>
</div>
</div>
</footer><!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<div id="preloader"></div>
<!-- Vendor JS Files -->
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/aos/aos.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>