restructured to public folder
This commit is contained in:
parent
43addb92a2
commit
83737bd3a6
101 changed files with 2945 additions and 8373 deletions
6
_includes/_footer.njk
Normal file
6
_includes/_footer.njk
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<footer id="main-footer">
|
||||
<div>
|
||||
<span>
|
||||
<i class="fa-brands fa-creative-commons-zero" style="margin-right: 8px;"></i>Luca Junge</span>
|
||||
</div>
|
||||
</footer>
|
||||
83
_includes/_header.njk
Normal file
83
_includes/_header.njk
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<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>
|
||||
21
_includes/layouts/base.njk
Normal file
21
_includes/layouts/base.njk
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<link rel="stylesheet" href="/libraries/fontawesome/css/all.css">
|
||||
<link rel="manifest" href="/pwa.webmanifest" />
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% include "_header.njk" %}
|
||||
|
||||
<main>
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
|
||||
{% include "_footer.njk" %}
|
||||
</body>
|
||||
</html>
|
||||
26
_includes/layouts/overview.njk
Normal file
26
_includes/layouts/overview.njk
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<link rel="stylesheet" href="/libraries/fontawesome/css/all.css">
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% include "_header.njk" %}
|
||||
|
||||
<aside class="flex" style="margin-top: 70px;">
|
||||
<h1>{{title}}</h1>
|
||||
</aside>
|
||||
|
||||
<main class="flex">
|
||||
<div class="content-padding container">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% include "_footer.njk" %}
|
||||
</body>
|
||||
</html>
|
||||
39
_includes/layouts/post.njk
Normal file
39
_includes/layouts/post.njk
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<link rel="stylesheet" href="/libraries/fontawesome/css/all.css">
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% include "_header.njk" %}
|
||||
|
||||
<div class="post">
|
||||
<aside>
|
||||
<a class="button" onclick="history.back()">
|
||||
<i class="fa fa-solid fa-angle-left"></i> Zurück
|
||||
</a>
|
||||
|
||||
{% if header %}
|
||||
<div>
|
||||
<img src="{{ header }}" alt="{{ title }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h1 >{{ title }}</h1>
|
||||
<span>{{ page.date | formatDate }}</span>
|
||||
</aside>
|
||||
|
||||
<main class="post-main">
|
||||
<article>
|
||||
{{ content | safe }}
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
{% include "_footer.njk" %}
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue