added src
This commit is contained in:
55
src/templates/overview.html
Normal file
55
src/templates/overview.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>STSG</title>
|
||||
<link rel="stylesheet" href="/static/bulma.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header (Navbar) -->
|
||||
<nav
|
||||
class="navbar is-primary"
|
||||
role="navigation"
|
||||
aria-label="main navigation"
|
||||
>
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="#">
|
||||
<strong>Static Translated Site Generator</strong>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="column is-half is-offset-one-quarter">{overview_cards}</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="content has-text-centered">
|
||||
<p><strong>STSG</strong> by Hazel. © 2025</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const userLang = navigator.language || navigator.userLanguage;
|
||||
|
||||
// Normalize and check if the language is not English or German
|
||||
if (!["en", "de", "de-DE"].includes(userLang)) {
|
||||
// Try to find a matching card by language attribute
|
||||
const cardToMove =
|
||||
document.querySelector(`.card[lang^="${userLang.replace("_", "-").toLowerCase()}"]`) ||
|
||||
document.querySelector(`.card[lang^="${userLang.split("-")[0]}"]`);
|
||||
|
||||
if (cardToMove) {
|
||||
const container = cardToMove.parentNode;
|
||||
container.insertBefore(cardToMove, container.firstChild);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user