www-garbaye/templates/index.html
2024-03-10 10:24:04 +01:00

144 lines
4.9 KiB
HTML

{% import "_macros.html" as macros %}
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block favicon %}
<link rel="icon" type="image/png" href="{{ get_url(path="/images/favicon.ico") }}">
{% endblock favicon %}
<link rel="stylesheet" href="{{ get_url(path="normalize.css") }}">
<link rel="stylesheet" href="{{ get_url(path="juice.css") }}">
<link rel="stylesheet" href="{{ get_url(path="css/garbaye_custom.css") }}">
{% include "_variables.html" %}
{% block head %}
{% endblock head %}
</head>
<body>
{% block header %}
<header class="pos-absolute" style="background-color: transparent">
{{ macros::render_header() }}
</header>
<div class="hero">
{% block hero %}
<img class="hero-image" style="width: 512px" src="{{ get_url(path="images/logocarreblanc_512px.png") }}">
<section class="text-center">
<h1 class="heading-text" style="font-size: 50px">
Garbaye : Services numériques libres<br>
</h1>
<h3 class="title-text">Basé en Gironde, nous auto-hébergeons des services pour tous, dans un souci d'éthique et de décentralisation du web.</h3>
<a href="https://www.chatons.org/"><img class="hero-image" style="width: 12%" src="{{ get_url(path="images/logo_chatons_v3.1_512px.png") }}"></a>
<div class="text"><a href="mailto:contact [arobase] garbaye [point] fr">Courriel</a> - <a href="https://matrix.to/#/#garbaye:garbaye.fr">Matrix [m]</a> - <a href="https://git.garbaye.fr/Garbaye">Git</a></div>
</section>
<div class="explore-more text"
onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})">
Découvrez nos services ⇩
</div>
<style>
.hero section {
padding: 0 5rem;
}
@media screen and (max-width: 768px) {
.hero section {
padding: 0 2rem;
}
.hero-image {
display: none
}
}
</style>
{% endblock hero %}
</div>
{% endblock header %}
<main>
{% block toc %}
{% if section.toc %}
{% set toc = section.toc %}
{% elif page.toc %}
{% set toc = page.toc %}
{% endif %}
{% if toc %}
<div class="toc">
<div class="toc-sticky">
{% for h in toc %}
<div class="toc-item">
<a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a>
</div>
{% if h.children %}
{% for h2 in h.children %}
<div class="toc-item-child">
<a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a>
</div>
{% endfor %}
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% endblock toc %}
<div class="content text">
{% block content %}
<div id="features" class="heading-text">Bienvenue sur Garbaye</div>
{{ section.content | safe }}
{% endblock content %}
</div>
{% block sidebar %}
{% endblock sidebar %}
</main>
{% block footer %}
<footer>
<small class="subtext">
<a href="https://garbaye.fr">Garbaye.fr</a> © 2021-2024 - <a href="https://git.garbaye.fr/Garbaye/www-garbaye">Code source</a> - Empuissanté par <a href="https://www.getzola.org/">Zola</a> - Thème <a href="https://juice.huhu.io/">Juice</a>
</small>
</footer>
{% endblock footer %}
</body>
<script>
function highlightNav(heading) {
let pathname = location.pathname;
document.querySelectorAll(".toc a").forEach((item) => {
item.classList.remove("active");
});
document.querySelector(".toc a[href$='" + pathname + "#" + heading + "']").classList.add("active");
}
let currentHeading = "";
window.onscroll = function () {
let h = document.querySelectorAll("h1,h2,h3,h4,h5,h6");
let elementArr = [];
h.forEach(item => {
if (item.id !== "") {
elementArr[item.id] = item.getBoundingClientRect().top;
}
});
elementArr.sort();
for (let key in elementArr) {
if (!elementArr.hasOwnProperty(key)) {
continue;
}
if (elementArr[key] > 0 && elementArr[key] < 300) {
if (currentHeading !== key) {
highlightNav(key);
currentHeading = key;
}
break;
}
}
}
</script>
</html>