initial commit

This commit is contained in:
ycc
2026-01-20 19:49:41 +01:00
commit 30a59d7e4e
30 changed files with 12607 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="{{ config.default_language | default(value="en") }}" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{%- if page is defined and page.title -%}
{{ page.title }} {{ config.title }}
{%- elif section is defined and section.title -%}
{{ section.title }} {{ config.title }}
{%- else -%}
{{ config.title }}
{%- endif -%}
</title>
{# Description meta #}
{% if page is defined and page.description %}
<meta name="description" content="{{ page.description }}">
{% elif section is defined and section.description %}
<meta name="description" content="{{ section.description }}">
{% else %}
<meta name="description" content="{{ config.description | default(value="OpenCloud sovereign distributed cloud project") }}">
{% endif %}
<link rel="stylesheet" href="{{ get_url(path="main.css") }}">
</head>
<body>
{% include "partials/header.html" %}
<main class="oc-main">
{% block content %}{% endblock content %}
</main>
{% include "partials/footer.html" %}
<script>
(function () {
const root = document.documentElement;
const stored = localStorage.getItem('oc-theme');
// Default = light
if (stored === 'dark') {
root.setAttribute('data-theme', 'dark');
} else {
root.setAttribute('data-theme', 'light');
}
const btn = document.getElementById('oc-theme-toggle');
if (!btn) return;
const updateLabel = () => {
const current = root.getAttribute('data-theme') || 'light';
btn.dataset.theme = current;
if (current === 'dark') {
btn.innerText = '☀ Light';
} else {
btn.innerText = '🌙 Dark';
}
};
updateLabel();
btn.addEventListener('click', () => {
const current = root.getAttribute('data-theme') === 'dark' ? 'dark' : 'light';
const next = current === 'dark' ? 'light' : 'dark';
root.setAttribute('data-theme', next);
localStorage.setItem('oc-theme', next);
updateLabel();
});
})();
</script>
</body>
</html>