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 id="noprint" />
<br /> <p>
<p> Below are some projects that I have worked on where I found something that
Below are some projects that I have worked on where I found something was interesting enough to make a writeup and post. The full list can be
that was interesting enough to make a writeup and post. The full list viewed on my projects website
can be 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 id="noprint" />
<hr /> <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) => {
) console.log(data);
.then((data) => { const items = data.querySelectorAll("item");
console.log(data); let articles = ``;
const items = data.querySelectorAll("item"); let detailedlist = `<dl id="onlyprint">`;
let html = ``; items.forEach((el) => {
items.forEach((el) => { articles += `
html += `
<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 += `
document.body.insertAdjacentHTML("beforeend", html); <dt>
${el.querySelector("title").innerHTML}</dt>
<dd>${el.querySelector("description").innerHTML}</dd>
`;
}); });
</script> detailedlist += `</dl>`;
</div> document.body.insertAdjacentHTML("beforeend", detailedlist);
document.body.insertAdjacentHTML("beforeend", articles);
});
</script>
</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;
}