a new start

This commit is contained in:
2025-10-25 12:39:30 +02:00
commit c97cadef78
726 changed files with 454051 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
{% if site.google_analytics %}
<script>!function(w, d) {
w.ga=w.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
/*{% if site.pivoine.cookies_banner %}*/
if (navigator.CookiesOK) {
ga('create', '{{ site.google_analytics }}', 'auto');
} else if (d.cookie.indexOf("hy--cookies-ok=true") > -1) {
ga('create', '{{ site.google_analytics }}', {
'storage': 'none',
'clientId': localStorage ? localStorage.getItem('ga--client-id') : undefined
});
} else {
ga('create', '{{ site.google_analytics }}', {
'storage': 'none'
});
ga('set', 'forceSSL', true);
ga('set', 'anonymizeIp', true);
}
/*{% else %}*/
ga('create', '{{ site.google_analytics }}', 'auto');
/*{% endif %}*/
var pushStateEl = d.getElementById('_pushState');
var timeoutId;
pushStateEl.addEventListener('hy-push-state-load', function() {
w.clearTimeout(timeoutId);
timeoutId = w.setTimeout(function() {
ga('set', 'page', w.location.pathname);
ga('send', 'pageview');
}, 500);
});
d.addEventListener('hy--cookies-ok', function () {
w.ga(function(tracker) {
w.ga("set", "anonymizeIp", undefined);
localStorage && localStorage.setItem("ga--client-id", tracker.get("clientId"));
});
});
w.loadJSDeferred('https://www.google-analytics.com/analytics.js');
}(window, document);</script>
{% endif %}

View File

@@ -0,0 +1,22 @@
<nav id="breadcrumbs" class="screen-only"><ul>
{% assign crumbs = include.url | remove:'index.html' | split: '/' %}
{% if crumbs.size > 1 %}
<li><a href="{{ '/' | relative_url }}">{{ site.data.strings.breadcrumbs_home | default:'home' }}</a></li>
{% for crumb in crumbs offset: 1 %}
{%- if crumb != "page" -%}
<li>
{% unless forloop.last %}
<span>{{ site.data.strings.breadcrumbs_separator | default:'/' }}</span>
{% assign crumb_limit = forloop.index | plus: 1 %}
{% capture href %}{% for crumb1 in crumbs limit: crumb_limit %}{{ crumb1 | append: '/' }}{% endfor %}{% endcapture %}
<a href="{{ href | relative_url }}">{{ crumb | url_decode }}</a>
{% else %}
<span>{{ site.data.strings.breadcrumbs_separator | default:'/' }}</span>
<span>{{ crumbs | reverse | first | url_decode }}</span>
{% endunless %}
</li>
{%- endif -%}
{% endfor %}
{% endif %}
</ul></nav>

View File

@@ -0,0 +1,6 @@
{% if page.comments %}
<aside class="comments related" role="complementary">
<h2 class="hr-bottom">{{ site.data.strings.comments | default:"Comments" }}</h2>
{% include my-comments.html %}
</aside>
{% endif %}

View File

@@ -0,0 +1,18 @@
{% if site.copyright.size > 0 or site.legal.size > 0 or site.pivoine.advertise %}
<footer class="content" role="contentinfo">
<hr/>
{% if site.copyright.size > 0 %}
<p><small class="copyright">{{ site.copyright | markdownify | replace:'<p>','' | replace:'</p>','' }}</small></p>
{% endif %}
{% if site.legal.size > 0 %}
<nav class="legal"><small>
{% for node in site.legal %}
{% assign url = node.url | default: node.href %}
<a class="heading flip-title" href="{% include_cached smart-url url=url %}">{{ node.name | default:node.title }}</a>
{% unless forloop.last %}{{ site.data.strings.separator | default:'|' }}{% endunless %}
{% endfor %}
</small></nav>
{% endif %}
<hr class="sr-only"/>
</footer>
{% endif %}

23
_includes/body/index.html Normal file
View File

@@ -0,0 +1,23 @@
{% include_cached components/dark-mode.html %}
<hy-push-state
id="_pushState"
replace-selector="#_main"
link-selector="a[href]:not([href^='{{ assets_url }}']):not(.external):not(.no-push-state)"
script-selector="script"
duration="500"
hashchange
>
{% capture sidebar %}{% include_cached body/sidebar.html cover=page.cover invert=page.invert_sidebar theme_color=page.theme_color image=image color=color video=video %}{% endcapture %}
{% if page.cover %}{{ sidebar }}{% endif %}
{% include_cached body/menu.html %}
{% include body/main.html %}
{% unless page.cover %}{{ sidebar }}{% endunless %}
</hy-push-state>
{% unless page.redirect %}
{% include_cached body/scripts.html %}
{% include my-body.html %}
{% endunless %}
{% include_cached templates/index.html %}

9
_includes/body/main.html Normal file
View File

@@ -0,0 +1,9 @@
<main
id="_main"
class="content layout-{{ page.layout }}"
role="main"
>
{% unless site.pivoine.no_breadcrumbs %}{% include body/breadcrumbs.html url=page.url %}{% endunless %}
{{ content }}
{% include_cached body/footer.html %}
</main>

18
_includes/body/menu.html Normal file
View File

@@ -0,0 +1,18 @@
<div id="_navbar" class="navbar fixed-top">
<div class="content">
<span class="sr-only">{{ site.data.strings.jump_to | default:"Jump to" }}{{ site.data.strings.colon | default:":" }}</span>
<div class="nav-btn-bar">
<a id="_menu" class="nav-btn no-hover" href="#_drawer--opened">
<span class="sr-only">{{ site.data.strings.navigation | default:"Navigation" }}</span>
<span class="icon-menu"></span>
</a>
<div class="nav-insert-marker"></div>
{% if site.pivoine.search.icon %}
<hm-search class="nav-span" hidden placeholder="{{ site.data.strings.search | default:"Search" }}"></hm-search>
{% elsif site.pivoine.search.always %}
<hm-search class="nav-span" placeholder="{{ site.data.strings.search | default:"Search" }}"></hm-search>
{% endif %}
</div>
</div>
</div>
<hr class="sr-only" hidden />

41
_includes/body/nav.html Normal file
View File

@@ -0,0 +1,41 @@
<span class="sr-only">{{ site.data.strings.navigation | default:"Navigation" }}{{ site.data.strings.colon | default:":" }}</span>
<ul>
{% if site.menu %}
{% for node in site.menu %}
{% assign url = node.url | default: node.href %}
<li>
<a
{% if forloop.first %}id="_drawer--opened"{% endif %}
href="{% include_cached smart-url url=url %}"
class="sidebar-nav-item {% if node.external %}external{% endif %}"
{% if node.rel %}rel="{{ node.rel }}"{% endif %}
>
{{ node.name | default:node.title }}
</a>
</li>
{% endfor %}
{% else %}
{% assign pages = site.html_pages | where: "menu", true %}
{% assign documents = site.documents | where: "menu", true %}
{% assign nodes = pages | concat: documents | sort: "order" %}
{% for node in nodes %}
{% unless node.redirect_to %}
<li>
<a
{% if forloop.first %}id="_navigation"{% endif %}
href="{{ node.url | relative_url }}"
class="sidebar-nav-item"
{% if node.rel %}rel="{{ node.rel }}"{% endif %}
>
{{ node.title }}
</a>
</li>
{% else %}
<li>
<a href="{{ node.redirect_to }}" class="sidebar-nav-item external">{{ node.title }}</a>
</li>
{% endunless %}
{% endfor %}
{% endif %}
</ul>

View File

@@ -0,0 +1,7 @@
<!--[if gt IE 10]><!---->
<script nomodule>{% include scripts/nomodule.min.js %}</script>
<script src="{{ '/assets/js/pivoine-1.0.0.js' | relative_url }}" type="module"></script>
<script src="{{ '/assets/js/LEGACY-pivoine-1.0.0.js' | relative_url }}" nomodule defer></script>
{% include my-scripts.html %}
{% include body/analytics.html %}
<!--<![endif]-->

View File

@@ -0,0 +1,21 @@
{% assign image = include.image %}
{% assign video = include.video %}
{% assign color = include.color %}
{% assign theme_color = include.theme_color %}
{% if image.background %}
{% capture bg_style %}background:{{ image.style }}{% endcapture %}
{% capture bg_class %}sidebar-bg {% if image.overlay %}sidebar-overlay{% endif %}{% endcapture %}
{% else %}
{% assign bg_color = theme_color | default:site.theme_color | default:color %}
{% capture bg_style %}background-color:{{ bg_color }};{% if image != 'none' %}background-image:url({% include_cached smart-url url=image %}){% endif %};overflow: hidden;{% endcapture %}
{% capture bg_class %}sidebar-bg {% if image != 'none' %}sidebar-overlay{% endif %}{% endcapture %}
{% endif %}
<div class="{{ bg_class }}" style="{{ bg_style }}">
{% if video %}
<video id="_video" style="min-width: 100%; height: 100%; object-fit: cover" autoplay muted loop>
<source src="{% include_cached smart-url url=video %}" type="video/mp4">
</video>
{% endif %}
</div>

View File

@@ -0,0 +1,33 @@
<div class="sidebar-sticky">
<div class="sidebar-about">
{% if site.logo %}
<a class="no-hover" href="{{ '/' | relative_url }}" tabindex="-1">
<img src="{% include_cached smart-url url=site.logo %}" class="logo" alt="{{ site.short_title | default:site.title }}" width="120" height="120" loading="lazy" />
</a>
{% endif %}
<a class="sidebar-title" href="{{ '/' | relative_url }}"><h2 class="h1">{{ site.short_title | default:site.title }}</h2></a>
{% assign text = site.tagline | default:site.description %}
{% if text %}
<p class="{% if text.size > 100 %}fine{% endif %}">
{{ text | markdownify | replace:'<p>','' | replace:'</p>','' }}
</p>
{% endif %}
</div>
<nav class="sidebar-nav heading" role="navigation">
{% include body/nav.html %}
</nav>
{% assign author = site.data.authors.first[1] | default:site.author %}
<div class="sidebar-social">
{% include components/social.html author=author %}
</div>
{% if site.pivoine.sound %}
{% assign sounds = site.data.sounds | where: 'default', true %}
<div class="sound-player" data-featured="{{ sounds.first | jsonify | escape }}">
<canvas class="hidden"></canvas>
<a>[ SOUND ON ]</a>
<audio hidden controls="false"></audio>
</div>
{% endif %}
</div>

View File

@@ -0,0 +1,14 @@
<hy-drawer
id="_drawer"
class="{% if include.cover %}cover{% endif %}"
side="left"
threshold="10"
noscroll
{% if include.cover %}opened{% endif %}
>
<header id="_sidebar" class="sidebar{% if include.invert %} invert{% endif %}" role="banner">
{% include_cached body/sidebar-bg.html image=include.image color=include.color theme_color=include.theme_color video=include.video %}
{% include_cached body/sidebar-sticky.html %}
</header>
</hy-drawer>
<hr class="sr-only" hidden />