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

projects now print

This commit is contained in:
Anson 2021-09-12 14:57:16 -07:00
parent 5f48b2a6d6
commit 517f13049e
3 changed files with 41 additions and 27 deletions

View File

@ -133,30 +133,28 @@
Visio, Skype Visio, Skype
</dd> </dd>
</dl> </dl>
<div id="noprint">
<h2>Projects</h2> <h2>Projects</h2>
<br /> <br id="noprint" />
<p> <p>
Below are some projects that I have worked on where I found something Below are some projects that I have worked on where I found something that
that was interesting enough to make a writeup and post. The full list was interesting enough to make a writeup and post. The full list can be
can be viewed on my projects website viewed on my projects website
<a href="https://projects.ansonbiggs.com">projects.ansonbiggs.com</a> <a href="https://projects.ansonbiggs.com">projects.ansonbiggs.com</a>
</p> </p>
<hr /> <hr id="noprint" />
<script> <script>
const RSS_URL = `https://projects.ansonbiggs.com/index.xml`; const RSS_URL = `https://projects.ansonbiggs.com/index.xml`;
fetch(RSS_URL) fetch(RSS_URL)
.then((response) => response.text()) .then((response) => response.text())
.then((str) => .then((str) => new window.DOMParser().parseFromString(str, "text/xml"))
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 html = ``; let articles = ``;
let detailedlist = `<dl id="onlyprint">`;
items.forEach((el) => { items.forEach((el) => {
html += ` articles += `
<article id="noprint"> <article id="noprint">
<a href="${ <a href="${
el.querySelector("link").innerHTML el.querySelector("link").innerHTML
@ -173,10 +171,16 @@
</a> </a>
</article> </article>
`; `;
detailedlist += `
<dt>
${el.querySelector("title").innerHTML}</dt>
<dd>${el.querySelector("description").innerHTML}</dd>
`;
}); });
document.body.insertAdjacentHTML("beforeend", html); detailedlist += `</dl>`;
document.body.insertAdjacentHTML("beforeend", detailedlist);
document.body.insertAdjacentHTML("beforeend", articles);
}); });
</script> </script>
</div>
</body> </body>
</html> </html>

View File

@ -21,3 +21,8 @@ h2::after {
display: none; display: none;
visibility: hidden; visibility: hidden;
} }
#onlyprint {
display: block;
visibility: visible;
}

View File

@ -84,3 +84,8 @@ article > a > p {
box-shadow: 0 0 0 20px rgba(0, 0, 0, 0); box-shadow: 0 0 0 20px rgba(0, 0, 0, 0);
} }
} }
#onlyprint {
visibility: hidden;
display: none;
}