restructured to public folder
This commit is contained in:
parent
43addb92a2
commit
83737bd3a6
101 changed files with 2945 additions and 8373 deletions
|
|
@ -1,83 +0,0 @@
|
|||
<header id="navigation">
|
||||
<nav>
|
||||
<ul>
|
||||
<li id="home-nav">
|
||||
<a href="/" title="To Homepage">
|
||||
<i class="fa-solid fa-house"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li id="portfolio-nav">
|
||||
<a href="/portfolio/" title="Portfolio">Portfolio</a>
|
||||
</li>
|
||||
<li id="workflows-nav">
|
||||
<a href="/workflows/" title="Workflows">Workflows</a>
|
||||
</li>
|
||||
<li id="blog-nav">
|
||||
<a href="/blog/" title="Blog">Blog</a>
|
||||
</li>
|
||||
<li id="contact-nav">
|
||||
<a href="/contact/" title="Contact">Kontakt</a>
|
||||
</li>
|
||||
<li id="install-button">
|
||||
<a title="Install this website as a PWA">
|
||||
<i class="fa-solid fa-download"></i><span style="padding-left: 10px">Installieren</span>
|
||||
</a>
|
||||
</li>
|
||||
<li id="github-nav">
|
||||
<a href="https://github.com/LucaJunge" title="GitHub profile">
|
||||
<i class="fa-brands fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li id="menu-button">
|
||||
<a title="Show or hide menu">
|
||||
<i class="fa fa-solid fa-bars"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
<script>
|
||||
let menuButton = document.querySelector("#menu-button a")
|
||||
let icon = document.querySelector("#menu-button a i")
|
||||
|
||||
menuButton.addEventListener("click", () => {
|
||||
let isOpen = document.querySelector("#navigation").classList.toggle("open")
|
||||
|
||||
if(isOpen) {
|
||||
icon.classList.remove("fa-bars")
|
||||
icon.classList.add("fa-chevron-up") // or "chevron-up"
|
||||
} else {
|
||||
icon.classList.remove("fa-chevron-up")
|
||||
icon.classList.add("fa-bars")
|
||||
}
|
||||
})
|
||||
|
||||
// PWA Installation Prompting
|
||||
let installPrompt = null
|
||||
const installButton = document.querySelector("#install-button")
|
||||
|
||||
window.addEventListener("beforeinstallprompt", (event) => {
|
||||
event.preventDefault() // prevent browser from showing its own install UI
|
||||
installPrompt = event
|
||||
installButton.style.display = "initial";
|
||||
})
|
||||
|
||||
// Add our own install logic
|
||||
installButton.addEventListener("click", async() => {
|
||||
if(!installPrompt) {
|
||||
return
|
||||
}
|
||||
|
||||
const result = await installPrompt.prompt()
|
||||
installPrompt = null
|
||||
installButton.style.display = "none"
|
||||
})
|
||||
|
||||
// if the app is installed (already), hide the install button
|
||||
window.addEventListener("appinstalled", () => {
|
||||
installPrompt = null
|
||||
installButton.style.display = "none"
|
||||
})
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue