Make project REUSE compliant

initial commit

a lot more stuff

Make project REUSE compliant

start working on implementing audio
This commit is contained in:
Ncam Gnrvngu 2025-05-28 16:32:00 +02:00
commit 7bc11e49a4
Signed by: NcamGnrvngu
GPG key ID: BBF21CBE5628BA99
136 changed files with 3218 additions and 0 deletions

13
templates/404.html Normal file
View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block title %}
404 Error
{% endblock title %}
{% block style %}
<link rel="stylesheet" href="/404.css"/>
{% endblock style %}
{% block content %}
<div id="error">
<h1>404<h1>
<h3>This page does not exist<h3>
</div>
{% endblock content %}

43
templates/base.html Normal file
View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% block head %}
<meta charset="UTF-8">
<title>{% block title %} {% endblock title %}</title>
{% block style %}
<link rel="stylesheet" href="style.css"/>
{% endblock style %}
{% if config.extra.mastodon_url %}
<link rel="me" href="{{ config.extra.mastodon_url }}"/>
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% endblock head %}
</head>
<body>
<div id="content-wrapper">
<header>
{% block header %}
<a id="header-link" href="/">Ncam Gnrvngu</a>
<div id="header-category-links">
<a class="header-category-link" href="/post/">Posts</a>
<a class="header-category-link" href="/projects">Projects</a>
</div>
{% endblock header %}
</header>
<main>{% block content %}{% endblock content %}</main>
<footer>
{% block footer %}
{% if config.extra.github_url %}
<a href="{{ config.extra.github_url }}">GitHub</a>
{% endif %}
{% if config.extra.mastodon_url %}
<a href="{{ config.extra.mastodon_url }}">Mastodon</a>
{% endif %}
{% if config.extra.matrix_user %}
<a href="https://matrix.to/#/{{ config.extra.matrix_user }}">Matrix</a>
{% endif %}
{% endblock footer %}
</footer>
</div>
</body>
</html>

30
templates/index.html Normal file
View file

@ -0,0 +1,30 @@
{% extends "base.html" %}
{% block title %}Ncam Gnrvngu{% endblock title %}
{% block content %}
<div id="greeter">
<img src="/logo.jpg">
<div>
<h1>Hey I'm Ncam Gnrvngu</h1>
<h2>I'm a programmer and musician</h3>
</div>
</div>
<div id="categories">
{% for subsection_path in section.subsections %}
{% set subsection = get_section(path=subsection_path) %}
<div>
<h3>{{ subsection.title }}</h3>
<ul>
{% for page in subsection.pages %}
<li>
<a href="{{ page.permalink | safe }}">{{page.title}}</a>
<p>
{{ page.summary | safe }}
<p>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endblock content %}

17
templates/list.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block title %}
{{ section.title }}
{% endblock title %}
{% block content %}
<h1>{{ section.title }}</h1>
<ul>
{% for page in section.pages %}
<li>
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
<p>
{{ page.description | safe }}
<p>
</li>
{% endfor %}
</ul>
{%endblock content %}

16
templates/post.html Normal file
View file

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block style %}
<link rel="stylesheet" href="/post/page.css"/>
{% endblock style %}
{% block title %}
{{ page.title }}
{% endblock title %}
{% block content %}
<h1 id="title">
{{ page.title }}
</h1>
<p id="subtitle">{{ page.date }}</p>
<div id="page_content">
{{ page.content | safe }}
</div>
{% endblock content %}

53
templates/song.html Normal file
View file

@ -0,0 +1,53 @@
{% extends "base.html" %}
{% block style %}
<link rel="stylesheet" href="/post/page.css"/>
<link rel="stylesheet" href="/song.css"/>
{% endblock style %}
{% block title %}
{{ page.title }}
{% endblock title %}
{% block content %}
<div id="player">
{% if page.extra.cover %}
<img id="cover" src="{{ page.extra.cover }}"/>
{% endif %}
<h1 id="title">
{{ page.title }}
</h1>
<div id="controls">
<button id="playbutton"></button>
<input type="range" class="seek" id="seek" max="1" value="0" step="0.001">
</div>
<audio id="audio" controls src="{{ page.extra.src }}" style="display:none" preload="metadata">
</div>
<div id="page_content">
{{ page.content | safe }}
</div>
<script>
const audio = document.getElementById("audio");
const playbutton = document.getElementById("playbutton");
const seek = document.getElementById("seek");
seek.value = 0.0;
let playing = false;
playbutton.addEventListener("click", () => {
if (playing) {
audio.pause();
playbutton.textContent = "▶";
} else {
audio.play();
playbutton.textContent = "⏸";
}
playing = !playing;
});
audio.addEventListener("timeupdate", () => {
const progress = (audio.currentTime / audio.duration);
seek.value = progress;
});
seek.addEventListener("change", () => {
audio.currentTime = audio.duration * seek.value;
});
</script>
{% endblock content %}