mirror of
https://gitlab.com/MisterBiggs/Resume.git
synced 2025-06-16 01:16:39 +00:00
updating projects website broke the feed
This commit is contained in:
parent
9e6722ba04
commit
4fff053674
@ -224,45 +224,5 @@
|
|||||||
>
|
>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h2 id="noprint">Engineering Project Writeups</h2>
|
|
||||||
<br id="noprint" />
|
|
||||||
<div id="xml-feed-container"></div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const PROJECTS_URL = `https://projects.ansonbiggs.com/index.xml`;
|
|
||||||
|
|
||||||
fetch(PROJECTS_URL)
|
|
||||||
.then((response) => response.text())
|
|
||||||
.then((str) => new window.DOMParser().parseFromString(str, "text/xml"))
|
|
||||||
.then((data) => {
|
|
||||||
console.log(data);
|
|
||||||
const items = data.querySelectorAll("item");
|
|
||||||
let articles = ``;
|
|
||||||
items.forEach((el) => {
|
|
||||||
articles += `
|
|
||||||
<article id="noprint">`;
|
|
||||||
try {
|
|
||||||
articles += `<a href="${
|
|
||||||
el.querySelector("link").innerHTML
|
|
||||||
}" target="_blank" rel="noopener">
|
|
||||||
<img src="${el
|
|
||||||
.querySelector("content")
|
|
||||||
.getAttribute("url")}" alt="Post Thumbnail">
|
|
||||||
</a>`;
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
articles += ` <a href="${
|
|
||||||
el.querySelector("link").innerHTML
|
|
||||||
}" target="_blank" rel="noopener">
|
|
||||||
<h3>${el.querySelector("title").innerHTML}</h3>
|
|
||||||
<p>${el.querySelector("description").innerHTML}</p>
|
|
||||||
</a>
|
|
||||||
</article>
|
|
||||||
`;
|
|
||||||
});
|
|
||||||
document.getElementById("xml-feed-container").innerHTML = articles;
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user