10 years later #1

Merged
sthag merged 374 commits from development into main 2026-03-07 00:18:59 +01:00
Showing only changes of commit 5261754da5 - Show all commits

View file

@ -15,6 +15,8 @@ tags:
{% endblock %}
{% block script %}
{{ block.super -}}
<script>
// TODO: Kalenderwoche ergänzen
// TODO: Mondphase ergänzen
@ -37,7 +39,7 @@ tags:
this.addRing('seconds', 1, 21, 60, `rgb(250, 216, 3)`);
this.addRing('minutes', .9, 46, 60, `rgb(242, 175, 19)`);
this.addRing('minutes', .8, 6, this.options.h24 ? 24 : 12, `rgb(211, 10, 81)`);
this.addRing('dotweek', .7, 32, 7, `rgb(142, 31, 104)`);
this.addRing('dotweek', .7, 2, 7, `rgb(142, 31, 104)`);
this.addRing('dotmonth', .6, 12, this.getTime().daysMonth, `rgb(39, 63, 139)`);
this.addRing('dotyear', .5, 256, 365, `rgb(60, 87, 154)`);
this.addRing('month', .4, 10, 12, `rgb(183, 224, 240)`);
@ -98,8 +100,7 @@ tags:
const innerY = this.toPixelY(shape.center) + innerRadius * Math.sin(angle);
ctx.strokeStyle = 'black';
// TODO: Stärke an shape.max orientieren
ctx.lineWidth = 1;
ctx.lineWidth = mapRange(shape.max, 7, 72, .1, 5, true, true);
ctx.beginPath();
ctx.moveTo(outerX, outerY);
ctx.lineTo(innerX, innerY);
@ -241,7 +242,7 @@ tags:
this.shapes.push({type: 'circle', id, center, radius, color});
}
addRing(id, radius, angle, max, color = 'black', center = .5, stroke = 16) {
addRing(id, radius, angle, max, color = 'white', center = .5, stroke = 16) {
this.shapes.push({type: 'ring', id, radius, angle, max, color, center, stroke});
}