1
0
mirror of https://gitlab.com/MisterBiggs/Resume.git synced 2025-06-16 01:16:39 +00:00

clean up some js

This commit is contained in:
Anson 2024-01-02 21:27:49 -07:00
parent fb850dbbe8
commit d575c3e0c1

View File

@ -89,8 +89,7 @@
</dl> </dl>
<dl> <dl>
<dt> <dt>
Embedded Software Engineer | United Launch Alliance | Denver, CO | Embedded Software Engineer | United Launch Alliance | Denver, CO | 2022
2022
</dt> </dt>
<dd> <dd>
<ul> <ul>
@ -130,7 +129,8 @@
</ul> </ul>
</dd> </dd>
<dt> <dt>
Undergraduate Research Lead | Orbital Debris Classification | Prescott, AZ | 2021 Undergraduate Research Lead | Orbital Debris Classification | Prescott,
AZ | 2021
</dt> </dt>
<dd> <dd>
<ul> <ul>
@ -228,17 +228,18 @@
</dl> </dl>
<h2 id="noprint">Engineering Project Writeups</h2> <h2 id="noprint">Engineering Project Writeups</h2>
<br id="noprint" /> <br id="noprint" />
<script> <div id="xml-feed-container"></div>
const RSS_URL = `https://projects.ansonbiggs.com/index.xml`;
fetch(RSS_URL) <script>
const PROJECTS_URL = `https://projects.ansonbiggs.com/index.xml`;
fetch(PROJECTS_URL)
.then((response) => response.text()) .then((response) => response.text())
.then((str) => new window.DOMParser().parseFromString(str, "text/xml")) .then((str) => new window.DOMParser().parseFromString(str, "text/xml"))
.then((data) => { .then((data) => {
console.log(data); console.log(data);
const items = data.querySelectorAll("item"); const items = data.querySelectorAll("item");
let articles = ``; let articles = ``;
let detailedlist = `<dl id="onlyprint">`;
items.forEach((el) => { items.forEach((el) => {
articles += ` articles += `
<article id="noprint">`; <article id="noprint">`;
@ -261,16 +262,8 @@
</a> </a>
</article> </article>
`; `;
detailedlist += `
<dt><a href="${el.querySelector("link").innerHTML}">
${el.querySelector("title").innerHTML}</a></dt>
<dd>${el.querySelector("description").innerHTML}</dd>
`;
}); });
detailedlist += `</dl>`; document.getElementById("xml-feed-container").innerHTML = articles;
document.body.insertAdjacentHTML("beforeend", detailedlist);
document.body.insertAdjacentHTML("beforeend", articles);
}); });
</script> </script>
</body> </body>