feat: add journal-post CSS component and dot-sync JS; remove stale journal-card-only rules

This commit is contained in:
2026-06-20 14:32:04 +02:00
parent fb5ae6732c
commit f829da10ec
2 changed files with 112 additions and 60 deletions
@@ -26,5 +26,18 @@
{% block content %}{% endblock %}
</main>
{{ assets.js('bottom')|raw }}
<script>
(function () {
document.querySelectorAll('.journal-photo-strip').forEach(function (strip) {
var dots = strip.nextElementSibling;
if (!dots || !dots.classList.contains('journal-photo-dots')) return;
var dotEls = Array.from(dots.querySelectorAll('.journal-photo-dot'));
strip.addEventListener('scroll', function () {
var idx = Math.round(strip.scrollLeft / strip.offsetWidth);
dotEls.forEach(function (d, i) { d.classList.toggle('is-active', i === idx); });
}, { passive: true });
});
})();
</script>
</body>
</html>